2020-05-11 00:24:33 +02:00
|
|
|
image: docker:stable
|
|
|
|
|
|
|
|
variables:
|
|
|
|
DOCKER_TLS_CERTDIR: "/certs"
|
|
|
|
|
|
|
|
services:
|
|
|
|
- docker:19.03.8-dind
|
|
|
|
|
|
|
|
before_script:
|
|
|
|
- docker info
|
2019-11-08 21:01:11 +01:00
|
|
|
|
|
|
|
stages:
|
|
|
|
- build
|
2020-05-11 00:24:33 +02:00
|
|
|
- create-release-package
|
2019-11-08 22:30:18 +01:00
|
|
|
- releasetag
|
2019-11-08 21:01:11 +01:00
|
|
|
|
|
|
|
build:
|
|
|
|
stage: build
|
|
|
|
before_script:
|
2020-05-11 00:24:33 +02:00
|
|
|
- apk update && apk add make > /dev/null
|
2019-11-08 21:01:11 +01:00
|
|
|
script:
|
2020-05-11 00:24:33 +02:00
|
|
|
- make build-docker
|
2019-11-08 21:01:11 +01:00
|
|
|
artifacts:
|
|
|
|
name: "$CI_COMMIT_SHORT_SHA-$CI_JOB_NAME"
|
|
|
|
paths:
|
|
|
|
- build
|
|
|
|
only:
|
|
|
|
refs:
|
|
|
|
- master
|
|
|
|
|
2020-05-11 00:24:33 +02:00
|
|
|
create-release-package:
|
|
|
|
stage: create-release-package
|
2019-11-08 21:01:11 +01:00
|
|
|
variables:
|
|
|
|
GIT_STRATEGY: none
|
|
|
|
dependencies:
|
|
|
|
- build
|
|
|
|
before_script:
|
2020-05-11 00:24:33 +02:00
|
|
|
- apk update && apk add zip > /dev/null
|
2019-11-08 21:01:11 +01:00
|
|
|
script:
|
2020-05-11 00:24:33 +02:00
|
|
|
- mv build/docker/bemanitools.zip ./bemanitools.zip
|
|
|
|
- rm -r build
|
2019-11-08 21:01:11 +01:00
|
|
|
- find . -mindepth 1 ! -regex '^./bemanitools.zip' -delete
|
|
|
|
- unzip bemanitools.zip
|
|
|
|
- rm bemanitools.zip
|
|
|
|
artifacts:
|
|
|
|
name: "$CI_COMMIT_SHORT_SHA-$CI_JOB_NAME"
|
|
|
|
paths:
|
|
|
|
- ./*
|
|
|
|
only:
|
|
|
|
refs:
|
|
|
|
- master
|
2020-05-11 00:24:33 +02:00
|
|
|
|
2019-11-08 22:27:54 +01:00
|
|
|
releasetag:
|
|
|
|
stage: releasetag
|
|
|
|
dependencies: []
|
|
|
|
before_script:
|
2020-05-11 00:24:33 +02:00
|
|
|
- apk update && apk add curl > /dev/null
|
2019-11-08 22:27:54 +01:00
|
|
|
script:
|
|
|
|
- |
|
|
|
|
curl --silent --show-error \
|
|
|
|
--data "{\"tag_name\": \"${CI_COMMIT_TAG}\", \"name\": \"${CI_PROJECT_NAME}-${CI_COMMIT_TAG}\", \"description\": \"${CI_COMMIT_TAG_MESSAGE:-No release notes.}\"}" \
|
|
|
|
--header "Content-Type: application/json" \
|
|
|
|
--header "Private-Token: ${CI_PRIVATE_TOKEN}" \
|
|
|
|
--request POST \
|
|
|
|
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/releases"
|
|
|
|
only:
|
|
|
|
- tags
|