Skip to content
Snippets Groups Projects
Verified Commit d97208ca authored by Mateusz Tyszczak's avatar Mateusz Tyszczak :scroll:
Browse files

Update CI configuration

parent ffc3db90
No related branches found
No related tags found
1 merge request!9Move to hiveio
......@@ -11,14 +11,12 @@ variables:
# uses registry.gitlab.syncad.com/hive/hive/ci-base-image:ubuntu22.04-8
CI_BASE_IMAGE_TAG: "@sha256:e9f16040010ad24fffeabec66abca109b24baa79d912eba3118da58e8130fb26"
CI_BASE_IMAGE: "registry.gitlab.syncad.com/hive/hive/ci-base-image${CI_BASE_IMAGE_TAG}"
# Deploy data
NPM_TOKEN: $CI_JOB_TOKEN
include:
- project: 'hive/common-ci-configuration'
ref: 44d0cec8cfa8fb87d0daf5cef1485fb57b9e26fd
ref: 39a4bcaaa59bc364807ef1e06d40f3084947bb56
file:
- '/templates/wasm_build.gitlab-ci.yml'
- '/templates/npm_projects.gitlab-ci.yml'
image: "${CI_BASE_IMAGE}"
......@@ -26,19 +24,11 @@ default:
tags:
- public-runner-docker
.configuration:
tags:
- public-runner-docker
lint:
stage: .pre
image: ${EMSCRIPTEN_IMAGE}
before_script:
- pnpm install
extends: .npm_based_job_base
script:
- npm run lint
tags:
- public-runner-docker
build:
stage: build
......@@ -49,49 +39,27 @@ build:
NPM_PACKAGE_NAME: "workerbee"
artifacts:
paths:
- "$CI_PROJECT_DIR/dist/*.tgz"
- "$CI_PROJECT_DIR/dist/bundle/web-full.*"
- "${DIST_DIR}/*.tgz"
- "${DIST_DIR}/bundle/web-full.*"
when: always
expire_in: 1 week
tags:
- public-runner-docker
test:
stage: test
# emscripten image can be used as it contains all needed tools.
image: ${EMSCRIPTEN_IMAGE}
before_script:
- . "$NVM_DIR/nvm.sh" # This loads nvm
- tar -xf "$CI_PROJECT_DIR"/dist/hive-workerbee-*.tgz --strip-components=1
- pnpm install
script:
- npm run test
extends: .npm_test_template
variables:
PACKAGE_TGZ_PATH: "${BUILT_PACKAGE_PATH}"
needs:
- job: build
artifacts: true
artifacts:
reports:
junit: results.xml
paths:
- "$CI_PROJECT_DIR/results.json"
tags:
- public-runner-docker
deploy_dev_package:
stage: deploy
# emscripten image can be used as it contains all needed tools.
image: ${EMSCRIPTEN_IMAGE}
extends: .npm_deploy_package_template
variables:
PUBLISH_TOKEN: "$NPM_TOKEN"
NPM_SCOPE: "@hiveio"
NPM_REGISTRY: "gitlab.syncad.com/api/v4/projects/${CI_PROJECT_ID}/packages/npm/"
script:
- tar -xf "$CI_PROJECT_DIR"/dist/hive-workerbee-*.tgz --strip-components=1
- scripts/bump_npm_version.sh "$PUBLISH_TOKEN" "$NPM_SCOPE" "$NPM_REGISTRY"
- scripts/npm_publish.sh
PACKAGE_TGZ_PATH: "${BUILT_PACKAGE_PATH}"
NPM_PACKAGE_SCOPE: "@hiveio"
needs:
- job: test
- job: build
......@@ -99,8 +67,7 @@ deploy_dev_package:
deploy_production_public_npm:
stage: deploy
# emscripten image can be used as it contains all needed tools.
image: ${EMSCRIPTEN_IMAGE}
extends: .registry_npmjs_org_deploy_package_template
variables:
NPM_PUBLISH_TOKEN: "$INTERNAL_HIDDEN_PUBLISH_TOKEN"
NPM_PACKAGE_NAME: "workerbee"
......
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