Skip to content
Snippets Groups Projects
Commit bc3a4099 authored by michael.minelli's avatar michael.minelli
Browse files

CI/CD => Fix tests

parent 09ca338b
No related branches found
No related tags found
No related merge requests found
Pipeline #26982 passed
.get_vars:
script:
- IS_DEV=$([[ $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_BRANCH != "test" ]] && echo false || echo true)
- IS_DEV=$([[ $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH && $CI_COMMIT_BRANCH != "test" ]] && echo true || echo false)
- 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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment