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.

136 lines
4.5 KiB

  1. ---
  2. resources:
  3. - name: resume-git
  4. type: git
  5. icon: git
  6. source:
  7. uri: ssh://git@git.nulloctet.com:8437/warricksothr/resume.git
  8. private_key: |
  9. ((pull_key))
  10. ignore_paths:
  11. - pipeline.yml
  12. - upload_pipeline.sh
  13. - README.md
  14. - name: resume-github-gh-pages
  15. type: git
  16. icon: github-circle
  17. source:
  18. uri: git@github.com:warricksothr/resume.git
  19. private_key: |
  20. ((push_key_github))
  21. branch: gh-pages
  22. jobs:
  23. - name: publish
  24. plan:
  25. - get: resume-git
  26. trigger: true
  27. - get: resume-github-gh-pages
  28. - task: build-resume-pdf
  29. config:
  30. platform: linux
  31. image_resource:
  32. type: registry-image
  33. source: { repository: schickling/latex, tag: "latest" }
  34. inputs:
  35. - name: resume-git
  36. outputs:
  37. - name: resume-pdf
  38. run:
  39. path: /bin/sh
  40. args:
  41. - -c
  42. - |
  43. cd resume-git
  44. latex --output-format pdf resume.tex
  45. latex --output-format pdf resume_for_recruiters.tex
  46. mv resume.pdf ../resume-pdf/
  47. mv resume_for_recruiters.pdf ../resume-pdf/
  48. - task: build-resume-html
  49. config:
  50. platform: linux
  51. image_resource:
  52. type: registry-image
  53. source:
  54. repository: ((nexus_docker_read.host))/sothr/pdf2htmlex
  55. tag: "stable"
  56. username: ((nexus_docker_read.username))
  57. password: ((nexus_docker_read.password))
  58. inputs:
  59. - name: resume-pdf
  60. outputs:
  61. - name: resume-html
  62. run:
  63. path: /bin/sh
  64. args:
  65. - -c
  66. - |
  67. cd resume-pdf
  68. pdf2htmlEX --zoom 1.5 --embed cfijo --dest-dir out resume.pdf
  69. mv out/resume.html out/index.html
  70. tar -czvf resume_site.tgz -C out/ .
  71. mv resume_site.tgz ../resume-html/
  72. - task: publish-site
  73. config:
  74. platform: linux
  75. image_resource:
  76. type: registry-image
  77. source:
  78. repository: ((nexus_docker_read.host))/sothr/deploy
  79. tag: "stable"
  80. username: ((nexus_docker_read.username))
  81. password: ((nexus_docker_read.password))
  82. inputs:
  83. - name: resume-pdf
  84. - name: resume-html
  85. params:
  86. DEPLOY_KEY: ((deploy.key))
  87. DEPLOY_HOST: ((deploy.host))
  88. DEPLOY_PORT: ((deploy.port))
  89. DEPLOY_USER: ((deploy.user))
  90. DEPLOY_TARGET: ((deploy.target))
  91. run:
  92. path: /bin/bash
  93. args:
  94. - -c
  95. - |
  96. eval `ssh-agent -s`
  97. ssh-add <(echo "${DEPLOY_KEY}")
  98. mkdir -p ~/.ssh
  99. ssh-keyscan -p ${DEPLOY_PORT} ${DEPLOY_HOST} >> ~/.ssh/known_hosts
  100. mkdir /tmp/deploy
  101. tar -xzvf resume-html/resume_site.tgz -C /tmp/deploy
  102. cp resume-pdf/resume.pdf /tmp/deploy
  103. cp resume-pdf/resume_for_recruiters.pdf /tmp/deploy
  104. 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}
  105. - task: publish-gh-pages
  106. config:
  107. platform: linux
  108. image_resource:
  109. type: registry-image
  110. source: { repository: alpine/git }
  111. inputs:
  112. - name: resume-pdf
  113. - name: resume-html
  114. - name: resume-github-gh-pages
  115. outputs:
  116. - name: updated-resume-github-gh-pages
  117. run:
  118. path: /bin/sh
  119. args:
  120. - -c
  121. - |
  122. git config --global user.email "concourse@warrick.sothr.com"
  123. git config --global user.name "Concourse"
  124. git clone resume-github-gh-pages updated-resume-github-gh-pages
  125. cd resume-html
  126. mkdir -p /tmp/resume_site
  127. tar -zxvf resume_site.tgz -C /tmp/resume_site
  128. cd ../updated-resume-github-gh-pages
  129. rm -rf *
  130. mv /tmp/resume_site/* .
  131. cp ../resume-pdf/*.pdf .
  132. git add .
  133. git commit -m"Auto update of resume page"
  134. - put: resume-github-gh-pages
  135. params:
  136. repository: updated-resume-github-gh-pages