Commit fb903ae9 authored by Wouter's avatar Wouter

Add Gitlab CI configuration

- With build trigger to Docker Hub
- Rename image to use Docker Hub's namespace scheme
parent 9a669d75
Pipeline #101 passed with stages
stages:
- build
- deploy
Build master:
stage: build
script:
- docker rmi --force ${DOCKERHUB_USER}/${DOCKERHUB_REPO}:latest || /bin/true
- docker build --tag=${DOCKERHUB_USER}/${DOCKERHUB_REPO}:latest .
tags:
- docker
only:
- master
Build other:
stage: build
script:
- docker build --tag=${DOCKERHUB_USER}/${DOCKERHUB_REPO}:${CI_BUILD_REF_NAME} .
tags:
- docker
except:
- master
# Note: to be friendly to Docker Hub, the auto-update on push is disabled in Docker hub.
# The repository itself is mirrored to GitHub immediately on every push.
Build branch on Docker Hub:
stage: deploy
script:
- 'curl -H "Content-Type: application/json" --data "{\"source_type\": \"Branch\", \"source_name\": \"${CI_BUILD_REF_NAME}\"}" -X POST https://registry.hub.docker.com/u/${DOCKERHUB_USER}/${DOCKERHUB_REPO}/trigger/${DOCKERHUB_TOKEN}/'
except:
- tags
Build tag on Docker Hub:
stage: deploy
script:
- 'curl -H "Content-Type: application/json" --data "{\"source_type\": \"Tag\", \"source_name\": \"${CI_BUILD_REF_NAME}\"}" -X POST https://registry.hub.docker.com/u/${DOCKERHUB_USER}/${DOCKERHUB_REPO}/trigger/${DOCKERHUB_TOKEN}/'
except:
- branches
FROM cmake-qt5:latest
FROM haffmans/cmake-qt5:latest
MAINTAINER Wouter Haffmans <wouter@simply-life.net>
WORKDIR /
......
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