Skip to content
Snippets Groups Projects
Commit 813fc7a3 authored by Rafael László's avatar Rafael László :speech_balloon:
Browse files

release pipeline

parent bd809372
No related branches found
No related tags found
No related merge requests found
Pipeline #8078 canceled
......@@ -7,6 +7,8 @@ include:
stages:
- build
- upload
- release
- docker
- deploy
......@@ -18,6 +20,10 @@ compile:
- npm ci
script:
- ng build --prod
- zip -r dist.zip dist/kszk-status-angular
only:
- tags
- master
artifacts:
expire_in: 1 day
paths:
......@@ -27,9 +33,39 @@ dockerhub:
extends: .docker-build-dockerhub
stage: docker
tags: [docker]
needs:
- compile
only:
- tags
- master
variables:
IMAGE_NAME: rlacko58/kszk-status-angular
IMAGE_TAG: $CI_COMMIT_SHORT_SHA
########################################## Release ##########################################
upload:
stage: upload
image: curlimages/curl:latest
only:
- tags
needs:
- compile
script:
- curl --header "PRIVATE-TOKEN:$CI_RELEASE_TOKEN" --upload-file "dist.zip" "${PACKAGE_REGISTRY_URL}/dist.zip"
- echo "dist.zip" > ../files.txt
artifacts:
paths:
- files.txt
release:
stage: release
image: registry.gitlab.com/gitlab-org/release-cli:latest
only:
- tags
needs:
- upload
before_script:
- apk add bash
script:
- ./release.sh
Source diff could not be displayed: it is too large. Options to address this: view the blob.
#!/bin/bash -v
assets=()
while read -r f; do
assets+=(" --assets-link {\"name\":\"$f\",\"url\":\"${PACKAGE_REGISTRY_URL}/$f\"}")
done < files.txt
release-cli create --name "Version $CI_COMMIT_TAG" --tag-name "$CI_COMMIT_TAG" $(printf "%b" "${assets[@]}")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment