gitlab CI: fix skopeo copy
authorPeter Hutterer <peter.hutterer@who-t.net>
Wed, 11 Dec 2019 05:02:43 +0000 (15:02 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Wed, 11 Dec 2019 05:29:11 +0000 (15:29 +1000)
skopeo doesn't handle the destination credentials correctly

See ci-templates commit 0a9bdd33a98f05af6761ab118b5074952242aab0

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
.gitlab-ci.yml

index 3999d627a223f1251f25bea38b68ae7bee40a592..bea3cc727485717ec5fd392e85ed356069b28b02 100644 (file)
@@ -166,8 +166,9 @@ check-commit:
     # force rebuild if schedule, reuse otherwise
     - if [[ $CI_PIPELINE_SOURCE == "schedule" ]] ; then touch .scheduled; fi
     # pull the latest upstream image if it exists
-    - test -e .scheduled || skopeo copy docker://$CI_REGISTRY/$UPSTREAM_REPO/$IMAGE
-                  docker://$CI_REGISTRY_IMAGE/$IMAGE && exit 0 || true ;
+    - test -e .scheduled || skopeo copy --dest-creds $CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD
+                                 docker://$CI_REGISTRY/$UPSTREAM_REPO/$IMAGE
+                                 docker://$CI_REGISTRY_IMAGE/$IMAGE && exit 0 || true ;
 
     # check if our image is already in the current registry
     - test -e .scheduled || skopeo inspect docker://$CI_REGISTRY_IMAGE/$IMAGE > /dev/null && exit 0 || true ;
@@ -291,7 +292,9 @@ alpine:latest@container-prep:
 
     # push the container image to the libinput registry
     - podman push --quiet $FREEBSD_CONTAINER_IMAGE
-    - skopeo copy docker://$FREEBSD_CONTAINER_IMAGE docker://$CI_REGISTRY_IMAGE/freebsd/$FREEBSD_VERSION:$CI_JOB_ID
+    - skopeo copy --dest-creds $CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD
+        docker://$FREEBSD_CONTAINER_IMAGE
+        docker://$CI_REGISTRY_IMAGE/freebsd/$FREEBSD_VERSION:$CI_JOB_ID
 
 freebsd:11.2@container-prep:
   extends: