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
Branches
Tags
No related merge requests found
Pipeline #8078 canceled
...@@ -7,6 +7,8 @@ include: ...@@ -7,6 +7,8 @@ include:
stages: stages:
- build - build
- upload
- release
- docker - docker
- deploy - deploy
...@@ -18,6 +20,10 @@ compile: ...@@ -18,6 +20,10 @@ compile:
- npm ci - npm ci
script: script:
- ng build --prod - ng build --prod
- zip -r dist.zip dist/kszk-status-angular
only:
- tags
- master
artifacts: artifacts:
expire_in: 1 day expire_in: 1 day
paths: paths:
...@@ -27,9 +33,39 @@ dockerhub: ...@@ -27,9 +33,39 @@ dockerhub:
extends: .docker-build-dockerhub extends: .docker-build-dockerhub
stage: docker stage: docker
tags: [docker] tags: [docker]
needs:
- compile
only: only:
- tags - tags
- master - master
variables: variables:
IMAGE_NAME: rlacko58/kszk-status-angular IMAGE_NAME: rlacko58/kszk-status-angular
IMAGE_TAG: $CI_COMMIT_SHORT_SHA 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
This diff is collapsed.
#!/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