logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://anongit.hacktivis.me/git/pleroma.git/
commit: 0151d99202749b5ccfe01beda3704e40b0f52548
parent 490a273dc1429fe2ae4ca9b8ad4eb12f4b92860d
Author: Ekaterina Vaartis <vaartis@kotobank.ch>
Date:   Wed, 18 Jun 2025 17:36:08 +0300

Use manually created variables for CI instead of CI_JOB_TOKEN

For protected branches, it seems now just CI_JOB_TOKEN is not enough.

https://gitlab.com/gitlab-org/gitlab-foss/-/issues/36898#note_38415655

According to this, the CI_JOB_TOKEN is based on whoever created the
job and creating a pipeline on a protected branch requires special
permissions. Somehow this still did not work for other people who
merged, even though they had access to the docs repo.

Diffstat:

M.gitlab-ci.yml4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml @@ -208,7 +208,7 @@ docs-deploy: before_script: - apk add curl script: - - curl --fail-with-body -X POST -F"token=$CI_JOB_TOKEN" -F'ref=master' -F"variables[BRANCH]=$CI_COMMIT_REF_NAME" https://git.pleroma.social/api/v4/projects/673/trigger/pipeline + - curl --fail-with-body -X POST -F"token=$DOCS_PIPELINE_TRIGGER" -F'ref=master' -F"variables[BRANCH]=$CI_COMMIT_REF_NAME" https://git.pleroma.social/api/v4/projects/673/trigger/pipeline review_app: image: alpine:3.9 stage: deploy @@ -249,7 +249,7 @@ spec-deploy: before_script: - apk add curl script: - - curl --fail-with-body -X POST -F"token=$CI_JOB_TOKEN" -F'ref=master' -F"variables[BRANCH]=$CI_COMMIT_REF_NAME" -F"variables[JOB_REF]=$CI_JOB_ID" https://git.pleroma.social/api/v4/projects/1130/trigger/pipeline + - curl --fail-with-body -X POST -F"token=$API_DOCS_PIPELINE_TRIGGER" -F'ref=master' -F"variables[BRANCH]=$CI_COMMIT_REF_NAME" -F"variables[JOB_REF]=$CI_JOB_ID" https://git.pleroma.social/api/v4/projects/1130/trigger/pipeline stop_review_app: