Commit cdb64ed1 authored by Edmund Ochieng's avatar Edmund Ochieng

Merge branch 'update_ci' into 'master'

Update CI job to include image build

Closes #17

See merge request !23
parents ec79ba49 f49257d5
Pipeline #191202507 passed with stages
in 17 minutes and 54 seconds
......@@ -37,3 +37,29 @@ build_all:
script:
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo ./...
extends: .cache
image-build-master:
image: docker:latest
stage: build
services:
- docker:dind
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE" .
- docker push "$CI_REGISTRY_IMAGE"
only:
- master
image-build:
image: docker:latest
stage: build
services:
- docker:dind
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" .
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
except:
- 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