woodpecker/pipeline
gapanyc 547f5dea35
Init CI_COMMIT_TAG if commit ref is a tag (#2934)
When triggering a deployment event on an existing pipeline, there is no
way to get the tag used to trigger the parent pipeline, even if this
parent was a tag event.

In our company CI/CD current setup with drone, we use the tag event to
trigger a kaniko image build step, using the git tag as an image tag,
and the deployment/promotion step to effectively deploy this image using
the tag reference in our cluster. This is the only point blocking us to
completely switch to woodpecker and get rid of drone...

What's done:
- changed the metadata environ() method to populate CI_COMMIT_TAG env
var if commit ref starts with /refs/tags (like it's done in drone),
independently of event type EventTag.

Please let me know if I'm wrong, I will happily contribute in this nice
project.

---------

Co-authored-by: Christian Gapany <christian.gapany@netplus.pro>
Co-authored-by: Lauris BH <lauris@nix.lv>
2023-12-12 18:05:06 +02:00
..
backend Update go module path for major version 2 (#2905) 2023-12-08 08:15:08 +01:00
errors Update go module path for major version 2 (#2905) 2023-12-08 08:15:08 +01:00
frontend Init CI_COMMIT_TAG if commit ref is a tag (#2934) 2023-12-12 18:05:06 +02:00
multipart Check for correct license header (#2137) 2023-08-10 11:06:00 +02:00
rpc Update go module path for major version 2 (#2905) 2023-12-08 08:15:08 +01:00
samples pre-commit fixes (#2669) 2023-10-31 09:14:09 +01:00
shared Do not sanitzie secrets with 3 or less chars (#2680) 2023-10-31 19:44:03 +01:00
error.go Check for correct license header (#2137) 2023-08-10 11:06:00 +02:00
error_test.go Check for correct license header (#2137) 2023-08-10 11:06:00 +02:00
logger.go Update go module path for major version 2 (#2905) 2023-12-08 08:15:08 +01:00
option.go Update go module path for major version 2 (#2905) 2023-12-08 08:15:08 +01:00
pipeline.go Update go module path for major version 2 (#2905) 2023-12-08 08:15:08 +01:00
stepBuilder.go Update go module path for major version 2 (#2905) 2023-12-08 08:15:08 +01:00
stepBuilder_test.go Update go module path for major version 2 (#2905) 2023-12-08 08:15:08 +01:00
tracer.go Check for correct license header (#2137) 2023-08-10 11:06:00 +02:00