1
0
mirror of https://github.com/pumpitupdev/pumptools.git synced 2024-11-28 00:20:47 +01:00
pumptools/.gitlab-ci.yml

81 lines
1.6 KiB
YAML
Raw Normal View History

2020-10-03 21:19:13 +02:00
image: docker:stable
variables:
DOCKER_TLS_CERTDIR: "/certs"
services:
- docker:19.03.8-dind
before_script:
- docker info
stages:
- build
- test
2020-10-03 21:19:13 +02:00
- create-release-package
- upload-release
2020-10-03 21:19:13 +02:00
build:
stage: build
before_script:
- apk update && apk add make > /dev/null
script:
- make build-docker
artifacts:
name: "$CI_COMMIT_SHORT_SHA-$CI_JOB_NAME"
paths:
- build
only:
refs:
- master
test:
stage: test
dependencies:
- build
before_script:
- apk update && apk add make > /dev/null
script:
- make test-docker
artifacts:
name: "$CI_COMMIT_SHORT_SHA-$CI_JOB_NAME"
paths:
- build
only:
refs:
- master
2020-10-03 21:19:13 +02:00
create-release-package:
stage: create-release-package
variables:
GIT_STRATEGY: none
dependencies:
- test
2020-10-03 21:19:13 +02:00
before_script:
- apk update && apk add zip > /dev/null
script:
- mv build/docker/pumptools-public.zip ./pumptools.zip
- rm -r build
- find . -mindepth 1 ! -regex '^./pumptools.zip' -delete
- unzip pumptools.zip
- rm pumptools.zip
artifacts:
name: "$CI_COMMIT_SHORT_SHA-$CI_JOB_NAME"
paths:
- ./*
only:
refs:
- master
upload-release:
stage: upload-release
dependencies:
- create-release-package
2020-10-03 21:19:13 +02:00
before_script:
- apk update && apk add curl > /dev/null
script:
- echo "Uploading ${CI_PROJECT_NAME}-${CI_COMMIT_TAG}..."
- curl --silent --show-error -F "key=${CI_UPLOAD_KEY}" -F "filename=${CI_PROJECT_NAME}-v${CI_COMMIT_TAG}.zip" -F "file=@./pumptools.zip" ${CI_UPLOAD_URL}
2020-10-03 21:19:13 +02:00
only:
- tags