Commit Graph

10 Commits

Author SHA1 Message Date
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
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
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
Shubham Agrawal
9388a47a4c
Updated go version for security fixes (#29) 2021-10-12 16:38:58 +05:30
Simas Čepaitis
e86d4583a7
Add ECR policy management support (#26) 2021-09-08 15:19:52 +05:30
Colin Hoglund
ac015e1f9a
Add support for creating ECR repos (#24)
All checks were successful
continuous-integration/drone/push Build is passing
2021-08-29 20:03:37 +02:00
Colin Hoglund
00a65ec0b5
Add support for creating ECR repos (#24) 2021-08-28 18:37:26 +05:30
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
Shubham Agrawal
1fbaab2bee Working kaniko publish to docker 2020-11-16 23:41:59 +05:30
Shubham Agrawal
aaed706917 Initial kaniko docker 2020-11-16 23:07:13 +05:30