Skip to content

Commit

Permalink
ci: create release on tag
Browse files Browse the repository at this point in the history
  • Loading branch information
lanathlor committed Nov 14, 2024
1 parent 49195de commit baea19a
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
27 changes: 27 additions & 0 deletions gitlab/func-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ test cli:
stage: func-test
tags:
- k8s-small
rules:
- if: $CI_COMMIT_TAG
when: never
needs:
- build cli
dependencies:
Expand All @@ -28,6 +31,9 @@ compose init:
stage: func-test
tags:
- k8s-small
rules:
- if: $CI_COMMIT_TAG
when: never
needs:
- build test
dependencies:
Expand All @@ -42,6 +48,9 @@ compose init conf flag:
stage: func-test
tags:
- k8s-small
rules:
- if: $CI_COMMIT_TAG
when: never
needs:
- build test
dependencies:
Expand All @@ -56,6 +65,9 @@ compose init set:
stage: func-test
tags:
- k8s-small
rules:
- if: $CI_COMMIT_TAG
when: never
needs:
- build test
dependencies:
Expand All @@ -70,6 +82,9 @@ compose init optional:
stage: func-test
tags:
- k8s-small
rules:
- if: $CI_COMMIT_TAG
when: never
needs:
- build test
dependencies:
Expand All @@ -84,6 +99,9 @@ compose init arbitrary:
stage: func-test
tags:
- k8s-small
rules:
- if: $CI_COMMIT_TAG
when: never
needs:
- build test
dependencies:
Expand All @@ -98,6 +116,9 @@ compose config set:
stage: func-test
tags:
- k8s-small
rules:
- if: $CI_COMMIT_TAG
when: never
needs:
- build test
dependencies:
Expand All @@ -113,6 +134,9 @@ compose config reload:
stage: func-test
tags:
- k8s-small
rules:
- if: $CI_COMMIT_TAG
when: never
needs:
- build test
dependencies:
Expand All @@ -129,6 +153,9 @@ config flag set:
stage: func-test
tags:
- k8s-small
rules:
- if: $CI_COMMIT_TAG
when: never
needs:
- build test
dependencies:
Expand Down
6 changes: 6 additions & 0 deletions gitlab/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ full test w test config:
image: docker:24.0.5
tags:
- k8s-small
rules:
- if: $CI_COMMIT_BRANCH
when: on_success
variables:
DOCKER_HOST: tcp://docker:2376
DOCKER_TLS_CERTDIR: '/certs'
Expand Down Expand Up @@ -32,6 +35,9 @@ full test w debug image:
image: git.stamus-networks.com:4567/devel/stamus-ctl/cli:$CI_COMMIT_REF_NAME-$CI_COMMIT_SHORT_SHA
tags:
- k8s-small
rules:
- if: $CI_COMMIT_BRANCH
when: on_success
variables:
DOCKER_HOST: tcp://docker:2376
DOCKER_TLS_CERTDIR: '/certs'
Expand Down
26 changes: 26 additions & 0 deletions gitlab/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ upload stamusctl:
- if: $CI_COMMIT_TAG
script:
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file stamusctl "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/stamusctl/$CI_COMMIT_TAG/stamusctl"'
needs:
- build cli

upload stamusd:
stage: release
Expand All @@ -65,3 +67,27 @@ upload stamusd:
- if: $CI_COMMIT_TAG
script:
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file stamusd "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/stamusctl/$CI_COMMIT_TAG/stamusd"'
needs:
- build daemon

create release:
stage: release
image: registry.gitlab.com/gitlab-org/release-cli:latest
rules:
- if: $CI_COMMIT_TAG
script:
- echo "running release_job"
release:
tag_name: '$CI_COMMIT_TAG'
description: '$CI_COMMIT_TAG'
assets:
links:
- name: 'stamusctl'
url: '${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/stamusctl/$CI_COMMIT_TAG/stamusctl'
link_type: 'package'
- name: 'stamusd'
url: '${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/stamusctl/$CI_COMMIT_TAG/stamusd'
link_type: 'package'
needs:
- upload stamusctl
- upload stamusd

0 comments on commit baea19a

Please sign in to comment.