Unverified Commit de5a6ac6 authored by tr's avatar tr
Browse files

Add a gitlab ci configuration

parent 20151401
Pipeline #3900 failed with stages
in 59 seconds
---
stages:
- build
- test
- deploy
build:
stage: build
tags:
- dind
script:
- docker version
- docker build --no-cache -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME" .
- docker login -u gitlab-ci-token -p "$CI_JOB_TOKEN" "$CI_REGISTRY"
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME"
test:
stage: test
tags:
- docker
image:
name: "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME"
script:
- echo "Image $CI_REGISTRY_IMAGE $CI_COMMIT_REF_NAME"
- rpm -q mock
- ls -alhrt /etc/mock/epel-*
deploy latest:
stage: deploy
tags:
- dind
only:
- master
script:
- docker version
- docker login -u gitlab-ci-token -p "$CI_JOB_TOKEN" "$CI_REGISTRY"
- docker pull "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME"
- docker tag "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME" "$CI_REGISTRY_IMAGE:latest"
- docker rm "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME"
- docker push "$CI_REGISTRY_IMAGE:latest"
# vim: set ts=2 sw=2 :
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