This repository has been archived on 2024-09-23. You can view files and clone it, but cannot push or open issues or pull requests.
rocketchat-scim/.gitlab-ci.yml

54 lines
1.2 KiB
YAML
Raw Permalink Normal View History

2022-06-08 16:07:44 +00:00
variables:
PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/scim"
EXTRA_DESCRIPTION: ""
SCIM_FILE: scim_${CI_COMMIT_TAG}.zip
2022-06-09 12:15:57 +00:00
SCIM_PACKAGE: ${PACKAGE_REGISTRY_URL}/${CI_COMMIT_TAG}/scim.zip
2022-06-08 16:07:44 +00:00
2022-06-08 15:45:11 +00:00
stages:
- package
- upload
- release
2022-03-10 14:37:18 +00:00
package:
2022-06-08 15:46:17 +00:00
stage: package
2022-06-08 15:45:11 +00:00
image: node:17
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
2022-06-08 15:53:15 +00:00
- if: $CI_COMMIT_TAG
2022-03-10 14:37:18 +00:00
script:
- npm ci
- npm run package
artifacts:
paths:
- dist/
2022-06-08 15:45:11 +00:00
upload:
stage: upload
2022-06-08 15:57:10 +00:00
image: curlimages/curl
2022-06-08 15:45:11 +00:00
rules:
- if: $CI_COMMIT_TAG
script:
2022-06-09 12:15:57 +00:00
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file "dist/${SCIM_FILE}" "${SCIM_PACKAGE}"'
2022-06-08 15:45:11 +00:00
needs:
- job: package
artifacts: true
release_job:
stage: release
image: registry.gitlab.com/gitlab-org/release-cli:latest
rules:
- if: $CI_COMMIT_TAG
script:
- echo "running release_job"
release:
2022-06-09 12:17:34 +00:00
name: "v${CI_COMMIT_TAG}"
2022-06-08 15:45:11 +00:00
description: "Created using the release-cli $EXTRA_DESCRIPTION"
tag_name: "$CI_COMMIT_TAG"
ref: "$CI_COMMIT_TAG"
assets:
links:
- name: "scim"
2022-06-09 12:15:57 +00:00
url: "${SCIM_PACKAGE}"
2022-06-08 15:45:11 +00:00
filepath: "/scim"
link_type: "package"