2019-12-22 02:53:11 +00:00
|
|
|
---
|
|
|
|
.use-cv-builder:
|
2020-08-08 04:36:13 +01:00
|
|
|
image: ${IMAGE_NAME}:master-cb8a29c7
|
2019-12-22 02:53:11 +00:00
|
|
|
|
2020-02-08 13:56:21 +00:00
|
|
|
.test-conditions:
|
2020-08-08 04:36:13 +01:00
|
|
|
rules:
|
|
|
|
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
|
|
|
when: always
|
|
|
|
- if:
|
2020-02-08 13:56:21 +00:00
|
|
|
changes:
|
|
|
|
- docker/Dockerfile
|
|
|
|
- __output/*
|
2020-08-08 04:36:13 +01:00
|
|
|
when: never
|
|
|
|
|
|
|
|
.publish-conditions:
|
|
|
|
rules:
|
|
|
|
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PROJECT_PATH == "dananglin/cv"'
|
|
|
|
when: always
|
|
|
|
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
|
|
|
when: never
|
|
|
|
- if:
|
|
|
|
changes:
|
|
|
|
- docker/Dockerfile
|
|
|
|
- __output/*
|
|
|
|
when: never
|
2020-02-08 13:56:21 +00:00
|
|
|
|
|
|
|
test:spellcheck:
|
|
|
|
before_script:
|
|
|
|
- apt-get update
|
|
|
|
- apt-get -y install aspell make
|
|
|
|
extends:
|
|
|
|
- .test-conditions
|
|
|
|
image: ubuntu:18.04
|
|
|
|
stage: test
|
|
|
|
script:
|
|
|
|
- make spellcheck
|
|
|
|
|
2020-02-07 16:05:30 +00:00
|
|
|
test:pdf:
|
|
|
|
artifacts:
|
|
|
|
expire_in: 1 hour
|
|
|
|
paths:
|
|
|
|
- __output/cv.pdf
|
2020-02-08 13:56:21 +00:00
|
|
|
extends:
|
|
|
|
- .use-cv-builder
|
|
|
|
- .test-conditions
|
2020-02-07 16:05:30 +00:00
|
|
|
stage: test
|
|
|
|
script:
|
2020-08-08 04:36:13 +01:00
|
|
|
- make clean pdf
|
2020-02-07 16:05:30 +00:00
|
|
|
|
|
|
|
publish:pdf:
|
2020-08-08 04:36:13 +01:00
|
|
|
extends:
|
|
|
|
- .use-cv-builder
|
|
|
|
- .publish-conditions
|
2019-12-22 02:53:11 +00:00
|
|
|
before_script:
|
|
|
|
- eval $(ssh-agent -s)
|
|
|
|
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
|
|
|
|
- mkdir -p ~/.ssh && chmod 700 ~/.ssh
|
|
|
|
- echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
|
|
|
|
- chmod 0400 ~/.ssh/known_hosts
|
|
|
|
- git remote set-url origin git@gitlab.com:${CI_PROJECT_PATH}.git
|
|
|
|
- git config --global user.email "${GITLAB_USER_EMAIL}"
|
|
|
|
- git config --global user.name "${GITLAB_USER_NAME}"
|
|
|
|
stage: publish
|
|
|
|
script:
|
2020-08-08 04:36:13 +01:00
|
|
|
- make clean pdf
|
2019-12-22 02:53:11 +00:00
|
|
|
- git checkout master
|
|
|
|
- git add __output/cv.pdf
|
|
|
|
- 'git commit -m "auto: update CV."'
|
|
|
|
- git push origin master
|