pad-archiver/.gitlab-ci.yml
2022-05-22 22:57:11 +02:00

29 lines
644 B
YAML

build pad-archiver:
image: golang:latest
script:
- go build
artifacts:
paths:
- pad-archiver
expire_in: 1 week
tags:
- docker
build_image:
dependencies:
- build pad-archiver
image: docker:latest
services:
- docker:dind
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker info
tags:
- dind
variables:
IMAGE_NAME: git.fginfo.tu-bs.de:5050/fginfo/pad-archiver
rules:
- if: '$CI_DEFAULT_BRANCH == $CI_COMMIT_BRANCH'
script:
- docker build -t $IMAGE_NAME:$CI_COMMIT_BRANCH .
- docker push $IMAGE_NAME:$CI_COMMIT_BRANCH