diff --git a/NodeApp/.gitlab-ci/00_vars.yml b/NodeApp/.gitlab-ci/00_vars.yml index 65955c8e7bef95f42e8ade31285b19ced34c2b93..642e2de4b7e2ad37e4cdb90bab91aa7676f34cf3 100644 --- a/NodeApp/.gitlab-ci/00_vars.yml +++ b/NodeApp/.gitlab-ci/00_vars.yml @@ -34,18 +34,4 @@ variables: VERSION_DEV_SUFFIX: '-dev' VERSION_TEST_SUFFIX: '-test' - WIKI_FOLDER: Wiki - - DOC_CHANGELOG_FILE: ZolaApp/content/changelog/projects/101_cli.md - DOC_FILE_BEGIN: | - +++ - title = "Dojo CLI" - slug = "dojo-cli" - weight = 101 - template = "docs/page.html" - - [extra] - lead = "Changelog of The Dojo CLI." - toc = true - top = false - +++ + WIKI_FOLDER: Wiki \ No newline at end of file diff --git a/NodeApp/.gitlab-ci/04_stageCodeQuality.yml b/NodeApp/.gitlab-ci/04_stageCodeQuality.yml index c10eae8504baed8bbb2688b9be5e6aef396bdd20..4742d1e1751730bf864712b27bcbd20fbec4b407 100644 --- a/NodeApp/.gitlab-ci/04_stageCodeQuality.yml +++ b/NodeApp/.gitlab-ci/04_stageCodeQuality.yml @@ -9,7 +9,11 @@ code_quality:lint: - npm install - npm run lint rules: - - if: '$CI_COMMIT_TAG =~ "/^$/"' + - if: $CI_COMMIT_TAG + when: never + - if: $CI_PIPELINE_SOURCE == "merge_request_event" + when: manual + - when: on_success code_quality:sonarqube: @@ -29,4 +33,8 @@ code_quality:sonarqube: script: - sonar-scanner rules: - - if: '$CI_COMMIT_TAG =~ "/^$/"' + - if: $CI_COMMIT_TAG + when: never + - if: $CI_PIPELINE_SOURCE == "merge_request_event" + when: manual + - when: on_success diff --git a/NodeApp/.gitlab-ci/05_stageTest.yml b/NodeApp/.gitlab-ci/05_stageTest.yml index 914033e3daf27044c12958f49ffb58bd6a093e08..9a70f95723f890ff766498cb96557381c5fc94a8 100644 --- a/NodeApp/.gitlab-ci/05_stageTest.yml +++ b/NodeApp/.gitlab-ci/05_stageTest.yml @@ -12,4 +12,12 @@ test:build: # Build - !reference [ .build_cli, script ] rules: - - if: '$CI_COMMIT_TAG =~ "/^$/" && $CI_COMMIT_REF_PROTECTED != "true" && $CI_COMMIT_BRANCH != "test"' + - if: $CI_COMMIT_TAG + when: never + - if: $CI_COMMIT_REF_PROTECTED == "true" + when: never + - if: $CI_COMMIT_BRANCH == "test" + when: never + - if: $CI_PIPELINE_SOURCE == "merge_request_event" + when: manual + - when: on_success diff --git a/NodeApp/.gitlab-ci/10_stageRelease.yml b/NodeApp/.gitlab-ci/10_stageRelease.yml index 0bb9f18d7afd1d151fde0848d081c32998548511..3485a45f772507ac38249dfe7c8ddea337b687a0 100644 --- a/NodeApp/.gitlab-ci/10_stageRelease.yml +++ b/NodeApp/.gitlab-ci/10_stageRelease.yml @@ -47,47 +47,6 @@ release:doc:wiki: - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' -release:doc:changelog: - stage: release - tags: - - release - image: ubuntu:latest - script: - # Install dependencies - - apt-get update -y - - apt-get install -y openssh-client git unzip sshpass --fix-missing - - # Add SSH key - - eval `ssh-agent -s` - - echo "$DOC_GIT_SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null - - - mkdir -p ~/.ssh - - chmod 700 ~/.ssh - - - echo "$DOC_GIT_SSH_PUBLIC_KEY" >> ~/.ssh/id_rsa.pub - - echo "$DOC_GIT_SSH_PRIVATE_KEY" >> ~/.ssh/id_rsa - - - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' - - # Set git config - - git config --global user.email "dojo@minelli.me" - - git config --global user.name "[Gitlab CI/CD] ${PROJECT_NAME}" - - # Pull repo - - git clone ssh://git@ssh.hesge.ch:10572/dojo_project/projects/ui/dojodoc.git - - # Do something after pulling your repo - - echo "${DOC_FILE_BEGIN}$(cat CHANGELOG.md)" > dojodoc/${DOC_CHANGELOG_FILE} - - # Push repo changes into current repo - - cd dojodoc - - git add ${DOC_CHANGELOG_FILE} - - git commit -m "[Gitlab CI/CD] ${PROJECT_NAME} => Automatic update of changelog" || echo "No changes, nothing to commit!" - - git push - rules: - - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' - - release:gitlab: stage: release tags: