Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit f980c432 authored by Raphael JOIE's avatar Raphael JOIE
Browse files

wip

parent 782be160
No related branches found
No related tags found
2 merge requests!4Ci,!3Ci
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: never
# Don't run on first init commit of a branch
- if: $CI_COMMIT_BRANCH && $CI_COMMIT_BEFORE_SHA == "0000000000000000000000000000000000000000"
when: never
- if: $CI_COMMIT_BRANCH
stages:
- build
- deliver
build:
image: node:20
tags:
- docker
- lab
stage: build
script:
- npm install
- npm run build
artifacts:
paths:
- dist
deliver-umd:
image: node:20
tags:
- docker
- lab
stage: deliver
script:
- PACKAGE_VERSION=$(node -e "const c = require('./package.json'); console.log(c.version)")
- echo ${PACKAGE_VERSION}
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --header "Content-Type: text/javascript" --upload-file dist/umd/index.js "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/application-landscape-viewer/latest/index.js"'
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --header "Content-Type: text/css" --upload-file dist/umd/assets/styles.css "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/application-landscape-viewer/latest/styles.css"'
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --header "Content-Type: text/javascript " --upload-file dist/umd/index.js "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/application-landscape-viewer/${PACKAGE_VERSION}/index.js"'
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --header "Content-Type: text/css" --upload-file dist/umd/assets/styles.css "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/application-landscape-viewer/${PACKAGE_VERSION}/styles.css"'
needs:
- build
dependencies:
- build
deliver-package:
image: node:20
tags:
- docker
- lab
stage: deliver
script:
- echo "registry=https://${CI_SERVER_HOST}/api/v4/projects/${CI_PROJECT_ID}/packages/npm/" > .npmrc
- echo "//${CI_SERVER_HOST}/api/v4/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=${CI_JOB_TOKEN}" >> .npmrc
- npm publish
needs:
- build
dependencies:
- build
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment