Update .gitlab-ci.yml file
This commit is contained in:
parent
389cd249d6
commit
8367f381b6
1 changed files with 18 additions and 7 deletions
|
@ -1,5 +1,8 @@
|
|||
image: 3.10.8-slim-buster
|
||||
|
||||
variables:
|
||||
PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/linux/$CI_COMMIT_TAG/"
|
||||
|
||||
.deploy:
|
||||
rules:
|
||||
# Regex magic copied from Neshura/page-test, only deploys on x.y.z or higher (x.y) Tags
|
||||
|
@ -7,6 +10,7 @@ image: 3.10.8-slim-buster
|
|||
|
||||
stages:
|
||||
- build
|
||||
- upload
|
||||
- release
|
||||
|
||||
## Docker steps
|
||||
|
@ -28,8 +32,6 @@ build:
|
|||
- echo JOB_ID=$CI_JOB_ID >> job.env
|
||||
- mkdir ./artifacts
|
||||
- cp /builds/Neshura/cloudflare-dns-updater/target/release/cloudflare-dns-updater ./artifacts/
|
||||
- cp /builds/Neshura/cloudflare-dns-updater/config.json ./artifacts/
|
||||
- cp /builds/Neshura/cloudflare-dns-updater/api-key-empty.json ./artifacts/api-key.json
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
|
@ -40,10 +42,19 @@ build:
|
|||
rules:
|
||||
- !reference [.deploy, rules]
|
||||
|
||||
Tag Release:
|
||||
upload:
|
||||
needs:
|
||||
- job: build
|
||||
artifacts: true
|
||||
- job: build
|
||||
artifacts: true
|
||||
image: curlimages/curl:latest
|
||||
stage: upload
|
||||
script:
|
||||
- |
|
||||
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file artifacts/cloudflare-dns-updater "${PACKAGE_REGISTRY_URL}/cloudflare-dns-updater"
|
||||
rules:
|
||||
- !reference [.deploy, rules]
|
||||
|
||||
Tag Release:
|
||||
stage: release
|
||||
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
||||
rules:
|
||||
|
@ -55,6 +66,6 @@ Tag Release:
|
|||
description: '$CI_COMMIT_TAG'
|
||||
assets:
|
||||
links:
|
||||
- name: "cloudflare-dns-updater.zip"
|
||||
url: "https://gitlab.neshweb.net/Neshura/cloudflare-dns-updater/-/jobs/$JOB_ID/artifacts/download"
|
||||
- name: "cloudflare-dns-updater"
|
||||
url: "${PACKAGE_REGISTRY_URL}/cloudflare-dns-updater"
|
||||
|
Loading…
Reference in a new issue