Commit 939a6bf5 authored by nold's avatar nold

Add: Gitlab-CI

parent eeb48cbb
Pipeline #14 passed with stages
in 5 minutes
image: docker:stable
services:
- docker:dind
stages:
- build
# - test
- release
variables:
TEST_IMAGE: hub.nold.in/$CI_PROJECT_PATH:$CI_BUILD_REF
RELEASE_IMAGE: hub.nold.in/$CI_PROJECT_PATH:latest
DOCKER_DRIVER: overlay
before_script:
- docker info
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN hub.nold.in
build:
stage: build
script:
- docker build -t $TEST_IMAGE .
- docker push $TEST_IMAGE
#test:
# stage: test
# script:
# - docker run --rm $TEST_IMAGE /test.sh
release:
stage: release
script:
- docker pull $TEST_IMAGE
- docker tag $TEST_IMAGE $RELEASE_IMAGE
- docker push $RELEASE_IMAGE
only:
- master
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