The public sources for my resume. These sources are auto compiled and published upon changes.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

137 lines
4.5 KiB

---
resources:
- name: resume-git
type: git
icon: git
source:
uri: ssh://git@git.nulloctet.com:8437/warricksothr/resume.git
private_key: |
((pull_key))
ignore_paths:
- pipeline.yml
- upload_pipeline.sh
- README.md
- name: resume-github-gh-pages
type: git
icon: github-circle
source:
uri: git@github.com:warricksothr/resume.git
private_key: |
((push_key_github))
branch: gh-pages
jobs:
- name: publish
plan:
- get: resume-git
trigger: true
- get: resume-github-gh-pages
- task: build-resume-pdf
config:
platform: linux
image_resource:
type: registry-image
source: { repository: schickling/latex, tag: "latest" }
inputs:
- name: resume-git
outputs:
- name: resume-pdf
run:
path: /bin/sh
args:
- -c
- |
cd resume-git
latex --output-format pdf resume.tex
latex --output-format pdf resume_for_recruiters.tex
mv resume.pdf ../resume-pdf/
mv resume_for_recruiters.pdf ../resume-pdf/
- task: build-resume-html
config:
platform: linux
image_resource:
type: registry-image
source:
repository: ((nexus_docker_read.host))/sothr/pdf2htmlex
tag: "stable"
username: ((nexus_docker_read.username))
password: ((nexus_docker_read.password))
inputs:
- name: resume-pdf
outputs:
- name: resume-html
run:
path: /bin/sh
args:
- -c
- |
cd resume-pdf
pdf2htmlEX --zoom 1.5 --embed cfijo --dest-dir out resume.pdf
mv out/resume.html out/index.html
tar -czvf resume_site.tgz -C out/ .
mv resume_site.tgz ../resume-html/
- task: publish-site
config:
platform: linux
image_resource:
type: registry-image
source:
repository: ((nexus_docker_read.host))/sothr/deploy
tag: "stable"
username: ((nexus_docker_read.username))
password: ((nexus_docker_read.password))
inputs:
- name: resume-pdf
- name: resume-html
params:
DEPLOY_KEY: ((deploy.key))
DEPLOY_HOST: ((deploy.host))
DEPLOY_PORT: ((deploy.port))
DEPLOY_USER: ((deploy.user))
DEPLOY_TARGET: ((deploy.target))
run:
path: /bin/bash
args:
- -c
- |
eval `ssh-agent -s`
ssh-add <(echo "${DEPLOY_KEY}")
mkdir -p ~/.ssh
ssh-keyscan -p ${DEPLOY_PORT} ${DEPLOY_HOST} >> ~/.ssh/known_hosts
mkdir /tmp/deploy
tar -xzvf resume-html/resume_site.tgz -C /tmp/deploy
cp resume-pdf/resume.pdf /tmp/deploy
cp resume-pdf/resume_for_recruiters.pdf /tmp/deploy
rsync -avz --delete-delay -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p ${DEPLOY_PORT}" --progress /tmp/deploy/* ${DEPLOY_USER}@${DEPLOY_HOST}:${DEPLOY_TARGET}
- task: publish-gh-pages
config:
platform: linux
image_resource:
type: registry-image
source: { repository: alpine/git }
inputs:
- name: resume-pdf
- name: resume-html
- name: resume-github-gh-pages
outputs:
- name: updated-resume-github-gh-pages
run:
path: /bin/sh
args:
- -c
- |
git config --global user.email "concourse@warrick.sothr.com"
git config --global user.name "Concourse"
git clone resume-github-gh-pages updated-resume-github-gh-pages
cd resume-html
mkdir -p /tmp/resume_site
tar -zxvf resume_site.tgz -C /tmp/resume_site
cd ../updated-resume-github-gh-pages
rm -rf *
mv /tmp/resume_site/* .
cp ../resume-pdf/*.pdf .
git add .
git commit -m"Auto update of resume page"
- put: resume-github-gh-pages
params:
repository: updated-resume-github-gh-pages