--- stages: - test - build - deploy test: image: $CI_REGISTRY/immerda/container-images/ruby/gpg:2.7 tags: - container script: - yum install -y rh-ruby27-ruby-devel openssl-devel gcc gcc-c++ bzip2 make tar - bundle install --jobs $(nproc) - bundle exec rspec build_image: stage: build tags: - buildah script: - ./buildah.sh - podman save wkd-srv --output wkd-srv.tar; artifacts: expire_in: 1 day paths: - wkd-srv.tar deploy_image: stage: deploy tags: - buildah script: - export USERPASS="$( echo -n "$CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD" | base64 )" - | echo "{\"auths\": {\"$CI_REGISTRY\": {\"auth\": \"$USERPASS\"}}}" \ > cred.json - echo "Pushing wkd-srv-$CI_COMMIT_SHORT_SHA" - skopeo copy --authfile ./cred.json "docker-archive:wkd-srv.tar" "docker://$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA" - echo -e "\033[0;32mdone\033[0m"; - | if [ "${CI_COMMIT_REF_NAME}" = "master" ]; then echo "Pushing wkd-srv:latest" skopeo copy --authfile ./cred.json "docker-archive:wkd-srv.tar" "docker://$CI_REGISTRY_IMAGE:latest" echo -e "\033[0;32mdone\033[0m"; fi - rm -f cred.json