-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
22 lines (20 loc) · 967 Bytes
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
variables:
DOCKER_IMAGE_TAG: $CI_PIPELINE_IID
DOCKER_IMAGE_NAME: $CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG
stages:
- build
- release
build:image:dev:
stage: build
tags:
- shell-build-runer
rules:
- if: $CI_COMMIT_TAG
when: on_success
variables:
UNIVERSAL_LINK: "https://git.pepemoss.com/api/v4/projects/${CI_PROJECT_ID}/packages/generic/release/$CI_COMMIT_TAG/universal.zip"
script:
- zip universal.zip -r ./
- echo $UNIVERSAL_LINK
- 'curl --header "PRIVATE-TOKEN: $CI_ACCESS_TOKEN" --upload-file ./universal.zip "$UNIVERSAL_LINK"'
- 'curl --request POST "https://git.pepemoss.com/api/v4/projects/${CI_PROJECT_ID}/releases" --header "PRIVATE-TOKEN: $CI_ACCESS_TOKEN" --data "name=Release Tag - $CI_COMMIT_TAG" --data "tag_name=$CI_COMMIT_TAG" --data "description=All Release builds for Tag - $CI_COMMIT_TAG" --data-urlencode "assets[links][][name]=Universal" --data-urlencode "assets[links][][url]=$UNIVERSAL_LINK"'