kaniko icon indicating copy to clipboard operation
kaniko copied to clipboard

feat: add support for no push environment variable

Open sachasmart opened this issue 2 years ago • 1 comments

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

sachasmart avatar Feb 02 '24 00:02 sachasmart

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.

google-cla[bot] avatar Feb 02 '24 00:02 google-cla[bot]

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"
  },
...

sachasmart avatar Feb 20 '24 23:02 sachasmart