You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

24 lines
513 B

variables:
DEBIAN_FRONTEND: noninteractive
IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
RELEASE_IMAGE: $CI_REGISTRY_IMAGE:latest
image: docker:latest
services:
- docker:dind
before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
build:
timeout: 3h
stage: build
script:
- echo building $IMAGE and releasing as $RELEASE_IMAGE
- docker build -t $IMAGE .
- docker push $IMAGE
- docker tag $IMAGE $RELEASE_IMAGE
- docker push $RELEASE_IMAGE