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

Update CI to run only one wiki-related job

parent ac7d40e7
No related branches found
No related tags found
No related merge requests found
Pipeline #116173 failed
......@@ -11,7 +11,7 @@ variables:
include:
- project: 'hive/common-ci-configuration'
ref: fae6329387a55aee40c3760a9af95a7705644bf0
ref: c17ed3951028ae1ef96fb76e46b9b1652fd6c4aa
file:
- '/templates/npm_projects.gitlab-ci.yml'
......@@ -41,13 +41,24 @@ build:
needs:
- job: lint
# Generates documentation and supplements wiki URL so it is available in Wiki and published package README
generate_docs:
stage: build
extends: .npm_process_built_package_tarball
extends: .npm_generate_doc_url
variables:
DIST_DIR: "$CI_PROJECT_DIR/dist"
PACKAGE_TGZ_PATH: "${BUILT_PACKAGE_PATH}"
script:
- |
set -xe
cd "${SOURCE_DIR}"
echo "Attempting to replace generated documentation url placeholder: ${DOC_URL}"
sed -i "s<\${GEN_DOC_URL}<${DOC_URL}<g" README.md
if grep -q "\${GEN_DOC_URL}" README.md; then exit 1; fi # Ensure that the placeholder was replaced
pnpm pack --pack-destination "${DIST_DIR}" --json > ""${DIST_DIR}/built_package_info.json" # repack to include updated README in final package
BUILT_PACKAGE_NAME=$(jq -r .[].filename "${DIST_DIR}/built_package_info.json")
echo BUILT_PACKAGE_PATH="${DIST_DIR}/${BUILT_PACKAGE_NAME}" > built_package_info.env
- scripts/generate_api_docs.sh "${CI_PROJECT_URL}" "${CI_COMMIT_SHA}"
needs:
......@@ -55,8 +66,12 @@ generate_docs:
artifacts: true
artifacts:
reports:
dotenv:
- "${SOURCE_DIR}/built_package_info.env" # contains path to produced tgz
paths:
- "${DIST_DIR}/docs"
- "${DIST_DIR}/*.tgz" # Built package
when: always
expire_in: 1 week
......@@ -74,6 +89,7 @@ push_to_wiki:
extends: .npm_push_doc_template
stage: deploy
variables:
PACKAGE_TGZ_PATH: "${BUILT_PACKAGE_PATH}"
WIKI_PUSH_TOKEN: "$WIKI_PUSH_TOKEN"
DIST_DIR: "$CI_PROJECT_DIR/dist"
......@@ -81,41 +97,6 @@ push_to_wiki:
- job: generate_docs
artifacts: true
supplement_documentation_url:
extends: .npm_process_built_package_tarball
stage: deploy
needs:
- job: build
artifacts: true
- job: push_to_wiki
artifacts: true
variables:
PACKAGE_TGZ_PATH: "${BUILT_PACKAGE_PATH}"
DIST_DIR: "$CI_PROJECT_DIR/dist"
script:
- |
set -xe
cd "${SOURCE_DIR}"
echo "Attempting to replace generated documentation url placeholder: "${GEN_DOC_URL}""
sed -i "s<\${GEN_DOC_URL}<${GEN_DOC_URL}<g" README.md
if grep -q "\${GEN_DOC_URL}" README.md; then exit 1; fi # Ensure that the placeholder was replaced
pnpm pack --pack-destination "${DIST_DIR}" --json > ""${DIST_DIR}/built_package_info.json" # repack to include updated README in final package
BUILT_PACKAGE_NAME=$(jq -r .[].filename "${DIST_DIR}/built_package_info.json")
echo BUILT_PACKAGE_PATH="${DIST_DIR}/${BUILT_PACKAGE_NAME}" > built_package_info.env
artifacts:
reports:
dotenv:
- "${SOURCE_DIR}/built_package_info.env" # contains path to produced tgz
paths:
- "${DIST_DIR}/*.tgz" # Built package
when: always
expire_in: 1 week
deploy_dev_package:
stage: deploy
extends: .npm_deploy_package_template
......@@ -125,7 +106,7 @@ deploy_dev_package:
needs:
- job: lint
- job: test
- job: supplement_documentation_url
- job: push_to_wiki
artifacts: true
deploy_production_public_npm:
......@@ -142,5 +123,5 @@ deploy_production_public_npm:
needs:
- job: lint
- job: test
- job: supplement_documentation_url
- job: push_to_wiki
artifacts: true
Subproject commit 809760aa908707f808b3d49a916e8c7260672cf6
Subproject commit c17ed3951028ae1ef96fb76e46b9b1652fd6c4aa
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