From a0fbf61664835eaaa979e0f6e25d994378639d51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Sun, 24 Oct 2021 11:23:20 +0200 Subject: [PATCH] clean up gitlab ci config --- .ci/configure_git.sh | 11 +++++++++++ .gitlab-ci.yml | 42 ++++++++++-------------------------------- 2 files changed, 21 insertions(+), 32 deletions(-) create mode 100644 .ci/configure_git.sh diff --git a/.ci/configure_git.sh b/.ci/configure_git.sh new file mode 100644 index 0000000..3d3b4fd --- /dev/null +++ b/.ci/configure_git.sh @@ -0,0 +1,11 @@ +eval $(ssh-agent -s) +echo "$GITLAB_DEPLOY_KEY" | base64 -d | tr -d '\r' | ssh-add - > /dev/null + +mkdir -p ~/.ssh +chmod 700 ~/.ssh + +ssh-keyscan gitlab.com >> ~/.ssh/known_hosts +chmod 644 ~/.ssh/known_hosts + +git config --global user.email "git@maximilian-kessler.de" +git config --global user.name "Maximilian Keßler (via gitlab runner)" diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ffde302..0561506 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,46 +1,25 @@ -stages: # List of stages for jobs, and their order of execution +stages: - get - build - pages - -get-build-repo: # This job runs in the build stage, which runs first. +get-build-repo: stage: get before_script: - - eval $(ssh-agent -s) - - echo "$GITLAB_DEPLOY_KEY" | base64 -d | tr -d '\r' | ssh-add - > /dev/null - - - mkdir -p ~/.ssh - - chmod 700 ~/.ssh - - - ssh-keyscan gitlab.com >> ~/.ssh/known_hosts - - chmod 644 ~/.ssh/known_hosts - - - git config --global user.email "git@maximilian-kessler.de" - - git config --global user.name "Maximilian Keßler (via gitlab runner)" + - .ci/configure_git.sh script: - echo "Getting old Build repo..." - .ci/get_build_repo_from_origin.sh - tags: - - latex artifacts: paths: - - build/* + - build/ + tags: + - latex -build-packages: # This job runs in the deploy stage. - stage: build # It only runs when *both* jobs in the test stage complete successfully. +build-packages: + stage: build before_script: - - eval $(ssh-agent -s) - - echo "$GITLAB_DEPLOY_KEY" | base64 -d | tr -d '\r' | ssh-add - > /dev/null - - - mkdir -p ~/.ssh - - chmod 700 ~/.ssh - - - ssh-keyscan gitlab.com >> ~/.ssh/known_hosts - - chmod 644 ~/.ssh/known_hosts - - - git config --global user.email "git@maximilian-kessler.de" - - git config --global user.name "Maximilian Keßler (via gitlab runner)" + - .ci/configure_git.sh script: - echo "Building packages incrementally..." - sh .ci/ci_build.sh @@ -48,11 +27,10 @@ build-packages: # This job runs in the deploy stage. GIT_SUBMODULE_STRATEGY: recursive artifacts: paths: - - build/* + - build/ tags: - latex - pages: stage: pages artifacts: