Skip to content
Snippets Groups Projects
Verified Commit 83be567e authored by Adrián Rošinec's avatar Adrián Rošinec
Browse files

Revert changes to .gitlab-ci.yml

parent 90ea8b1b
Branches
No related tags found
No related merge requests found
Pipeline #258972 failed
...@@ -13,10 +13,6 @@ variables: ...@@ -13,10 +13,6 @@ variables:
GIT_SUBMODULE_STRATEGY: recursive GIT_SUBMODULE_STRATEGY: recursive
GIT_DEPTH: 0 GIT_DEPTH: 0
.default_rules:
rules:
- if: ($CI_PIPELINE_SOURCE == "schedule" && $IS_NEW_VERSION_REQUIRED) || $CI_PIPELINE_SOURCE != "schedule"
check_current_version: check_current_version:
before_script: before_script:
- apk add html-xml-utils curl jq - apk add html-xml-utils curl jq
...@@ -24,15 +20,10 @@ check_current_version: ...@@ -24,15 +20,10 @@ check_current_version:
script: script:
- echo https://$HOSTING_HOST - echo https://$HOSTING_HOST
- 'export CSITE_VERSION=$(curl -s https://${HOSTING_HOST} | hxnormalize -xe | hxselect -c "script#__config" | hxuncdata | jq -r .version)' - 'export CSITE_VERSION=$(curl -s https://${HOSTING_HOST} | hxnormalize -xe | hxselect -c "script#__config" | hxuncdata | jq -r .version)'
- 'export IS_NEW_VERSION_REQUIRED=$([[ "$CSITE_VERSION" == "$CI_COMMIT_SHORT_SHA" ]] && echo "false" || echo "true")' - echo "Found site version $CSITE_VERSION"
- echo "Found site version $CSITE_VERSION therefore NEW VERSION IS REQUIRED $IS_NEW_VERSION_REQUIRED" - '[[ "$CSITE_VERSION" != "$CI_COMMIT_SHORT_SHA" ]]'
- echo "CURRENT_SITE_VERSION=$CSITE_VERSION" >> version.env
- echo "IS_NEW_VERSION_REQUIRED=$IS_NEW_VERSION_REQUIRED" >> version.env
rules: rules:
- if: $CI_PIPELINE_SOURCE == "schedule" - if: $CI_PIPELINE_SOURCE == "schedule"
artifacts:
reports:
dotenv: version.env
docs: docs:
stage: test stage: test
...@@ -40,8 +31,6 @@ docs: ...@@ -40,8 +31,6 @@ docs:
allow_failure: true allow_failure: true
script: script:
- mdl -r ~MD013,~MD010,~MD014,~MD024,~MD026,~MD029,~MD033,~MD036,~MD037,~MD046 *.md main/ topics/ # BUGS - mdl -r ~MD013,~MD010,~MD014,~MD024,~MD026,~MD029,~MD033,~MD036,~MD037,~MD046 *.md main/ topics/ # BUGS
rules:
- !reference [.default_rules, rules]
# pylint: # pylint:
# stage: test # stage: test
...@@ -66,8 +55,6 @@ capitalize: ...@@ -66,8 +55,6 @@ capitalize:
allow_failure: true allow_failure: true
script: script:
- find mkdocs.yml topics/ main/ \( -name '*.md' -o -name '*.yml' \) -print0 | xargs -0 -n1 scripts/titlemd.py --test - find mkdocs.yml topics/ main/ \( -name '*.md' -o -name '*.yml' \) -print0 | xargs -0 -n1 scripts/titlemd.py --test
rules:
- !reference [.default_rules, rules]
ext_links: ext_links:
stage: after_test stage: after_test
...@@ -78,8 +65,6 @@ ext_links: ...@@ -78,8 +65,6 @@ ext_links:
- rm *.json - rm *.json
script: script:
- find topics/ main/ -name '*.md' -exec grep --color -l http {} + | xargs awesome_bot -t 10 --allow-dupe --allow-redirect - find topics/ main/ -name '*.md' -exec grep --color -l http {} + | xargs awesome_bot -t 10 --allow-dupe --allow-redirect
rules:
- !reference [.default_rules, rules]
404s: 404s:
stage: after_test stage: after_test
...@@ -95,7 +80,6 @@ ext_links: ...@@ -95,7 +80,6 @@ ext_links:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: never when: never
- if: $CI_COMMIT_BRANCH - if: $CI_COMMIT_BRANCH
- !reference [.default_rules, rules]
# mkdocs: # mkdocs:
# stage: build # stage: build
...@@ -161,7 +145,6 @@ docker-build: ...@@ -161,7 +145,6 @@ docker-build:
- .docker - .docker
when: on_success when: on_success
rules: rules:
- !reference [.default_rules, rules]
- if: $CI_COMMIT_BRANCH - if: $CI_COMMIT_BRANCH
exists: exists:
- Dockerfile - Dockerfile
...@@ -184,9 +167,8 @@ mkdocs: ...@@ -184,9 +167,8 @@ mkdocs:
name: "${CI_REGISTRY_IMAGE}:latest" name: "${CI_REGISTRY_IMAGE}:latest"
entrypoint: ["/bin/sh", "-c"] entrypoint: ["/bin/sh", "-c"]
<<: *mkdocs-build <<: *mkdocs-build
rules: only:
- !reference [.default_rules, rules] - master
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
mkdocs-dev: mkdocs-dev:
image: image:
...@@ -216,10 +198,9 @@ deploy production: ...@@ -216,10 +198,9 @@ deploy production:
url: https://${HOSTING_HOST} url: https://${HOSTING_HOST}
script: script:
- rsync -a -e "ssh -o StrictHostKeyChecking=no" --delete --exclude=/review site/ ${HOSTING_USERNAME}@${HOSTING_HOST}:~/public_html - rsync -a -e "ssh -o StrictHostKeyChecking=no" --delete --exclude=/review site/ ${HOSTING_USERNAME}@${HOSTING_HOST}:~/public_html
only:
- master
<<: *prepare_deploy <<: *prepare_deploy
rules:
- !reference [.default_rules, rules]
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
deploy dev: deploy dev:
needs: ["mkdocs-dev"] needs: ["mkdocs-dev"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment