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

Merge branch 'remove-changelog-autopush' into v3.6.0

parents 4da47a0e a9c9f702
No related branches found
No related tags found
No related merge requests found
Pipeline #30089 passed
......@@ -24,18 +24,4 @@ variables:
PACKAGE_REGISTRY_URL: "${GITLAB_API_PROJECT_URL}/packages/generic/${PROJECT_NAME}"
WIKI_FOLDER: Wiki
DOC_CHANGELOG_FILE: ZolaApp/content/changelog/projects/104_exercise-checker.md
DOC_FILE_BEGIN: |
+++
title = "Dojo Exercise Checker"
slug = "dojo-exercise-checker"
weight = 104
template = "docs/page.html"
[extra]
lead = "Changelog of The Dojo Exercise Checker."
toc = true
top = false
+++
WIKI_FOLDER: Wiki
\ No newline at end of file
......@@ -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
......@@ -9,4 +9,12 @@ test:build:
script:
- !reference [ .build_script, script ]
rules:
- if: '$CI_COMMIT_TAG =~ "/^$/" && $CI_COMMIT_REF_PROTECTED != "true" && $CI_COMMIT_BRANCH != "test"'
\ No newline at end of file
- 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
\ No newline at end of file
......@@ -12,4 +12,5 @@ build:version:
# Here docker buildx can use cached images created in previous step
- docker buildx build --platform $DOCKER_PLATFORMS --file $DOCKERFILE --push --tag $CONTAINER_IMAGE .
rules:
- if: '$CI_COMMIT_REF_PROTECTED == "true" || $CI_COMMIT_BRANCH == "test"'
\ No newline at end of file
- if: $CI_COMMIT_REF_PROTECTED == "true"
- if: $CI_COMMIT_BRANCH == "test"
\ No newline at end of file
......@@ -7,7 +7,7 @@ clean:release:
- !reference [ .get_version, script ]
- !reference [ .clean_release, script ]
rules:
- if: '$CI_COMMIT_REF_PROTECTED == "true"'
- if: $CI_COMMIT_REF_PROTECTED == "true"
clean:packages:
......@@ -19,7 +19,7 @@ clean:packages:
- !reference [ .get_version, script ]
- !reference [ .clean_packages, script ]
rules:
- if: '$CI_COMMIT_REF_PROTECTED == "true"'
- if: $CI_COMMIT_REF_PROTECTED == "true"
clean:release:dev:
......@@ -32,7 +32,7 @@ clean:release:dev:
- VERSION="${VERSION}${VERSION_DEV_SUFFIX}"
- !reference [ .clean_release, script ]
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
clean:packages:dev:
......@@ -45,7 +45,7 @@ clean:packages:dev:
- VERSION="${VERSION}${VERSION_DEV_SUFFIX}"
- !reference [ .clean_packages, script ]
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
clean:dockerhub:dev:
......@@ -72,4 +72,4 @@ clean:dockerhub:dev:
## Delete tag
- 'curl --header "Authorization: JWT ${TOKEN}" --request DELETE "https://hub.docker.com/v2/repositories/${DOCKER_REGISTRY_IMAGE}/tags/${VERSION}/"'
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
\ No newline at end of file
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
\ No newline at end of file
......@@ -19,4 +19,4 @@ upload:packages:doc:wiki:
# Send package
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ${WIKI_ARCHIVE_PATH} "${PACKAGE_URL_WIKI}";'
rules:
- if: '$CI_COMMIT_REF_PROTECTED == "true"'
\ No newline at end of file
- if: $CI_COMMIT_REF_PROTECTED == "true"
\ No newline at end of file
......@@ -12,7 +12,8 @@ release:dockerhub:latest:
# Push latest tag
- docker buildx imagetools create $CONTAINER_IMAGE --tag $DOCKER_REGISTRY_IMAGE:latest
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH == "test"'
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_COMMIT_BRANCH == "test"
release:doc:wiki:
......@@ -60,48 +61,7 @@ release:doc:wiki:
# Push the change back to the master branch of the wiki
- git push origin "HEAD:main"
rules:
- 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'
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
release:gitlab:
......@@ -141,4 +101,4 @@ release:gitlab:
--header "JOB-TOKEN: $CI_JOB_TOKEN" \
--request POST "${GITLAB_API_PROJECT_URL}/releases"
rules:
- if: '$CI_COMMIT_REF_PROTECTED == "true"'
\ No newline at end of file
- if: $CI_COMMIT_REF_PROTECTED == "true"
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment