2021-04-10 14:15:03 +01:00
|
|
|
stages:
|
|
|
|
- build
|
|
|
|
- deploy
|
|
|
|
|
|
|
|
build-gpx-anomalies:
|
|
|
|
stage: build
|
|
|
|
image: golang:1.15-buster
|
|
|
|
before_script:
|
|
|
|
- apt-get -qq update && apt-get --yes install zip
|
|
|
|
script:
|
2021-04-10 14:22:22 +01:00
|
|
|
- env GOOS=windows go build -o gpx-anomalies.exe ./cmd/gpx-anomalies
|
|
|
|
- zip gpx-anomalies.zip gpx-anomalies.exe
|
2021-04-10 14:15:03 +01:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- gpx-anomalies.zip
|
|
|
|
|
|
|
|
publish-gpx-anomalies:
|
|
|
|
stage: deploy
|
|
|
|
image: curlimages/curl:latest
|
|
|
|
variables:
|
|
|
|
GIT_STRATEGY: none
|
|
|
|
script:
|
|
|
|
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file gpx-anomalies.zip "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/gpx-anomalies/latest/gpx-anomalies.zip"'
|
|
|
|
rules:
|
|
|
|
- if: '$CI_COMMIT_BRANCH == "master"'
|