mirror of
https://github.com/pumpitupdev/pumptools.git
synced 2024-11-23 22:50:56 +01:00
81 lines
1.6 KiB
YAML
81 lines
1.6 KiB
YAML
image: docker:stable
|
|
|
|
variables:
|
|
DOCKER_TLS_CERTDIR: "/certs"
|
|
|
|
services:
|
|
- docker:19.03.8-dind
|
|
|
|
before_script:
|
|
- docker info
|
|
|
|
stages:
|
|
- build
|
|
- test
|
|
- create-release-package
|
|
- upload-release
|
|
|
|
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
|
|
|
|
create-release-package:
|
|
stage: create-release-package
|
|
variables:
|
|
GIT_STRATEGY: none
|
|
dependencies:
|
|
- test
|
|
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
|
|
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}
|
|
only:
|
|
- tags
|