Skip to content
Snippets Groups Projects
Commit a645a559 authored by Nicola Jordan's avatar Nicola Jordan
Browse files

really follow the guide on gitlab ;-)

parent 7b9b72a7
No related branches found
No related tags found
No related merge requests found
Pipeline #257879 passed with stage
in 1 minute and 28 seconds
image: golang:latest
variables:
# Package version can only contain numbers (0-9), and dots (.).
# Must be in the format of X.Y.Z, i.e. should match /\A\d+\.\d+\.\d+\z/ regular expresion.
# See https://docs.gitlab.com/ee/user/packages/generic_packages/#publish-a-package-file
PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/boilr/"
stages:
- build
- release
......@@ -96,20 +102,14 @@ generate_executables:
- echo ARTIFACT_JOB_ID=$CI_JOB_ID >> executable_artifacts.env
script:
- ./go-executable-build.sh boilr boilr.go
- mv builds/boilr-darwin-amd64 builds/boilr-${CI_COMMIT_TAG}-darwin-amd64
- mv builds/boilr-darwin-arm64 builds/boilr-${CI_COMMIT_TAG}-darwin-arm64
- mv builds/boilr-linux-amd64 builds/boilr-${CI_COMMIT_TAG}-linux-amd64
- mv builds/boilr-linux-386 builds/boilr-${CI_COMMIT_TAG}-linux-386
- mv builds/boilr-windows-386.exe builds/boilr-${CI_COMMIT_TAG}-windows-386.exe
- mv builds/boilr-windows-amd64.exe builds/boilr-${CI_COMMIT_TAG}-windows-amd64.exe
artifacts:
paths:
- builds/boilr-${CI_COMMIT_TAG}-darwin-amd64
- builds/boilr-${CI_COMMIT_TAG}-darwin-arm64
- builds/boilr-${CI_COMMIT_TAG}-linux-amd64
- builds/boilr-${CI_COMMIT_TAG}-linux-386
- builds/boilr-${CI_COMMIT_TAG}-windows-386.exe
- builds/boilr-${CI_COMMIT_TAG}-windows-amd64.exe
- builds/boilr-darwin-amd64
- builds/boilr-darwin-arm64
- builds/boilr-linux-amd64
- builds/boilr-linux-386
- builds/boilr-windows-386.exe
- builds/boilr-windows-amd64.exe
reports:
# To ensure we've access to this file in the next stage
dotenv: executable_artifacts.env
......@@ -123,12 +123,12 @@ upload:
- job: generate_executables
artifacts: true
script:
- 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file builds/boilr-${CI_COMMIT_TAG}-darwin-amd64 ${PACKAGE_REGISTRY_URL}/boilr-${CI_COMMIT_TAG}-darwin-amd64'
- 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file builds/boilr-${CI_COMMIT_TAG}-darwin-arm64 ${PACKAGE_REGISTRY_URL}/boilr-${CI_COMMIT_TAG}-darwin-arm64'
- 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file builds/boilr-${CI_COMMIT_TAG}-linux-amd64 ${PACKAGE_REGISTRY_URL}/boilr-${CI_COMMIT_TAG}-linux-amd64'
- 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file builds/boilr-${CI_COMMIT_TAG}-linux-386 ${PACKAGE_REGISTRY_URL}/boilr-${CI_COMMIT_TAG}-linux-386'
- 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file builds/boilr-${CI_COMMIT_TAG}-windows-386.exe ${PACKAGE_REGISTRY_URL}/boilr-${CI_COMMIT_TAG}-windows-386.exe'
- 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file builds/boilr-${CI_COMMIT_TAG}-windows-amd64.exe ${PACKAGE_REGISTRY_URL}/boilr-${CI_COMMIT_TAG}-windows-amd64.exe'
- 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file builds/boilr-darwin-amd64 "${PACKAGE_REGISTRY_URL}${CI_COMMIT_TAG}/boilr-darwin-amd64"'
- 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file builds/boilr-darwin-arm64 "${PACKAGE_REGISTRY_URL}${CI_COMMIT_TAG}/boilr-darwin-arm64"'
- 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file builds/boilr-linux-amd64 "${PACKAGE_REGISTRY_URL}${CI_COMMIT_TAG}/boilr-linux-amd64"'
- 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file builds/boilr-linux-386 "${PACKAGE_REGISTRY_URL}${CI_COMMIT_TAG}/boilr-linux-386"'
- 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file builds/boilr-windows-386.exe "${PACKAGE_REGISTRY_URL}${CI_COMMIT_TAG}/boilr-windows-386.exe"'
- 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file builds/boilr-windows-amd64.exe "${PACKAGE_REGISTRY_URL}${CI_COMMIT_TAG}/boilr-windows-amd64.exe"'
release_job:
stage: release
......@@ -146,15 +146,15 @@ release_job:
description: '$CI_COMMIT_TAG'
assets:
links:
- name: 'boilr-${CI_COMMIT_TAG}-darwin-amd64'
url: '${PACKAGE_REGISTRY_URL}/boilr-${CI_COMMIT_TAG}-darwin-amd64'
- name: 'boilr-${CI_COMMIT_TAG}-darwin-arm64'
url: '${PACKAGE_REGISTRY_URL}/boilr-${CI_COMMIT_TAG}-darwin-arm64'
- name: 'boilr-${CI_COMMIT_TAG}-linux-amd64'
url: '${PACKAGE_REGISTRY_URL}/boilr-${CI_COMMIT_TAG}-linux-amd64'
- name: 'boilr-${CI_COMMIT_TAG}-linux-386'
url: '${PACKAGE_REGISTRY_URL}/boilr-${CI_COMMIT_TAG}-linux-386'
- name: 'boilr-${CI_COMMIT_TAG}-windows-386.exe'
url: '${PACKAGE_REGISTRY_URL}/boilr-${CI_COMMIT_TAG}-windows-386.exe'
- name: '${PACKAGE_REGISTRY_URL}/boilr-${CI_COMMIT_TAG}-windows-amd64.exe'
url: 'boilr-${CI_COMMIT_TAG}-windows-amd64.exe'
- name: '${CI_COMMIT_TAG}/boilr-darwin-amd64'
url: '${PACKAGE_REGISTRY_URL}${CI_COMMIT_TAG}/boilr-darwin-amd64'
- name: '${CI_COMMIT_TAG}/boilr-darwin-arm64'
url: '${PACKAGE_REGISTRY_URL}${CI_COMMIT_TAG}/boilr-darwin-arm64'
- name: '${CI_COMMIT_TAG}/boilr-linux-amd64'
url: '${PACKAGE_REGISTRY_URL}${CI_COMMIT_TAG}/boilr-linux-amd64'
- name: '${CI_COMMIT_TAG}/boilr-linux-386'
url: '${PACKAGE_REGISTRY_URL}${CI_COMMIT_TAG}/boilr-linux-386'
- name: '${CI_COMMIT_TAG}/boilr-windows-386.exe'
url: '${PACKAGE_REGISTRY_URL}${CI_COMMIT_TAG}/boilr-windows-386.exe'
- name: '${CI_COMMIT_TAG}/boilr-windows-amd64.exe'
url: '${PACKAGE_REGISTRY_URL}${CI_COMMIT_TAG}/boilr-windows-amd64.exe'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment