mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-07 05:52:57 +00:00
fix: non-publish branches fail on main
This commit is contained in:
@@ -1,6 +1,11 @@
|
|||||||
.limit_publish_pipelines:
|
.limit_publish_pipelines:
|
||||||
rules:
|
rules:
|
||||||
- if: '($CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "develop") && $CI_COMMIT_MESSAGE =~ /ci: publish release/ && $CI_PIPELINE_SOURCE != "schedule"'
|
- if: '$CI_COMMIT_BRANCH == "develop" && $CI_COMMIT_MESSAGE =~ /ci: publish release/ && $CI_PIPELINE_SOURCE != "schedule"'
|
||||||
|
variables:
|
||||||
|
PUBLISH_TAG: next
|
||||||
|
- if: '$CI_COMMIT_BRANCH == "main" && $CI_COMMIT_MESSAGE =~ /ci: publish release/ && $CI_PIPELINE_SOURCE != "schedule"'
|
||||||
|
variables:
|
||||||
|
PUBLISH_TAG: latest
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
stage: publish
|
stage: publish
|
||||||
@@ -24,8 +29,6 @@ publish image:
|
|||||||
image:
|
image:
|
||||||
name: gcr.io/kaniko-project/executor:v1.12.1-debug
|
name: gcr.io/kaniko-project/executor:v1.12.1-debug
|
||||||
entrypoint: [""]
|
entrypoint: [""]
|
||||||
variables:
|
|
||||||
PUBLISH_TAG: next
|
|
||||||
script:
|
script:
|
||||||
- >
|
- >
|
||||||
/kaniko/executor
|
/kaniko/executor
|
||||||
@@ -50,9 +53,6 @@ publish image:
|
|||||||
- IMAGE_NAME: app
|
- IMAGE_NAME: app
|
||||||
DEPLOY_DIR: frontend/app
|
DEPLOY_DIR: frontend/app
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_BRANCH == 'main'
|
|
||||||
variables:
|
|
||||||
PUBLISH_TAG: latest
|
|
||||||
- !reference [.limit_publish_pipelines, rules]
|
- !reference [.limit_publish_pipelines, rules]
|
||||||
|
|
||||||
publish packages:
|
publish packages:
|
||||||
@@ -61,16 +61,12 @@ publish packages:
|
|||||||
variables:
|
variables:
|
||||||
GIT_STRATEGY: clone
|
GIT_STRATEGY: clone
|
||||||
GIT_DEPTH: 0
|
GIT_DEPTH: 0
|
||||||
PUBLISH_TAG: next
|
|
||||||
script:
|
script:
|
||||||
- pnpm install
|
- pnpm install
|
||||||
- pnpm build
|
- pnpm build
|
||||||
- pnpm config set '//registry.npmjs.org/:_authToken' "${NPM_AUTH_TOKEN}"
|
- pnpm config set '//registry.npmjs.org/:_authToken' "${NPM_AUTH_TOKEN}"
|
||||||
- pnpm publish -r --publish-branch ${CI_COMMIT_BRANCH} --tag ${PUBLISH_TAG} --no-git-checks # TODO: Git checks...
|
- pnpm publish -r --publish-branch ${CI_COMMIT_BRANCH} --tag ${PUBLISH_TAG} --no-git-checks # TODO: Git checks...
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_BRANCH == 'main'
|
|
||||||
variables:
|
|
||||||
PUBLISH_TAG: latest
|
|
||||||
- !reference [.limit_publish_pipelines, rules]
|
- !reference [.limit_publish_pipelines, rules]
|
||||||
|
|
||||||
publish docs:
|
publish docs:
|
||||||
@@ -84,5 +80,4 @@ publish docs:
|
|||||||
paths:
|
paths:
|
||||||
- public
|
- public
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_BRANCH == 'main'
|
|
||||||
- !reference [.limit_publish_pipelines, rules]
|
- !reference [.limit_publish_pipelines, rules]
|
||||||
|
|||||||
Reference in New Issue
Block a user