Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
workerbee
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
workerbee
Commits
4e89a3d6
Verified
Commit
4e89a3d6
authored
1 month ago
by
Mateusz Tyszczak
Browse files
Options
Downloads
Patches
Plain Diff
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
#116181
failed
1 month ago
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+19
-52
19 additions, 52 deletions
.gitlab-ci.yml
npm-common-config
+1
-1
1 addition, 1 deletion
npm-common-config
with
20 additions
and
53 deletions
.gitlab-ci.yml
+
19
−
52
View file @
4e89a3d6
...
...
@@ -11,7 +11,7 @@ variables:
include
:
-
project
:
'
hive/common-ci-configuration'
ref
:
fae6329387a55aee40c3760a9af95a7705644bf0
ref
:
0c9ee69b5b0d65ada0148f3da0f3469d52c9bd1e
file
:
-
'
/templates/npm_projects.gitlab-ci.yml'
...
...
@@ -25,6 +25,13 @@ lint:
script
:
-
npm run lint-ci
supplement_documentation_url
:
stage
:
.pre
extends
:
.npm_generate_doc_url
variables
:
REPLACE_ENV_NAME
:
"
GEN_DOC_URL"
REPLACE_FILE_PATH
:
"
${CI_PROJECT_DIR}/README.md"
build
:
stage
:
build
extends
:
.npm_build_template
...
...
@@ -32,32 +39,25 @@ build:
DIST_DIR
:
"
$CI_PROJECT_DIR/dist"
NPM_PACKAGE_SCOPE
:
"
@hiveio"
NPM_PACKAGE_NAME
:
"
workerbee"
artifacts
:
paths
:
-
"
${DIST_DIR}/*.tgz"
when
:
always
expire_in
:
1 week
needs
:
-
job
:
lint
-
job
:
supplement_documentation_url
artifacts
:
true
# 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_
based_job_base
variables
:
DIST_DIR
:
"
$CI_PROJECT_DIR/dist"
PACKAGE_TGZ_PATH
:
"
${BUILT_PACKAGE_PATH}"
script
:
-
scripts/generate_api_docs.sh "${CI_PROJECT_URL}" "${CI_COMMIT_SHA}"
needs
:
-
job
:
build
-
job
:
supplement_documentation_url
artifacts
:
true
artifacts
:
paths
:
-
"
${DIST_DIR}/docs"
when
:
always
expire_in
:
1 week
...
...
@@ -74,6 +74,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 +82,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
...
...
@@ -123,9 +89,9 @@ deploy_dev_package:
PACKAGE_TGZ_PATH
:
"
${BUILT_PACKAGE_PATH}"
NPM_PACKAGE_SCOPE
:
"
@hiveio"
needs
:
-
job
:
lint
-
job
:
test
-
job
:
supplement_documentation_url
-
job
:
push_to_wiki
-
job
:
build
artifacts
:
true
deploy_production_public_npm
:
...
...
@@ -140,7 +106,8 @@ deploy_production_public_npm:
NPM_PROVENANCE_ENABLE
:
"
0"
# XXX: Temporarly disable as it is not working - we have to find a way to get it working
PACKAGE_TGZ_PATH
:
"
${BUILT_PACKAGE_PATH}"
needs
:
-
job
:
lint
-
job
:
deploy_dev_package
-
job
:
test
-
job
:
supplement_documentation_url
-
job
:
push_to_wiki
-
job
:
build
artifacts
:
true
This diff is collapsed.
Click to expand it.
npm-common-config
@
0c9ee69b
Compare
809760aa
...
0c9ee69b
Subproject commit
809760aa908707f808b3d49a916e8c7260672cf6
Subproject commit
0c9ee69b5b0d65ada0148f3da0f3469d52c9bd1e
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment