Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DojoExerciseChecker
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dojo Project (HES-SO)
Projects
Pipelines
DojoExerciseChecker
Commits
bc3a4099
Commit
bc3a4099
authored
1 year ago
by
michael.minelli
Browse files
Options
Downloads
Patches
Plain Diff
CI/CD => Fix tests
parent
09ca338b
No related branches found
No related tags found
No related merge requests found
Pipeline
#26982
passed
1 year ago
Stage: code_quality
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ExerciseChecker/.gitlab-ci/01_functions.yml
+4
-4
4 additions, 4 deletions
ExerciseChecker/.gitlab-ci/01_functions.yml
with
4 additions
and
4 deletions
ExerciseChecker/.gitlab-ci/01_functions.yml
+
4
−
4
View file @
bc3a4099
.get_vars
:
script
:
-
IS_DEV=$([[ $CI_COMMIT_BRANCH
=
= $CI_DEFAULT_BRANCH && $CI_COMMIT_BRANCH != "test" ]] && echo
fals
e
|| echo
tru
e
)
-
IS_DEV=$([[ $CI_COMMIT_BRANCH
!
= $CI_DEFAULT_BRANCH && $CI_COMMIT_BRANCH != "test" ]] && echo
tru
e
|| echo
fals
e
)
-
IS_TEST=$([[ $CI_COMMIT_BRANCH == "test" ]] && echo
true
|| echo
false
)
-
|
if [ $IS_TEST == true ]; then
if [
[
$IS_TEST == true
]
]; then
DOCKER_REGISTRY_USER="dojohessotest"
DOCKER_REGISTRY_IMAGE="dojohesso/dojo-test_exercise_checker"
DOCKER_REGISTRY_PASSWORD=$DOCKER_TEST_REGISTRY_PASSWORD
...
...
@@ -33,7 +33,7 @@
# Init docker buildx
-
|
if [ $CI_COMMIT_REF_PROTECTED == "true" || $
CI_COMMIT_BRANCH == "test"
]; then
if [
[
$CI_COMMIT_REF_PROTECTED == "true" || $
IS_TEST == true ]
]; then
docker login -u $DOCKER_REGISTRY_USER -p $DOCKER_REGISTRY_PASSWORD $DOCKER_REGISTRY
fi
-
docker buildx create --use
...
...
@@ -53,7 +53,7 @@
-
cd $PROJECT_FOLDER
-
sed -i -r "s/\{\{VERSION\}\}/${VERSION}/g" src/app.ts
-
|
if [ $CI_COMMIT_REF_PROTECTED == "true" || $
CI_COMMIT_BRANCH == "test"
]; then
if [
[
$CI_COMMIT_REF_PROTECTED == "true" || $
IS_TEST == true ]
]; then
echo "Decrypt production env vars"
sed -i -r "s/(DOTENV_KEY[ ]*:[ ]*[\'\"\`])[^'\"\`]*([\'\"\`])([ ]*\,)?//g" src/app.ts
sed -i -r "s/,[\ \n]*\}/\}/g" src/app.ts
...
...
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