[v2,5/5] CI: remove podman login
Knop, Ryszard
ryszard.knop at intel.com
Wed Jun 11 12:34:10 UTC 2025
Reviewed-by: Ryszard Knop <ryszard.knop at intel.com>
On Wed, 2025-06-11 at 13:06 +0200, Andrzej Hajda wrote:
> "podman login" is issued for every container job even if it is usually
> not required. Let's drop it in favor of credentials provided
> to commands requiring it.
>
> Signed-off-by: Andrzej Hajda <andrzej.hajda at intel.com>
> ---
> .gitlab-ci.yml | 5 -----
> .gitlab-ci/pull-or-rebuild.sh | 4 ++--
> 2 files changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> index ab6968b549d0026869fe38f063f60f57b5e9d75c..519edab5ff9c79eae0de71e71e3f3645431a1459 100644
> --- a/.gitlab-ci.yml
> +++ b/.gitlab-ci.yml
> @@ -48,7 +48,6 @@ build-containers:build-debian:
> stage: build-containers
> image: $BUILD_CONTAINERS_IMAGE
> script:
> - - podman login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
> - .gitlab-ci/pull-or-rebuild.sh base Dockerfile.build-debian-minimal build-debian-minimal
> - .gitlab-ci/pull-or-rebuild.sh base Dockerfile.build-debian build-debian
>
> @@ -56,21 +55,18 @@ build-containers:build-debian-armhf:
> stage: build-containers
> image: $BUILD_CONTAINERS_IMAGE
> script:
> - - podman login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
> - .gitlab-ci/pull-or-rebuild.sh base Dockerfile.build-debian-armhf build-debian-armhf
>
> build-containers:build-debian-arm64:
> stage: build-containers
> image: $BUILD_CONTAINERS_IMAGE
> script:
> - - podman login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
> - .gitlab-ci/pull-or-rebuild.sh base Dockerfile.build-debian-arm64 build-debian-arm64
>
> build-containers:build-fedora:
> stage: build-containers
> image: $BUILD_CONTAINERS_IMAGE
> script:
> - - podman login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
> - .gitlab-ci/pull-or-rebuild.sh base Dockerfile.build-fedora build-fedora
>
> #################### BUILD #########################
> @@ -263,5 +259,4 @@ containers:igt:
> variables:
> FORCE_REBUILD: 1
> script:
> - - podman login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
> - .gitlab-ci/pull-or-rebuild.sh igt Dockerfile igt
> diff --git a/.gitlab-ci/pull-or-rebuild.sh b/.gitlab-ci/pull-or-rebuild.sh
> index 4f77431b52b06fd5971b47ea1aadcf0e85e4edad..aa1bddcde88d927a892501071dc848a36b2f2f85 100755
> --- a/.gitlab-ci/pull-or-rebuild.sh
> +++ b/.gitlab-ci/pull-or-rebuild.sh
> @@ -47,7 +47,7 @@ if [ "$TYPE" = "base" ]; then
> else
> echo "Building!"
> $PODMAN_BUILD --squash -t $DOCKERNAME -f $DOCKERFILE .
> - podman push $DOCKERNAME
> + podman push --creds $CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD $DOCKERNAME
> fi
>
> skopeo copy --dest-creds $CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD \
> @@ -57,7 +57,7 @@ elif [ "$TYPE" = "igt" ]; then
> # we always rebuild
> set -e
> $PODMAN_BUILD -t $COMMITNAME -f $DOCKERFILE .
> - podman push $COMMITNAME
> + podman push --creds $CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD $COMMITNAME
> skopeo copy --dest-creds $CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD \
> docker://$COMMITNAME docker://$REFNAME
> else
More information about the igt-dev
mailing list