Commit d011c61b authored by Pietro Saccardi's avatar Pietro Saccardi

Add CI for building image

parent 03e6edcc
Pipeline #859 failed with stage
in 1 minute and 46 seconds
stages:
- docker
.docker-job-definition: &docker-job-template
image: docker:stable
stage: docker
tags:
- docker
before_script:
- docker login -u "${CI_REGISTRY_USER}" -p "${CI_REGISTRY_PASSWORD}" "${CI_REGISTRY}"
.docker-build-definition: &docker-build-template
<<: *docker-job-template
script:
- export IMAGE_PATH="${CI_REGISTRY}/${CI_PROJECT_PATH}/${IMAGE_NAME}"
- $(echo "docker build
--tag ${IMAGE_PATH}:${CI_COMMIT_SHA}
--tag ${IMAGE_PATH}:latest
--cache-from ${IMAGE_PATH}:latest
${BUILD_ARGS} .")
- docker push "${IMAGE_PATH}:${CI_COMMIT_SHA}"
- docker push "${IMAGE_PATH}:latest"
build:fedora-32:
<<: *docker-build-template
variables:
BUILD_ARGS: --build-arg BASE=fedora:32
IMAGE_NAME: fedora-32
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment