mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-20 08:33:11 +00:00
feat: publishing workflow
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
deploy:
|
||||
stage: publish
|
||||
needs: ['build']
|
||||
needs: ['build', 'test', 'integration', 'e2e']
|
||||
script:
|
||||
- pnpm install
|
||||
- pnpm run deploy
|
||||
@@ -8,9 +8,7 @@ deploy:
|
||||
paths:
|
||||
- ./.deploy
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||
when: manual
|
||||
- if: $CI_COMMIT_TAG
|
||||
- when: on_success
|
||||
|
||||
publish images:
|
||||
stage: publish
|
||||
@@ -25,14 +23,9 @@ publish images:
|
||||
- /kaniko/executor
|
||||
--context "${CI_PROJECT_DIR}/${DEPLOY_DIR}"
|
||||
--dockerfile "${CI_PROJECT_DIR}/${DEPLOY_DIR}/Dockerfile"
|
||||
--destination "${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:${DOCKER_TAG}"
|
||||
--destination "${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:$(./.gitlab/ci/getVersion.sh ${DEPLOY_DIR}/package.json)
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
variables:
|
||||
DOCKER_TAG: $CI_COMMIT_TAG
|
||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||
variables:
|
||||
DOCKER_TAG: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
|
||||
- when: on_success
|
||||
parallel:
|
||||
matrix:
|
||||
- DEPLOY_DIR: backend/database
|
||||
@@ -42,20 +35,17 @@ publish images:
|
||||
- DEPLOY_DIR: .deploy/proxy
|
||||
IMAGE_NAME: proxy
|
||||
|
||||
publish:
|
||||
publish packages:
|
||||
stage: publish
|
||||
needs: ['deploy']
|
||||
script:
|
||||
- pnpm install --prefer-offline
|
||||
- pnpm install
|
||||
- pnpm build
|
||||
- pnpm changeset version $PUBLISH_TYPE
|
||||
- pnpm changeset publish
|
||||
- pnpm publish -r
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||
variables:
|
||||
PUBLISH_TYPE: --snapshot $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
|
||||
- when: on_success
|
||||
|
||||
pages:docs:
|
||||
publish docs:
|
||||
stage: publish
|
||||
needs: ['deploy']
|
||||
script:
|
||||
@@ -66,5 +56,4 @@ pages:docs:
|
||||
paths:
|
||||
- public
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
when: on_success
|
||||
- when: on_success
|
||||
|
||||
Reference in New Issue
Block a user