Skip to content

Commit

Permalink
ci: fix release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Schröder committed Jul 26, 2023
1 parent b7a24b3 commit 5876697
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 18 deletions.
40 changes: 33 additions & 7 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
stages:
- build
- bootstrap
- release
- publish

default:
Expand Down Expand Up @@ -90,21 +91,46 @@ bootstrap:
- ./scripts/bootstrap/tmux
- ./scripts/bootstrap/sdk

image: registry.gitlab.com/gitlab-org/release-cli:latest

release:
stage: release
image: registry.gitlab.com/gitlab-org/release-cli:latest
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: manual
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: never
script:
- echo "Making a release"
release:
name: v0.26.4-0
tag_name: v0.26.4-0
description: 'Official Image'

publish:
stage: publish
image: docker:latest
tags:
- docker-dind
variables:
TAG: v0.26.4-0
parallel:
matrix:
- IMAGE: [base, ci, build, devel, workstation]
artifacts:
paths:
expire_in: 2 weeks
when: always
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: manual
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: never
before_script:
- docker login --username "$DOCKER_USERNAME" --password "$DOCKER_TOKEN"
- echo "$DOCKER_TOKEN" | docker login --username "$DOCKER_USERNAME" --password-stdin
- docker info
script:
- ./scripts/publish
release:
name: v0.26.4-0
tag_name: v0.26.4-0
description: 'Official Image'
- docker push swedishembedded/$IMAGE:$TAG
- docker push swedishembedded/$IMAGE:latest
needs: [release]

11 changes: 0 additions & 11 deletions scripts/publish

This file was deleted.

0 comments on commit 5876697

Please sign in to comment.