Skip to content

Commit

Permalink
fix(ci-env, gitlab): fix annotation with pipeline url
Browse files Browse the repository at this point in the history
Signed-off-by: Aleksei Igrychev <aleksei.igrychev@palark.com>
  • Loading branch information
alexey-igrychev committed Sep 17, 2024
1 parent 9865b18 commit bb86d5e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/werf/ci_env/ci_env.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,9 @@ func generateGitlabEnvs(ctx context.Context, w io.Writer, dockerConfig string) e
writeEnv(w, "WERF_ADD_ANNOTATION_CI_GIT_TAG", ciGitTag, true)

var gitlabCIPipelineUrl string
ciPipelineIdEnv := os.Getenv("CI_PIPELINE_ID")
if ciProjectUrlEnv != "" && ciPipelineIdEnv != "" {
gitlabCIPipelineUrl = fmt.Sprintf("gitlab.ci.werf.io/pipeline-url=%s/pipelines/%s", ciProjectUrlEnv, ciPipelineIdEnv)
ciPipelineUrlEnv := os.Getenv("CI_PIPELINE_URL")
if ciPipelineUrlEnv != "" {
gitlabCIPipelineUrl = fmt.Sprintf("gitlab.ci.werf.io/pipeline-url=%s", ciPipelineUrlEnv)
}
writeEnv(w, "WERF_ADD_ANNOTATION_GITLAB_CI_PIPELINE_URL", gitlabCIPipelineUrl, true)

Expand Down

0 comments on commit bb86d5e

Please sign in to comment.