From 4b7d307d34a307cbf03a4234b7bd83cc391ded7e Mon Sep 17 00:00:00 2001 From: qwerty287 Date: Sun, 12 Nov 2023 10:48:18 +0100 Subject: [PATCH 1/5] fix env vars --- docs/docs/20-usage/50-environment.md | 6 +++++- pipeline/frontend/metadata.go | 1 + pipeline/frontend/metadata/environment.go | 16 ++++++++++++++-- pipeline/frontend/metadata/types.go | 1 + 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/docs/docs/20-usage/50-environment.md b/docs/docs/20-usage/50-environment.md index 3dd5d801d1..aee081f472 100644 --- a/docs/docs/20-usage/50-environment.md +++ b/docs/docs/20-usage/50-environment.md @@ -80,7 +80,8 @@ This is the reference list of all environment variables available to your pipeli | `CI_PIPELINE_NUMBER` | pipeline number | | `CI_PIPELINE_PARENT` | number of parent pipeline | | `CI_PIPELINE_EVENT` | pipeline event (push, pull_request, tag, deployment) | -| `CI_PIPELINE_URL` | link to the forge's web UI for the commit(s) or tag that triggered the pipeline | +| `CI_PIPELINE_URL` | link to the web UI for the pipeline | +| `CI_PIPELINE_FORGE_URL` | link to the forge's web UI for the commit(s) or tag that triggered the pipeline | | `CI_PIPELINE_DEPLOY_TARGET` | pipeline deploy target for `deployment` events (ie production) | | `CI_PIPELINE_STATUS` | pipeline status (success, failure) | | `CI_PIPELINE_CREATED` | pipeline created UNIX timestamp | @@ -90,9 +91,11 @@ This is the reference list of all environment variables available to your pipeli | `CI_WORKFLOW_NAME` | workflow name | | | **Current step** | | `CI_STEP_NAME` | step name | +| `CI_STEP_NUMBER` | step number | | `CI_STEP_STATUS` | step status (success, failure) | | `CI_STEP_STARTED` | step started UNIX timestamp | | `CI_STEP_FINISHED` | step finished UNIX timestamp | +| `CI_STEP_URL` | URL to step in UI | | | **Previous commit** | | `CI_PREV_COMMIT_SHA` | previous commit SHA | | `CI_PREV_COMMIT_REF` | previous commit ref | @@ -110,6 +113,7 @@ This is the reference list of all environment variables available to your pipeli | `CI_PREV_PIPELINE_PARENT` | previous pipeline number of parent pipeline | | `CI_PREV_PIPELINE_EVENT` | previous pipeline event (push, pull_request, tag, deployment) | | `CI_PREV_PIPELINE_URL` | previous pipeline link in CI | +| `CI_PREV_PIPELINE_FORGE_URL` | previous pipeline link to event in forge | | `CI_PREV_PIPELINE_DEPLOY_TARGET` | previous pipeline deploy target for `deployment` events (ie production) | | `CI_PREV_PIPELINE_STATUS` | previous pipeline status (success, failure) | | `CI_PREV_PIPELINE_CREATED` | previous pipeline created UNIX timestamp | diff --git a/pipeline/frontend/metadata.go b/pipeline/frontend/metadata.go index 2a669c9051..f748c00be0 100644 --- a/pipeline/frontend/metadata.go +++ b/pipeline/frontend/metadata.go @@ -55,6 +55,7 @@ func MetadataFromStruct(forge metadata.ServerForge, repo *model.Repo, pipeline, fRepo := metadata.Repo{} if repo != nil { fRepo = metadata.Repo{ + ID: repo.ID, Name: repo.Name, Owner: repo.Owner, RemoteID: fmt.Sprint(repo.ForgeRemoteID), diff --git a/pipeline/frontend/metadata/environment.go b/pipeline/frontend/metadata/environment.go index 6055dcab96..ddfc344ba7 100644 --- a/pipeline/frontend/metadata/environment.go +++ b/pipeline/frontend/metadata/environment.go @@ -15,6 +15,7 @@ package metadata import ( + "fmt" "path" "regexp" "strconv" @@ -68,7 +69,8 @@ func (m *Metadata) Environ() map[string]string { "CI_PIPELINE_NUMBER": strconv.FormatInt(m.Curr.Number, 10), "CI_PIPELINE_PARENT": strconv.FormatInt(m.Curr.Parent, 10), "CI_PIPELINE_EVENT": m.Curr.Event, - "CI_PIPELINE_URL": m.Curr.Link, + "CI_PIPELINE_URL": m.getPipelineStatusLink(m.Curr, 0), + "CI_PIPELINE_FORGE_URL": m.Curr.Link, "CI_PIPELINE_DEPLOY_TARGET": m.Curr.Target, "CI_PIPELINE_STATUS": m.Curr.Status, "CI_PIPELINE_CREATED": strconv.FormatInt(m.Curr.Created, 10), @@ -83,6 +85,7 @@ func (m *Metadata) Environ() map[string]string { "CI_STEP_STATUS": "", // will be set by agent "CI_STEP_STARTED": "", // will be set by agent "CI_STEP_FINISHED": "", // will be set by agent + "CI_STEP_URL": m.getPipelineStatusLink(m.Curr, m.Step.Number), "CI_PREV_COMMIT_SHA": m.Prev.Commit.Sha, "CI_PREV_COMMIT_REF": m.Prev.Commit.Ref, @@ -97,7 +100,8 @@ func (m *Metadata) Environ() map[string]string { "CI_PREV_PIPELINE_NUMBER": strconv.FormatInt(m.Prev.Number, 10), "CI_PREV_PIPELINE_PARENT": strconv.FormatInt(m.Prev.Parent, 10), "CI_PREV_PIPELINE_EVENT": m.Prev.Event, - "CI_PREV_PIPELINE_URL": m.Prev.Link, + "CI_PREV_PIPELINE_URL": m.getPipelineStatusLink(m.Prev, 0), + "CI_PREV_PIPELINE_FORGE_URL": m.Curr.Link, "CI_PREV_PIPELINE_DEPLOY_TARGET": m.Prev.Target, "CI_PREV_PIPELINE_STATUS": m.Prev.Status, "CI_PREV_PIPELINE_CREATED": strconv.FormatInt(m.Prev.Created, 10), @@ -123,3 +127,11 @@ func (m *Metadata) Environ() map[string]string { return params } + +func (m *Metadata) getPipelineStatusLink(pipeline Pipeline, stepNumber int) string { + if stepNumber == 0 { + return fmt.Sprintf("%s/repos/%d/pipeline/%d", m.Sys.Link, m.Repo.ID, pipeline.Number) + } + + return fmt.Sprintf("%s/repos/%d/pipeline/%d/%d", m.Sys.Link, m.Repo.ID, pipeline.Number, stepNumber) +} diff --git a/pipeline/frontend/metadata/types.go b/pipeline/frontend/metadata/types.go index ef17d57b21..48e0ed873d 100644 --- a/pipeline/frontend/metadata/types.go +++ b/pipeline/frontend/metadata/types.go @@ -29,6 +29,7 @@ type ( // Repo defines runtime metadata for a repository. Repo struct { + ID int64 `json:"id,omitempty"` Name string `json:"name,omitempty"` Owner string `json:"owner,omitempty"` RemoteID string `json:"remote_id,omitempty"` From 5d813bb477d99f2966166df53264f9b2bc41bf98 Mon Sep 17 00:00:00 2001 From: qwerty287 <80460567+qwerty287@users.noreply.github.com> Date: Sun, 12 Nov 2023 11:14:00 +0100 Subject: [PATCH 2/5] Update pipeline/frontend/metadata/environment.go Co-authored-by: Anbraten --- pipeline/frontend/metadata/environment.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipeline/frontend/metadata/environment.go b/pipeline/frontend/metadata/environment.go index ddfc344ba7..e5b9d5dc95 100644 --- a/pipeline/frontend/metadata/environment.go +++ b/pipeline/frontend/metadata/environment.go @@ -101,7 +101,7 @@ func (m *Metadata) Environ() map[string]string { "CI_PREV_PIPELINE_PARENT": strconv.FormatInt(m.Prev.Parent, 10), "CI_PREV_PIPELINE_EVENT": m.Prev.Event, "CI_PREV_PIPELINE_URL": m.getPipelineStatusLink(m.Prev, 0), - "CI_PREV_PIPELINE_FORGE_URL": m.Curr.Link, + "CI_PREV_PIPELINE_FORGE_URL": m.Prev.Link, "CI_PREV_PIPELINE_DEPLOY_TARGET": m.Prev.Target, "CI_PREV_PIPELINE_STATUS": m.Prev.Status, "CI_PREV_PIPELINE_CREATED": strconv.FormatInt(m.Prev.Created, 10), From affe1ea27a610794559a1be128e4bcbfe3b11d4b Mon Sep 17 00:00:00 2001 From: qwerty287 Date: Sun, 12 Nov 2023 11:17:54 +0100 Subject: [PATCH 3/5] fix tests & rename func --- pipeline/frontend/metadata/environment.go | 8 ++++---- pipeline/frontend/metadata_test.go | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pipeline/frontend/metadata/environment.go b/pipeline/frontend/metadata/environment.go index e5b9d5dc95..d043607b60 100644 --- a/pipeline/frontend/metadata/environment.go +++ b/pipeline/frontend/metadata/environment.go @@ -69,7 +69,7 @@ func (m *Metadata) Environ() map[string]string { "CI_PIPELINE_NUMBER": strconv.FormatInt(m.Curr.Number, 10), "CI_PIPELINE_PARENT": strconv.FormatInt(m.Curr.Parent, 10), "CI_PIPELINE_EVENT": m.Curr.Event, - "CI_PIPELINE_URL": m.getPipelineStatusLink(m.Curr, 0), + "CI_PIPELINE_URL": m.getPipelineWebURL(m.Curr, 0), "CI_PIPELINE_FORGE_URL": m.Curr.Link, "CI_PIPELINE_DEPLOY_TARGET": m.Curr.Target, "CI_PIPELINE_STATUS": m.Curr.Status, @@ -85,7 +85,7 @@ func (m *Metadata) Environ() map[string]string { "CI_STEP_STATUS": "", // will be set by agent "CI_STEP_STARTED": "", // will be set by agent "CI_STEP_FINISHED": "", // will be set by agent - "CI_STEP_URL": m.getPipelineStatusLink(m.Curr, m.Step.Number), + "CI_STEP_URL": m.getPipelineWebURL(m.Curr, m.Step.Number), "CI_PREV_COMMIT_SHA": m.Prev.Commit.Sha, "CI_PREV_COMMIT_REF": m.Prev.Commit.Ref, @@ -100,7 +100,7 @@ func (m *Metadata) Environ() map[string]string { "CI_PREV_PIPELINE_NUMBER": strconv.FormatInt(m.Prev.Number, 10), "CI_PREV_PIPELINE_PARENT": strconv.FormatInt(m.Prev.Parent, 10), "CI_PREV_PIPELINE_EVENT": m.Prev.Event, - "CI_PREV_PIPELINE_URL": m.getPipelineStatusLink(m.Prev, 0), + "CI_PREV_PIPELINE_URL": m.getPipelineWebURL(m.Prev, 0), "CI_PREV_PIPELINE_FORGE_URL": m.Prev.Link, "CI_PREV_PIPELINE_DEPLOY_TARGET": m.Prev.Target, "CI_PREV_PIPELINE_STATUS": m.Prev.Status, @@ -128,7 +128,7 @@ func (m *Metadata) Environ() map[string]string { return params } -func (m *Metadata) getPipelineStatusLink(pipeline Pipeline, stepNumber int) string { +func (m *Metadata) getPipelineWebURL(pipeline Pipeline, stepNumber int) string { if stepNumber == 0 { return fmt.Sprintf("%s/repos/%d/pipeline/%d", m.Sys.Link, m.Repo.ID, pipeline.Number) } diff --git a/pipeline/frontend/metadata_test.go b/pipeline/frontend/metadata_test.go index dbbbe67a78..7f6efd9b3a 100644 --- a/pipeline/frontend/metadata_test.go +++ b/pipeline/frontend/metadata_test.go @@ -75,13 +75,13 @@ func TestMetadataFromStruct(t *testing.T) { "CI_COMMIT_MESSAGE": "", "CI_COMMIT_PULL_REQUEST": "", "CI_COMMIT_PULL_REQUEST_LABELS": "", "CI_COMMIT_REF": "", "CI_COMMIT_REFSPEC": "", "CI_COMMIT_SHA": "", "CI_COMMIT_SOURCE_BRANCH": "", "CI_COMMIT_TAG": "", "CI_COMMIT_TARGET_BRANCH": "", "CI_COMMIT_URL": "", "CI_FORGE_TYPE": "", "CI_FORGE_URL": "", "CI_PIPELINE_CREATED": "0", "CI_PIPELINE_DEPLOY_TARGET": "", "CI_PIPELINE_EVENT": "", "CI_PIPELINE_FINISHED": "0", "CI_PIPELINE_NUMBER": "0", - "CI_PIPELINE_PARENT": "0", "CI_PIPELINE_STARTED": "0", "CI_PIPELINE_STATUS": "", "CI_PIPELINE_URL": "", + "CI_PIPELINE_PARENT": "0", "CI_PIPELINE_STARTED": "0", "CI_PIPELINE_STATUS": "", "CI_PIPELINE_URL": "/repos/0/pipeline/0", "CI_PIPELINE_FORGE_URL": "", "CI_PREV_COMMIT_AUTHOR": "", "CI_PREV_COMMIT_AUTHOR_AVATAR": "", "CI_PREV_COMMIT_AUTHOR_EMAIL": "", "CI_PREV_COMMIT_BRANCH": "", "CI_PREV_COMMIT_MESSAGE": "", "CI_PREV_COMMIT_REF": "", "CI_PREV_COMMIT_REFSPEC": "", "CI_PREV_COMMIT_SHA": "", "CI_PREV_COMMIT_URL": "", "CI_PREV_PIPELINE_CREATED": "0", "CI_PREV_PIPELINE_DEPLOY_TARGET": "", "CI_PREV_PIPELINE_EVENT": "", "CI_PREV_PIPELINE_FINISHED": "0", "CI_PREV_PIPELINE_NUMBER": "0", "CI_PREV_PIPELINE_PARENT": "0", - "CI_PREV_PIPELINE_STARTED": "0", "CI_PREV_PIPELINE_STATUS": "", "CI_PREV_PIPELINE_URL": "", "CI_REPO": "", "CI_REPO_CLONE_URL": "", "CI_REPO_CLONE_SSH_URL": "", "CI_REPO_DEFAULT_BRANCH": "", "CI_REPO_REMOTE_ID": "", + "CI_PREV_PIPELINE_STARTED": "0", "CI_PREV_PIPELINE_STATUS": "", "CI_PREV_PIPELINE_URL": "/repos/0/pipeline/0", "CI_PREV_PIPELINE_FORGE_URL": "", "CI_REPO": "", "CI_REPO_CLONE_URL": "", "CI_REPO_CLONE_SSH_URL": "", "CI_REPO_DEFAULT_BRANCH": "", "CI_REPO_REMOTE_ID": "", "CI_REPO_NAME": "", "CI_REPO_OWNER": "", "CI_REPO_PRIVATE": "false", "CI_REPO_SCM": "git", "CI_REPO_TRUSTED": "false", "CI_REPO_URL": "", "CI_STEP_FINISHED": "", - "CI_STEP_NAME": "", "CI_STEP_NUMBER": "0", "CI_STEP_STARTED": "", "CI_STEP_STATUS": "", "CI_SYSTEM_HOST": "", "CI_SYSTEM_NAME": "woodpecker", + "CI_STEP_NAME": "", "CI_STEP_NUMBER": "0", "CI_STEP_STARTED": "", "CI_STEP_STATUS": "", "CI_STEP_URL": "/repos/0/pipeline/0", "CI_SYSTEM_HOST": "", "CI_SYSTEM_NAME": "woodpecker", "CI_SYSTEM_PLATFORM": "", "CI_SYSTEM_URL": "", "CI_SYSTEM_VERSION": "", "CI_WORKFLOW_NAME": "", "CI_WORKFLOW_NUMBER": "0", }, }, @@ -107,14 +107,14 @@ func TestMetadataFromStruct(t *testing.T) { "CI_COMMIT_MESSAGE": "", "CI_COMMIT_PULL_REQUEST": "", "CI_COMMIT_PULL_REQUEST_LABELS": "", "CI_COMMIT_REF": "", "CI_COMMIT_REFSPEC": "", "CI_COMMIT_SHA": "", "CI_COMMIT_SOURCE_BRANCH": "", "CI_COMMIT_TAG": "", "CI_COMMIT_TARGET_BRANCH": "", "CI_COMMIT_URL": "", "CI_FORGE_TYPE": "gitea", "CI_FORGE_URL": "https://gitea.com", "CI_PIPELINE_CREATED": "0", "CI_PIPELINE_DEPLOY_TARGET": "", "CI_PIPELINE_EVENT": "", "CI_PIPELINE_FINISHED": "0", - "CI_PIPELINE_NUMBER": "3", "CI_PIPELINE_PARENT": "0", "CI_PIPELINE_STARTED": "0", "CI_PIPELINE_STATUS": "", "CI_PIPELINE_URL": "", + "CI_PIPELINE_NUMBER": "3", "CI_PIPELINE_PARENT": "0", "CI_PIPELINE_STARTED": "0", "CI_PIPELINE_STATUS": "", "CI_PIPELINE_URL": "https://example.com/repos/0/pipeline/3", "CI_PIPELINE_FORGE_URL": "", "CI_PREV_COMMIT_AUTHOR": "", "CI_PREV_COMMIT_AUTHOR_AVATAR": "", "CI_PREV_COMMIT_AUTHOR_EMAIL": "", "CI_PREV_COMMIT_BRANCH": "", "CI_PREV_COMMIT_MESSAGE": "", "CI_PREV_COMMIT_REF": "", "CI_PREV_COMMIT_REFSPEC": "", "CI_PREV_COMMIT_SHA": "", "CI_PREV_COMMIT_URL": "", "CI_PREV_PIPELINE_CREATED": "0", "CI_PREV_PIPELINE_DEPLOY_TARGET": "", "CI_PREV_PIPELINE_EVENT": "", "CI_PREV_PIPELINE_FINISHED": "0", "CI_PREV_PIPELINE_NUMBER": "2", "CI_PREV_PIPELINE_PARENT": "0", - "CI_PREV_PIPELINE_STARTED": "0", "CI_PREV_PIPELINE_STATUS": "", "CI_PREV_PIPELINE_URL": "", "CI_REPO": "testUser/testRepo", "CI_REPO_CLONE_URL": "https://gitea.com/testUser/testRepo.git", "CI_REPO_CLONE_SSH_URL": "git@gitea.com:testUser/testRepo.git", + "CI_PREV_PIPELINE_STARTED": "0", "CI_PREV_PIPELINE_STATUS": "", "CI_PREV_PIPELINE_URL": "https://example.com/repos/0/pipeline/2", "CI_PREV_PIPELINE_FORGE_URL": "", "CI_REPO": "testUser/testRepo", "CI_REPO_CLONE_URL": "https://gitea.com/testUser/testRepo.git", "CI_REPO_CLONE_SSH_URL": "git@gitea.com:testUser/testRepo.git", "CI_REPO_DEFAULT_BRANCH": "main", "CI_REPO_NAME": "testRepo", "CI_REPO_OWNER": "testUser", "CI_REPO_PRIVATE": "true", "CI_REPO_REMOTE_ID": "", "CI_REPO_SCM": "git", "CI_REPO_TRUSTED": "false", "CI_REPO_URL": "https://gitea.com/testUser/testRepo", "CI_STEP_FINISHED": "", - "CI_STEP_NAME": "", "CI_STEP_NUMBER": "0", "CI_STEP_STARTED": "", "CI_STEP_STATUS": "", "CI_SYSTEM_HOST": "example.com", + "CI_STEP_NAME": "", "CI_STEP_NUMBER": "0", "CI_STEP_STARTED": "", "CI_STEP_STATUS": "", "CI_STEP_URL": "https://example.com/repos/0/pipeline/3", "CI_SYSTEM_HOST": "example.com", "CI_SYSTEM_NAME": "woodpecker", "CI_SYSTEM_PLATFORM": "", "CI_SYSTEM_URL": "https://example.com", "CI_SYSTEM_VERSION": "", "CI_WORKFLOW_NAME": "hello", "CI_WORKFLOW_NUMBER": "0", }, }, From a94e5df2da6f7a722f68a01fc70a0c3acf7ae0c9 Mon Sep 17 00:00:00 2001 From: qwerty287 Date: Mon, 13 Nov 2023 08:44:10 +0100 Subject: [PATCH 4/5] deprecate commit_url --- docs/docs/20-usage/50-environment.md | 2 -- docs/docs/91-migrations.md | 1 + pipeline/frontend/metadata/environment.go | 4 +++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/docs/20-usage/50-environment.md b/docs/docs/20-usage/50-environment.md index aee081f472..7be337bc0a 100644 --- a/docs/docs/20-usage/50-environment.md +++ b/docs/docs/20-usage/50-environment.md @@ -71,7 +71,6 @@ This is the reference list of all environment variables available to your pipeli | `CI_COMMIT_TAG` | commit tag name (empty if event is not `tag`) | | `CI_COMMIT_PULL_REQUEST` | commit pull request number (empty if event is not `pull_request`) | | `CI_COMMIT_PULL_REQUEST_LABELS` | labels assigned to pull request (empty if event is not `pull_request`) | -| `CI_COMMIT_URL` | commit link in forge | | `CI_COMMIT_MESSAGE` | commit message | | `CI_COMMIT_AUTHOR` | commit author username | | `CI_COMMIT_AUTHOR_EMAIL` | commit author email address | @@ -80,7 +79,6 @@ This is the reference list of all environment variables available to your pipeli | `CI_PIPELINE_NUMBER` | pipeline number | | `CI_PIPELINE_PARENT` | number of parent pipeline | | `CI_PIPELINE_EVENT` | pipeline event (push, pull_request, tag, deployment) | -| `CI_PIPELINE_URL` | link to the web UI for the pipeline | | `CI_PIPELINE_FORGE_URL` | link to the forge's web UI for the commit(s) or tag that triggered the pipeline | | `CI_PIPELINE_DEPLOY_TARGET` | pipeline deploy target for `deployment` events (ie production) | | `CI_PIPELINE_STATUS` | pipeline status (success, failure) | diff --git a/docs/docs/91-migrations.md b/docs/docs/91-migrations.md index 93aee0012d..fbb760518e 100644 --- a/docs/docs/91-migrations.md +++ b/docs/docs/91-migrations.md @@ -12,6 +12,7 @@ Some versions need some changes to the server configuration or the pipeline conf - Removed `ssh` backend. Use an agent directly on the SSH machine using the `local` backend. - Removed `/hook` and `/stream` API paths in favor of `/api/(hook|stream)`. You may need to use the "Repair repository" button in the repo settings or "Repair all" in the admin settings to recreate the forge hook. - Removed `WOODPECKER_DOCS` config variable +- Deprecated `CI_COMMIT_URL` env var, use `CI_PIPELINE_FORGE_URL` ## 1.0.0 diff --git a/pipeline/frontend/metadata/environment.go b/pipeline/frontend/metadata/environment.go index d043607b60..c3dce33be4 100644 --- a/pipeline/frontend/metadata/environment.go +++ b/pipeline/frontend/metadata/environment.go @@ -57,7 +57,6 @@ func (m *Metadata) Environ() map[string]string { "CI_COMMIT_BRANCH": m.Curr.Commit.Branch, "CI_COMMIT_SOURCE_BRANCH": sourceBranch, "CI_COMMIT_TARGET_BRANCH": targetBranch, - "CI_COMMIT_URL": m.Curr.Link, "CI_COMMIT_MESSAGE": m.Curr.Commit.Message, "CI_COMMIT_AUTHOR": m.Curr.Commit.Author.Name, "CI_COMMIT_AUTHOR_EMAIL": m.Curr.Commit.Author.Email, @@ -116,6 +115,9 @@ func (m *Metadata) Environ() map[string]string { "CI_FORGE_TYPE": m.Forge.Type, "CI_FORGE_URL": m.Forge.URL, + + // TODO Deprecated, remove in 3.x + "CI_COMMIT_URL": m.Curr.Link, } if m.Curr.Event == EventTag { params["CI_COMMIT_TAG"] = strings.TrimPrefix(m.Curr.Commit.Ref, "refs/tags/") From 6f56817d604fc6c287193a21650275bc9a5d0abe Mon Sep 17 00:00:00 2001 From: qwerty287 Date: Mon, 13 Nov 2023 09:24:32 +0100 Subject: [PATCH 5/5] fix docs --- docs/docs/20-usage/50-environment.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/docs/20-usage/50-environment.md b/docs/docs/20-usage/50-environment.md index 7be337bc0a..306b0a651a 100644 --- a/docs/docs/20-usage/50-environment.md +++ b/docs/docs/20-usage/50-environment.md @@ -79,6 +79,7 @@ This is the reference list of all environment variables available to your pipeli | `CI_PIPELINE_NUMBER` | pipeline number | | `CI_PIPELINE_PARENT` | number of parent pipeline | | `CI_PIPELINE_EVENT` | pipeline event (push, pull_request, tag, deployment) | +| `CI_PIPELINE_URL` | link to the web UI for the pipeline | | `CI_PIPELINE_FORGE_URL` | link to the forge's web UI for the commit(s) or tag that triggered the pipeline | | `CI_PIPELINE_DEPLOY_TARGET` | pipeline deploy target for `deployment` events (ie production) | | `CI_PIPELINE_STATUS` | pipeline status (success, failure) |