From abdad0e1d58246f2c4275e27e88a1594666a0aa5 Mon Sep 17 00:00:00 2001
From: Alexander Wellbrock <a.wellbrock@mailbox.org>
Date: Tue, 12 Jan 2021 23:44:18 +0100
Subject: [PATCH] fix before_script execution order

First install podman, then use it.
---
 gitlab-ci-template.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gitlab-ci-template.yml b/gitlab-ci-template.yml
index ef86030..5d95f49 100644
--- a/gitlab-ci-template.yml
+++ b/gitlab-ci-template.yml
@@ -13,12 +13,12 @@ variables:
     variables: true
   image: docker.io/library/fedora:32
   before_script:
-    - podman login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
-    - export BUILD_DATE="$(date --rfc-3339 ns)"
     - dnf -y upgrade
     - dnf -y install podman buildah findutils git
     - sed -e 's/.* cgroup_manager =.*/cgroup_manager = "cgroupfs"/' /usr/share/containers/containers.conf > /etc/containers/containers.conf \
     - /resources/shell-tools/install.sh
+    - podman login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
+    - export BUILD_DATE="$(date --rfc-3339 ns)"
   script:
     - si-fix "${CI_REGISTRY_BUILD_DOCKERFILE:-./Dockerfile}"
     - podman build --pull 
-- 
GitLab