Commit 856dc00a authored by Benjamin Tissoires's avatar Benjamin Tissoires
Browse files

ci-fairy: allow to fetch private dependent repos



Right now ci-fairy assumes that remotes are public.
However, we can pass the CI_JOB_TOKEN to retrieve
private upstream projects.
Signed-off-by: Benjamin Tissoires's avatarBenjamin Tissoires <benjamin.tissoires@gmail.com>
parent f830873d
Pipeline #278638 passed with stages
in 1 minute and 56 seconds
...@@ -166,7 +166,7 @@ ci-fairy images: ...@@ -166,7 +166,7 @@ ci-fairy images:
.ci-fairy-tag: .ci-fairy-tag:
variables: variables:
FDO_DISTRIBUTION_TAG: sha256-b76681d87ea9b06907f7828206a1f99d06a9821dc86c797768736b28509e32b5 FDO_DISTRIBUTION_TAG: sha256-41ee4d1ca15ea24c7d171a573fab18538561e526253b742b8172dd7a6412035f
.ci-fairy-local-image: .ci-fairy-local-image:
extends: extends:
...@@ -307,7 +307,7 @@ test published images: ...@@ -307,7 +307,7 @@ test published images:
script: script:
- skopeo inspect docker://quay.io/freedesktop.org/ci-templates:buildah-aarch64-2020-12-18.2 - skopeo inspect docker://quay.io/freedesktop.org/ci-templates:buildah-aarch64-2020-12-18.2
- skopeo inspect docker://quay.io/freedesktop.org/ci-templates:buildah-x86_64-2020-12-18.2 - skopeo inspect docker://quay.io/freedesktop.org/ci-templates:buildah-x86_64-2020-12-18.2
- skopeo inspect docker://quay.io/freedesktop.org/ci-templates:ci-fairy-sha256-b76681d87ea9b06907f7828206a1f99d06a9821dc86c797768736b28509e32b5 - skopeo inspect docker://quay.io/freedesktop.org/ci-templates:ci-fairy-sha256-41ee4d1ca15ea24c7d171a573fab18538561e526253b742b8172dd7a6412035f
- skopeo inspect docker://quay.io/freedesktop.org/ci-templates:qemu-base-x86_64-2021-02-15.0 - skopeo inspect docker://quay.io/freedesktop.org/ci-templates:qemu-base-x86_64-2021-02-15.0
- skopeo inspect docker://quay.io/freedesktop.org/ci-templates:qemu-mkosi-base-x86_64-2021-02-15.0 - skopeo inspect docker://quay.io/freedesktop.org/ci-templates:qemu-mkosi-base-x86_64-2021-02-15.0
rules: rules:
......
...@@ -23,7 +23,7 @@ ci-fairy-base-image: ...@@ -23,7 +23,7 @@ ci-fairy-base-image:
.ci-fairy-tag: .ci-fairy-tag:
variables: variables:
FDO_DISTRIBUTION_TAG: sha256-b76681d87ea9b06907f7828206a1f99d06a9821dc86c797768736b28509e32b5 FDO_DISTRIBUTION_TAG: sha256-41ee4d1ca15ea24c7d171a573fab18538561e526253b742b8172dd7a6412035f
# The actual ci-fairy image with ci-fairy installed # The actual ci-fairy image with ci-fairy installed
# This image uses the sha of the ci-fairy script itself as tag. # This image uses the sha of the ci-fairy script itself as tag.
......
...@@ -31,6 +31,6 @@ ...@@ -31,6 +31,6 @@
# Variables provided by this template should be considered read-only. # Variables provided by this template should be considered read-only.
# #
.fdo.ci-fairy: .fdo.ci-fairy:
image: quay.io/freedesktop.org/ci-templates:ci-fairy-sha256-b76681d87ea9b06907f7828206a1f99d06a9821dc86c797768736b28509e32b5 image: quay.io/freedesktop.org/ci-templates:ci-fairy-sha256-41ee4d1ca15ea24c7d171a573fab18538561e526253b742b8172dd7a6412035f
variables: variables:
FDO_DISTRIBUTION_IMAGE: quay.io/freedesktop.org/ci-templates:ci-fairy-sha256-b76681d87ea9b06907f7828206a1f99d06a9821dc86c797768736b28509e32b5 FDO_DISTRIBUTION_IMAGE: quay.io/freedesktop.org/ci-templates:ci-fairy-sha256-41ee4d1ca15ea24c7d171a573fab18538561e526253b742b8172dd7a6412035f
\ No newline at end of file \ No newline at end of file
...@@ -1065,7 +1065,8 @@ def check_commits(ctx, commit_range, branch, signed_off_by, textwidth, rules_fil ...@@ -1065,7 +1065,8 @@ def check_commits(ctx, commit_range, branch, signed_off_by, textwidth, rules_fil
logger.warning('$FDO_UPSTREAM_REPO not set, using local branches to compare') logger.warning('$FDO_UPSTREAM_REPO not set, using local branches to compare')
upstream = os.getenv('CI_PROJECT_PATH') upstream = os.getenv('CI_PROJECT_PATH')
host = os.getenv('CI_SERVER_HOST') host = os.getenv('CI_SERVER_HOST')
url = f'https://{host}/{upstream}' token = os.getenv('CI_JOB_TOKEN')
url = f'https://gitlab-ci-token:{token}@{host}/{upstream}'
remote = 'cifairy' remote = 'cifairy'
if remote not in repo.remotes: if remote not in repo.remotes:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment