From 7472a714b57867e450af5040d04c84fe1aa5835f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Luttringer?= Date: Fri, 3 Jan 2020 15:31:28 +0100 Subject: [PATCH] Add Gitlab CI --- .gitlab-ci.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..54f70e2 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,27 @@ +--- + +makepkg: + stage: build + script: + - seblu-build + artifacts: + name: $CI_PROJECT_NAME-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA + expire_in: 1 week + paths: + - "*.pkg.tar.xz" + - "*.pkg.tar.zst" + +commitpkg: + stage: deploy + script: + - eval $(ssh-agent -s) + # - trap "kill $SSH_AGENT_PID" 0 + # trap is broken in gitlab runner, see: + # https://gitlab.com/gitlab-org/gitlab-runner/issues/3009 + # use a workaournd with sleep and kill: + - sleep 300 && kill "$SSH_AGENT_PID" & disown + - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null + - seblu-push + only: + refs: + - master -- GitLab