Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DojoCLI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package 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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dojo Project (HES-SO)
Projects
UI
DojoCLI
Commits
ed76e8ab
Commit
ed76e8ab
authored
1 year ago
by
michael.minelli
Browse files
Options
Downloads
Patches
Plain Diff
CI/CD => Add decrypt en vars & set version of cli
parent
9668ab1b
No related branches found
No related tags found
1 merge request
!2
Adds a first version of the wiki documentation
Pipeline
#26407
failed
1 year ago
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+13
-4
13 additions, 4 deletions
.gitlab-ci.yml
with
13 additions
and
4 deletions
.gitlab-ci.yml
+
13
−
4
View file @
ed76e8ab
...
@@ -74,6 +74,19 @@ variables:
...
@@ -74,6 +74,19 @@ variables:
# Install dependencies
# Install dependencies
-
npm install
-
npm install
# Set version number shown in CLI
-
sed -r "s/(\.version[ ]*\([ ]*\').*(\'[ ]*\))/\1${VERSION}\2/g" src/commander/CommanderApp.ts > src/commander/CommanderApp.ts
# Decrypt env vars for production
-
|
if [ $CI_COMMIT_REF_PROTECTED == "true" ]; then
echo "Decrypt production env vars"
sed -r "s/(\,(\n)?[]+)?(DOTENV_KEY[ ]*:[ ]*[\'\"\`])[^'\"\`]*([\'\"\`])//g" src/app.ts > src/app.ts;
npx dotenv-vault local decrypt "${DOTENV_PROD_KEY}" > .env
fi
# Build
-
npm run build
-
npm run build
# Build binaries
# Build binaries
...
@@ -168,10 +181,6 @@ build:version:
...
@@ -168,10 +181,6 @@ build:version:
-
mkdir -p $ARTIFACTS_FOLDER
-
mkdir -p $ARTIFACTS_FOLDER
-
echo $VERSION > $VERSION_FILE
-
echo $VERSION > $VERSION_FILE
-
|
echo "Replace DOTENV_KEY if we are on a protected branch" # Hide the print of the DOTENV_PROD_KEY
sed -r "s/(DOTENV_KEY[ ]*:[ ]*[\'\"\`])[^'\"\`]*([\'\"\`])/\${DOTENV_PROD_KEY}\2/g" ${PROJECT_FOLDER}/src/app.ts > ${PROJECT_FOLDER}/src/app.ts;
# Build
# Build
-
!reference
[
.build_cli
,
script
]
-
!reference
[
.build_cli
,
script
]
artifacts
:
artifacts
:
...
...
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