Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for no push environment variable #2983

Merged
merged 4 commits into from
Feb 23, 2024

Conversation

sachasmart
Copy link
Contributor

@sachasmart sachasmart commented Feb 2, 2024

Supports #2385 and #144 in case of a bug fix, this should point to a bug and any other related issue(s)

Description

This feature adds support for checking the KANIKO_NO_PUSH environment variable. If the environment variable is declared, it sets the value to opts.NoPush.

Side note - fully aware there may be an opportunity to use viper here. Happy to help implement it, but I was not sure if this was a path the project was interested in.

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes unit tests
  • Adds integration tests if needed.

See the contribution guide for more details.

Reviewer Notes

  • The code flow looks good.
  • Unit tests and or integration tests added.

Release Notes

Describe any changes here so maintainer can include it in the release notes, or delete this block.

Add KANIKO_NO_PUSH environment variable to set --no-push flag

Copy link

google-cla bot commented Feb 2, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@JeromeJu JeromeJu self-assigned this Feb 14, 2024
Copy link
Collaborator

@JeromeJu JeromeJu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @sachasmart , would you mind also help add this to the Readme.md?

@sachasmart
Copy link
Contributor Author

sachasmart commented Feb 20, 2024

Perfect - updated with:

#### Flag `--no-push`

Set this flag if you only want to build the image, without pushing to a
registry. This can also be defined through `KANIKO_NO_PUSH` environment
variable.

Edit: I have prettier formatting my Markdown and it looks like it updated some of the formatting in the README.md - happy to revert it, but it does look like it may be for the better? Notably the table has extra spaces, etc.

VSCode User Config:

...
  "[markdown]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
...

@JeromeJu JeromeJu merged commit 818b139 into GoogleContainerTools:main Feb 23, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants