Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Kristian Klausen
arch-boxes
Commits
f9d4141e
Commit
f9d4141e
authored
Aug 30, 2021
by
Kristian Klausen
🎉
Browse files
Upload release artifacts to "Generic Packages Repository"
Fix #118
parent
72b29141
Pipeline
#11029
failed with stages
in 24 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
f9d4141e
...
...
@@ -7,6 +7,12 @@ stages:
-
test
-
publish
workflow
:
rules
:
-
if
:
$CI_COMMIT_TAG
when
:
never
-
when
:
always
shellcheck
:
stage
:
lint
before_script
:
...
...
@@ -69,7 +75,6 @@ build:secure:
only
:
-
master@archlinux/arch-boxes
-
schedules@archlinux/arch-boxes
-
tags@archlinux/arch-boxes
test-vagrant-boxes-format
:
stage
:
test
...
...
@@ -136,18 +141,25 @@ tag_release:
variables
:
-
$SCHEDULED_PUBLISH == "TRUE"
before_script
:
-
pacman -Syu --needed --noconfirm release-cli
-
pacman -Syu --needed --noconfirm release-cli jq
variables
:
PACKAGE_REGISTRY_URL
:
"
${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/images/v${BUILD_VERSION}"
script
:
-
release-cli create --name "v$BUILD_VERSION" --tag-name v$BUILD_VERSION \
--assets-link "{\"name\":\"Vagrant Cloud Release\",\"url\":\"https://app.vagrantup.com/archlinux/boxes/archlinux/versions/$BUILD_VERSION\"}" \
--assets-link "{\"name\":\"Browse artifacts\",\"url\":\"https://gitlab.archlinux.org/archlinux/arch-boxes/-/jobs/artifacts/v$BUILD_VERSION/browse/output?job=build:secure\"}"
-
|
args=()
for f in output/*; do
base="$(basename "${f}")"
curl -sSf --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file "${f}" "${PACKAGE_REGISTRY_URL}/${base}"
args+=(--assets-link "{\"name\":\"${base}\",\"filepath\":\"/${base/-$BUILD_VERSION}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${base}\"}")
done
-
release-cli create --name "v$BUILD_VERSION" --tag-name v$BUILD_VERSION "${args[@]}"
publish
:
stage
:
publish
tags
:
-
secure
only
:
-
tag
s@archlinux/arch-boxes
-
schedule
s@archlinux/arch-boxes
before_script
:
-
pacman -Syu --needed --noconfirm vagrant
script
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment