Commit Graph

23 Commits

Author SHA1 Message Date
surtur ab07d57e85
Merge remote-tracking branch 'upstream/main' into merge-main
All checks were successful
continuous-integration/drone/push Build is passing
2022-03-26 17:15:57 +01:00
JimZhang 8bd45524d4
add flag --registry-mirrors (#42) 2022-03-15 11:45:57 +05:30
Sinkerine c38eb07dea
Fix the broken link in readme (#38) 2022-02-10 18:36:36 +05:30
Sinkerine de43f3afb6
Port the auto tag feature from docker plugin (#36)
* Port the auto tag feature from https://plugins.drone.io/drone-plugins/drone-docker

The logic is forked from https://github.com/drone-plugins/drone-docker code base
with necessary modification. I've tested it e2e for DockerHub on my Drone server
via this plugin image https://hub.docker.com/repository/docker/15cm/drone-kaniko,
for both tag pushes and commit pushes.

With this change the .drone.yml in this repo should work as intended.

Other changes:
- Rename the existing "auto tag" flags/code to "expand tag" for a less
misleading naming.
- ATTENTION: make a breaking change to set default value of "--tags" to empty.
Rationale is to expect most users to use the auto tagging feature. When power
users want to specify tags, they should always explicitly set tags instead of
being surprised by the default "latest" tag.

* Change how --auto-tag flag works with other flags

The --auto-tag has to be a breaking change. This commit limit the breaking
impact to the users who enable the flag. Behaviors of flag combination after
this commit:
* --auto-tag=false: No changes.
* --auto-tag=false,--expand-tag=true,tags=1.0.0:
  * Old behavior: Should not happen. --expand-tag didn't exist.
  * New Behavior: Build with [1,1.0,1.0.0] tags.
* --auto-tag=true
  * Old behavior: Build with the "latest" tag.
  * New behavior: Build with auto detected tags. Abort if auto detection failed.
* --auto-tag=true,tags=latest: same as "--auto-tag=true".
* --auto-tag=true,tags=1.0.0:
  * Old behavior: Build with [1,1.0,1.0.0] tags.
  * New behavior: Abort the build with an error message.
* --auto-tag=true,--expand-tag=true,tags=1.0.0: Abort the build with an error message.

Also added a test for the integration of the BUILD struct and the tagger
package, which is used by kaniko.go.

* Update readme to note that expand-tag and auto-tag don't support artifacts
2022-02-10 13:06:14 +05:30
JimZhang d381ac6700
Fix "--cache-ttl" flag missing unit in duration (#35) 2022-02-07 19:13:29 +05:30
Shubham Agrawal 59e09c14de
Add support for custom platform (#32) 2021-12-01 17:10:28 +05:30
Shubham Agrawal 5e7bcabe6a
Make json key optional for GCR push (#30) 2021-10-18 17:06:53 +05:30
Kyle Lemons 0a35538489
Add support for automatic tagging (:1, :1.2, :1.2.3, etc) for semantic versions (#22) 2021-10-18 00:05:18 +05:30
Colin Hoglund 6b4393acf8
Do not require username/password with `no_push: true` (#25)
* allow --no-push to build without authentication

* linting

* setup no-push auth when credentials are not empty
2021-09-01 11:45:50 +05:30
surtur 665106ec23
Merge branch 'main' into dev
All checks were successful
continuous-integration/drone/push Build is passing
2021-08-20 14:26:10 +02:00
wanderer 95412ee324
feat: upgrade to a cgroupv2-aware kaniko (#1)
All checks were successful
continuous-integration/drone/push Build is passing
since commit b22e993224, kaniko is cgroupv2-aware.

hotfix of a34e88943a is therefore no longer needed.

Reviewed-on: #1
Co-authored-by: wanderer <wanderer@noreply.git.dotya.ml>
Co-committed-by: wanderer <wanderer@noreply.git.dotya.ml>
2021-08-20 13:14:31 +02:00
Shubham Agrawal dbd6efc157
Add option to provide log verbosity (#23) 2021-08-20 16:38:35 +05:30
surtur a34e88943a
fix: temporary patch for kaniko on cgroup v2 hosts
All checks were successful
continuous-integration/drone/push Build is passing
This is a temporary workaround that enables kaniko to run on cgroup v2
enabled hosts. Due to an upstream issue, kaniko fails to detect that it
is indeed being run from a container.
Solution introduced here is to force kaniko to run regardless.

ref: https://github.com/GoogleContainerTools/kaniko/issues/1592
2021-05-02 01:37:56 +02:00
surtur b6919b2cda
option parsing logic: add fallback values
* don't exit on no values provided but instead use sane defaults for
  username, password and registry
* add "--no-push" flag if REPO name has not been specified
* only allow setting of TAGS if REPO has been specified as well
2021-05-02 01:15:47 +02:00
surtur 73e95f29d3
feat: build {amd64,pure docker} only
* rm arm/arm64/gcr/ecr related build instructions in build.sh
  and .drone.ml, only build for amd64
* change autotag to manually specified tags (2 static, one dynamic)
* change the branch referenced in .drone.yml as we're using dev by
  default
* module path is now git.dotya.ml/wanderer/drone-kaniko/*
2021-05-02 01:15:12 +02:00
Rauny e65b7b3ada
add flag --no-push (#21) 2021-04-29 20:53:43 +05:30
Aleksandar Radisavljevic df81f82f84
Add support for printing published docker image metadata to a file (#17) 2021-04-29 15:35:57 +05:30
Shubham Agrawal 4612825d41
Allow remote caching of docker layers in kaniko build (#16) 2021-04-08 00:05:53 +05:30
Shubham Agrawal 658478d5ae
Add snapshot mode support (#13) 2021-03-02 21:15:44 +05:30
Beniamin 9cca954ec6
add skip-tls-verify flag for insecure private registries (#11)
Co-authored-by: beniamin.calota <beniamin.calota@emag.ro>
2021-02-18 13:49:21 +05:30
Shubham Agrawal cdd1510210 Log error if dockerfile does not exist at provided path 2021-01-29 14:39:06 +05:30
Shubham Agrawal 33f15bdebe Fix label usage 2021-01-18 21:12:53 +05:30
Shubham Agrawal 1fbaab2bee Working kaniko publish to docker 2020-11-16 23:41:59 +05:30