mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 15:05:23 +00:00
Merge branch 'nicki/use-bind-team-gitlab-tokens' into 'main'
Use bind-team tokens for CI gitlab access See merge request isc-projects/bind9!9067
This commit is contained in:
@@ -619,8 +619,6 @@ danger:
|
|||||||
only:
|
only:
|
||||||
refs:
|
refs:
|
||||||
- merge_requests
|
- merge_requests
|
||||||
variables:
|
|
||||||
- $DANGER_GITLAB_API_TOKEN
|
|
||||||
|
|
||||||
checkbashisms:
|
checkbashisms:
|
||||||
<<: *precheck_job
|
<<: *precheck_job
|
||||||
@@ -2012,7 +2010,7 @@ backports:
|
|||||||
GIT_DEPTH: 200
|
GIT_DEPTH: 200
|
||||||
script:
|
script:
|
||||||
# CI job token is not sufficient for push operations
|
# CI job token is not sufficient for push operations
|
||||||
- git remote get-url origin | sed -e "s/gitlab-ci-token:$CI_JOB_TOKEN/oauth2:$BACKPORT_GITLAB_API_TOKEN/" | xargs git remote set-url --push origin
|
- git remote get-url origin | sed -e "s/gitlab-ci-token:$CI_JOB_TOKEN/oauth2:$BIND_TEAM_WRITE_TOKEN/" | xargs git remote set-url --push origin
|
||||||
# force-pushing is disabled so we have to have merge request on top
|
# force-pushing is disabled so we have to have merge request on top
|
||||||
- MERGE_REQUEST_ID="$(git log -1 --format='%b' | sed --silent -e 's/^See merge request [^!]\+!//p')"
|
- MERGE_REQUEST_ID="$(git log -1 --format='%b' | sed --silent -e 's/^See merge request [^!]\+!//p')"
|
||||||
- git clone --depth 1 https://gitlab.isc.org/isc-projects/bind9-qa.git
|
- git clone --depth 1 https://gitlab.isc.org/isc-projects/bind9-qa.git
|
||||||
|
@@ -58,7 +58,7 @@ is_full_backport = is_backport and "Backport::Partial" not in mr_labels
|
|||||||
|
|
||||||
gl = gitlab.Gitlab(
|
gl = gitlab.Gitlab(
|
||||||
url=f"https://{os.environ['CI_SERVER_HOST']}",
|
url=f"https://{os.environ['CI_SERVER_HOST']}",
|
||||||
private_token=os.environ["DANGER_GITLAB_API_TOKEN"],
|
private_token=os.environ["BIND_TEAM_API_TOKEN"],
|
||||||
)
|
)
|
||||||
proj = gl.projects.get(os.environ["CI_PROJECT_ID"])
|
proj = gl.projects.get(os.environ["CI_PROJECT_ID"])
|
||||||
mr = proj.mergerequests.get(os.environ["CI_MERGE_REQUEST_IID"])
|
mr = proj.mergerequests.get(os.environ["CI_MERGE_REQUEST_IID"])
|
||||||
|
Reference in New Issue
Block a user