diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c1428a03f1642801045b73c627281340f5acc12d..9101fa8b735aef3ff1e33abab638b26c40c33841 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,53 +18,6 @@ variables: Meshalyzer is a graphical program for display time dependent data on 3D finite elment meshes. <br> Find the changelog [here](https://git.opencarp.org/openCARP/meshalyzer/blob/master/CHANGELOG.md). -build-pdf-manual: - stage: build - image: $PDF_MANUAL_MAKER_IMAGE - script: - - cd manual && pdflatex manual && pdflatex manual - artifacts: - paths: - - manual/manual.pdf - expire_in: 2 hour - -release-pdf-manual: - stage: release - image: ubuntu:18.04 - dependencies: - - build-pdf-manual - only: - - master - - tags - before_script: - # setup rsync - - apt-get update && apt-get install -y openssh-client rsync - - eval $(ssh-agent -s) - - mkdir -p ~/.ssh - - chmod 700 ~/.ssh - - echo "$SSH_PRIVATE_KEY" | base64 -d | ssh-add - - - ssh-keyscan -H sulmass.scc.kit.edu > ~/.ssh/known_hosts - script: - - cp manual/manual.pdf $PDF_MANUAL - - "rsync -av --delete $PDF_MANUAL $PDF_MANUAL_DESTINATION/" - - > - if [ "$CI_COMMIT_TAG" != "" ]; then - cp manual/manual.pdf $PDF_MANUAL_RELEASE && - rsync -av --delete $PDF_MANUAL_RELEASE $PDF_MANUAL_DESTINATION/ - fi - -release-create: - stage: release - image: python:3.7 - only: - - tags - except: - - branches - before_script: - # setup pipelines - - git clone https://opencarp-admin:${PRIVATE_TOKEN}@git.opencarp.org/infrastructure/pipelines.git - - pip install -r pipelines/requirements.txt - script: - - > - python pipelines/scripts/create_release.py - $PDF_MANUAL_RELEASE_URL +include: +- local: .gitlab/ci/pdf.gitlab-ci.yml +- local: .gitlab/ci/release.gitlab-ci.yml diff --git a/.gitlab/ci/pdf.gitlab-ci.yml b/.gitlab/ci/pdf.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..db4e4cb5fd0b0ddee1fcfd8414b9fcf7e8dc69e5 --- /dev/null +++ b/.gitlab/ci/pdf.gitlab-ci.yml @@ -0,0 +1,34 @@ +build-pdf-manual: + stage: build + image: $PDF_MANUAL_MAKER_IMAGE + script: + - cd manual && pdflatex manual && pdflatex manual + artifacts: + paths: + - manual/manual.pdf + expire_in: 2 hour + +release-pdf-manual: + stage: release + image: ubuntu:18.04 + dependencies: + - build-pdf-manual + only: + - master + - tags + before_script: + # setup rsync + - apt-get update && apt-get install -y openssh-client rsync + - eval $(ssh-agent -s) + - mkdir -p ~/.ssh + - chmod 700 ~/.ssh + - echo "$SSH_PRIVATE_KEY" | base64 -d | ssh-add - + - ssh-keyscan -H sulmass.scc.kit.edu > ~/.ssh/known_hosts + script: + - cp manual/manual.pdf $PDF_MANUAL + - "rsync -av --delete $PDF_MANUAL $PDF_MANUAL_DESTINATION/" + - > + if [ "$CI_COMMIT_TAG" != "" ]; then + cp manual/manual.pdf $PDF_MANUAL_RELEASE && + rsync -av --delete $PDF_MANUAL_RELEASE $PDF_MANUAL_DESTINATION/ + fi diff --git a/.gitlab/ci/release.gitlab-ci.yml b/.gitlab/ci/release.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..c30a64580227ae4139a600c1615f80e4a5ee4ea4 --- /dev/null +++ b/.gitlab/ci/release.gitlab-ci.yml @@ -0,0 +1,15 @@ +release-create: + stage: release + image: python:3.7 + only: + - tags + except: + - branches + before_script: + # setup pipelines + - git clone https://opencarp-admin:${PRIVATE_TOKEN}@git.opencarp.org/infrastructure/pipelines.git + - pip install -r pipelines/requirements.txt + script: + - > + python pipelines/scripts/create_release.py + $PDF_MANUAL_RELEASE_URL