variables: CONTAINER_CLIENT_IMAGE: debian:buster CONTAINER_TEST_NAME: squid CONTAINER_BUILD_NOPROD_NAME_ARM: $HUB_REGISTRY_IMAGE:build-noprod-arm SQUID_VERSION: '"$SQUID_VERSION"' docker-hub-build-arm: stage: Docker-hub-build image: docker:dind tags: - arm artifacts: expire_in: 2 days timeout: 3 days before_script: - docker login -u "$DOCKER_HUB_USER" -p "$DOCKER_HUB_TOKEN" $DOCKER_HUB_REGISTRY script: - cd $CI_PROJECT_DIR - apk add --no-cache curl - export SQUID_VERSION=$(curl -s http://www.squid-cache.org/Versions/v4/ | egrep -m 1 -oh squid-.*.tar.gz | cut -d '"' -f1) - docker build -f Dockerfile.arm --build-arg SQUID_VERSION=$SQUID_VERSION --pull -t $CONTAINER_BUILD_NOPROD_NAME_ARM . - docker push $CONTAINER_BUILD_NOPROD_NAME_ARM .services: services: - name: $CONTAINER_BUILD_NOPROD_NAME alias: squid image: $CONTAINER_CLIENT_IMAGE docker-hub-test-arm: stage: Docker-hub-test extends: .services tags: - arm artifacts: script: - apt update && apt install -y curl - export https_proxy=http://$CONTAINER_TEST_NAME:3128 && curl -k https://www.google.fr variables: HOSTNAME: squidpipeline needs: ["docker-hub-build-arm"] push-docker-hub-arm: stage: Docker-hub-pushtag image: docker:dind tags: - arm artifacts: before_script: - docker login -u "$DOCKER_HUB_USER" -p "$DOCKER_HUB_TOKEN" $DOCKER_HUB_REGISTRY script: - apk add --no-cache curl - docker pull $CONTAINER_BUILD_NOPROD_NAME - export SQUID_VERSION=$(curl -s http://www.squid-cache.org/Versions/v4/ | egrep -m 1 -oh squid-.*.tar.gz | cut -d '"' -f1 | sed 's/\.tar\.gz//g') - docker tag $CONTAINER_BUILD_NOPROD_NAME_ARM $HUB_REGISTRY_IMAGE:$SQUID_VERSION-arm - docker push $HUB_REGISTRY_IMAGE:$SQUID_VERSION-arm variables: GIT_STRATEGY: none needs: ["docker-hub-test-arm"]