Skip to content
Snippets Groups Projects
Commit 09e8efe9 authored by Klaus Frank's avatar Klaus Frank
Browse files

Add .gitlab-ci.yml

parent 9da32283
No related branches found
No related tags found
No related merge requests found
Pipeline #28724 failed
image: docker:latest
variables:
DOCKER_DRIVER: overlay2
TEST_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
RELEASE_IMAGE: $CI_REGISTRY_IMAGE:latest
GIT_SUBMODULE_STRATEGY: recursive
services:
- docker:dind
stages:
- build
- release
- deploy
build:
stage: build
tags:
- dind
script:
- docker login -u gitlab-ci-token -p "$CI_JOB_TOKEN" "$CI_REGISTRY"
- docker build --pull -t "$TEST_IMAGE" .
- docker push "$TEST_IMAGE"
release:
stage: release
tags:
- dind
script:
- docker login -u gitlab-ci-token -p "$CI_JOB_TOKEN" "$CI_REGISTRY"
- docker pull "$TEST_IMAGE"
- docker tag "$TEST_IMAGE" "$RELEASE_IMAGE"
- docker push "$RELEASE_IMAGE"
only:
- master
dockerhub:on-schedule:
stage: deploy
only:
- schedules
image: alpine:latest
script:
- apk add --update curl
- 'curl -X POST -H "Content-Type: application/json" --data "{ \"build\": true }" https://cloud.docker.com/api/build/v1/source/$dockerhub_project_trigger_token/trigger/$dockerhub_trigger_token/call/'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment