Skip to content
Snippets Groups Projects
Commit 78b63cd1 authored by Michael Blaschek's avatar Michael Blaschek :bicyclist:
Browse files

added cache to jobs, build

parent e4f92f69
Branches
Tags
No related merge requests found
#image: localhost:5000/mkdocs-imgw
image: python:3.9-buster image: python:3.9-buster
# Install all required packages variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
# Cache between jobs in the same branch
cache:
- key: $CI_COMMIT_REF_SLUG
- paths:
- .cache/pip
stages: stages:
- build - build
...@@ -9,9 +16,12 @@ stages: ...@@ -9,9 +16,12 @@ stages:
build: build:
rules: rules:
# only run pipeline when build is in the commit message
- if: $CI_COMMIT_MESSAGE =~ /.*build.*/ - if: $CI_COMMIT_MESSAGE =~ /.*build.*/
stage: build stage: build
before_script: before_script:
# Install all required packages
- pip install -r requirements.txt - pip install -r requirements.txt
script: script:
# --strict is too strict :) # --strict is too strict :)
...@@ -19,6 +29,10 @@ build: ...@@ -19,6 +29,10 @@ build:
artifacts: artifacts:
paths: paths:
- mkdocs.log - mkdocs.log
cache:
key: build-cache
paths:
- site/
deploy: deploy:
stage: deploy stage: deploy
...@@ -28,3 +42,7 @@ deploy: ...@@ -28,3 +42,7 @@ deploy:
- apt-get update -qq && apt-get install -y -qq sshpass openssh-client - apt-get update -qq && apt-get install -y -qq sshpass openssh-client
script: script:
- sshpass -p "$WOLKE_PASSWORD" scp -oStrictHostKeyChecking=no -r ./site/ $WOLKE_USER@wolke.img.univie.ac.at:/var/www/html/documentation/general/ - sshpass -p "$WOLKE_PASSWORD" scp -oStrictHostKeyChecking=no -r ./site/ $WOLKE_USER@wolke.img.univie.ac.at:/var/www/html/documentation/general/
cache:
key: build-cache
paths:
- site/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment