diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml index 1a83a4cb..88425419 100644 --- a/.github/workflows/build-test.yaml +++ b/.github/workflows/build-test.yaml @@ -27,7 +27,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Build image - run: ${{ matrix.docker }} build -t local/freeipa-server:${{ matrix.os }} -f Dockerfile.${{ matrix.os }} . + run: ${{ matrix.docker }} build -t localhost/freeipa-server:${{ matrix.os }} -f Dockerfile.${{ matrix.os }} . - name: File issue if building image failed if: ${{ failure() && github.event_name == 'schedule' }} run: | @@ -44,9 +44,9 @@ jobs: - name: Create directory for artifacts run: mkdir freeipa-server-${{ matrix.os }} - name: Save image - run: ${{ matrix.docker }} save local/freeipa-server:${{ matrix.os }} | gzip > freeipa-server-${{ matrix.os }}/freeipa-server-${{ matrix.os }}.tar.gz + run: ${{ matrix.docker }} save localhost/freeipa-server:${{ matrix.os }} | gzip > freeipa-server-${{ matrix.os }}/freeipa-server-${{ matrix.os }}.tar.gz - name: Get FreeIPA version - run: ${{ matrix.docker }} run --rm --entrypoint rpm local/freeipa-server:${{ matrix.os }} -qf --qf '%{version}\n' /usr/sbin/ipa-server-install > freeipa-server-${{ matrix.os }}/freeipa-server-${{ matrix.os }}.version + run: ${{ matrix.docker }} run --rm --entrypoint rpm localhost/freeipa-server:${{ matrix.os }} -qf --qf '%{version}\n' /usr/sbin/ipa-server-install > freeipa-server-${{ matrix.os }}/freeipa-server-${{ matrix.os }}.version - uses: actions/upload-artifact@v2 with: name: freeipa-server-${{ matrix.os }} @@ -74,7 +74,7 @@ jobs: if: ${{ matrix.protected_regular == 'unset' }} run: sudo sysctl fs.protected_regular=0 - name: Run master and replica - run: readonly=${{ matrix.readonly }} ca=${{ matrix.ca }} seccomp=${{ matrix.seccomp }} replica=${{ matrix.replica }} tests/run-master-and-replica.sh local/freeipa-server:${{ matrix.os }} + run: readonly=${{ matrix.readonly }} ca=${{ matrix.ca }} seccomp=${{ matrix.seccomp }} replica=${{ matrix.replica }} tests/run-master-and-replica.sh localhost/freeipa-server:${{ matrix.os }} - name: Run partial tests if: ${{ failure() }} run: tests/run-partial-tests.sh Dockerfile.${{ matrix.os }} @@ -97,7 +97,7 @@ jobs: - name: Load image run: gunzip < freeipa-server-${{ matrix.os }}.tar.gz | sudo podman load - name: Run master and replica - run: docker='sudo podman' tests/run-master-and-replica.sh local/freeipa-server:${{ matrix.os }} + run: docker='sudo podman' tests/run-master-and-replica.sh localhost/freeipa-server:${{ matrix.os }} - name: Run partial tests if: ${{ failure() }} run: docker='sudo podman' tests/run-partial-tests.sh Dockerfile.${{ matrix.os }} @@ -123,7 +123,7 @@ jobs: run: ssh-keygen -f ~/.ssh/id_rsa && cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys && chmod 400 ~/.ssh/authorized_keys && chmod o-w ~ - name: Run master shell: ssh -o StrictHostKeyChecking=no localhost bash {0} - run: cd ${{ github.workspace }} && docker=podman tests/run-master-and-replica.sh local/freeipa-server:${{ matrix.os }} && podman pod ls -q | xargs podman pod rm -f + run: cd ${{ github.workspace }} && docker=podman tests/run-master-and-replica.sh localhost/freeipa-server:${{ matrix.os }} && podman pod ls -q | xargs podman pod rm -f - name: Run partial tests if: ${{ failure() }} shell: ssh localhost bash {0} @@ -149,7 +149,7 @@ jobs: - name: Populate volume with data run: docker volume create loaded-data && docker create --name loaded-data -v loaded-data:/data:z docker.io/freeipa/freeipa-server:data-${{ matrix.data-from }} noop && mkdir /tmp/freeipa-data && docker run --volumes-from loaded-data -v /tmp/freeipa-data:/data-out:z --rm docker.io/library/busybox sh -c 'cd /data && cp -a . /data-out' - name: Run master and replica - run: VOLUME=/tmp/freeipa-data replica=none tests/run-master-and-replica.sh local/freeipa-server:${{ matrix.os }} + run: VOLUME=/tmp/freeipa-data replica=none tests/run-master-and-replica.sh localhost/freeipa-server:${{ matrix.os }} test-k3s: name: Run with K3s @@ -167,7 +167,7 @@ jobs: - name: Unzip the image run: gunzip freeipa-server-${{ matrix.os }}.tar.gz - name: Run K3s and master in it - run: tests/run-master-in-k3s.sh local/freeipa-server:${{ matrix.os }} freeipa-server-${{ matrix.os }}.tar + run: tests/run-master-in-k3s.sh localhost/freeipa-server:${{ matrix.os }} freeipa-server-${{ matrix.os }}.tar push-after-success: name: Push images to registries diff --git a/tests/freeipa-k3s.yaml b/tests/freeipa-k3s.yaml index 802fc418..b6364e74 100644 --- a/tests/freeipa-k3s.yaml +++ b/tests/freeipa-k3s.yaml @@ -56,7 +56,7 @@ spec: restartPolicy: Never containers: - name: freeipa-server - image: local/freeipa-server:latest + image: localhost/freeipa-server:latest imagePullPolicy: Never volumeMounts: - name: freeipa-server-data diff --git a/tests/run-partial-tests.sh b/tests/run-partial-tests.sh index 2db324ff..a7ad35be 100755 --- a/tests/run-partial-tests.sh +++ b/tests/run-partial-tests.sh @@ -49,19 +49,19 @@ while [ "$START" -lt "$END" ] ; do echo "# This line is commented out to match line count" > "$DOCKERFILE.part" sed -n "$SED_TO_NEXT_TEST" "$DOCKERFILE" >> "$DOCKERFILE.part" else - echo "FROM local/freeipa-server-test:$SUFFIX" > "$DOCKERFILE.part" + echo "FROM localhost/freeipa-server-test:$SUFFIX" > "$DOCKERFILE.part" sed -n "1,${START}{s/^/## /;p;d};$SED_TO_NEXT_TEST" "$DOCKERFILE" >> "$DOCKERFILE.part" fi TEST_SCRIPT=$( sed -n '$s/^# test:\s*//;T;s/\( \|$\)/ 'freeipa-server-container-$SUFFIX' /;p' "$DOCKERFILE.part" ) if [ -n "$TEST_SCRIPT" ] ; then - $docker build -t "local/freeipa-server-test:$SUFFIX" -f "$DOCKERFILE.part" . - echo "FROM local/freeipa-server-test:$SUFFIX" > "$DOCKERFILE.part.addons" + $docker build -t "localhost/freeipa-server-test:$SUFFIX" -f "$DOCKERFILE.part" . + echo "FROM localhost/freeipa-server-test:$SUFFIX" > "$DOCKERFILE.part.addons" sed -n 's/# test-addon:\s*//;T;p' "$DOCKERFILE.part" >> "$DOCKERFILE.part.addons" - $docker build -t "local/freeipa-server-test-addons:$SUFFIX" -f "$DOCKERFILE.part.addons" . + $docker build -t "localhost/freeipa-server-test-addons:$SUFFIX" -f "$DOCKERFILE.part.addons" . $docker rm -f freeipa-server-container-$SUFFIX > /dev/null 2>&1 || : # Starting systemd container - run_and_wait_for local/freeipa-server-test-addons:$SUFFIX freeipa-server-container-$SUFFIX + run_and_wait_for localhost/freeipa-server-test-addons:$SUFFIX freeipa-server-container-$SUFFIX echo Executing $DIR/$TEST_SCRIPT $DIR/$TEST_SCRIPT else