From 708f260608369227871a8c49c5eb49665133a63f Mon Sep 17 00:00:00 2001 From: Black Hat Date: Thu, 2 Aug 2018 19:15:24 +0000 Subject: [PATCH] Split work. --- .gitlab-ci.yml | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ebdc3a4..0760b84 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,21 @@ stages: + - preparation - build + - deploy + +cache: + untracked: true + key: "$CI_PROJECT_ID" + paths: + - /tmp/matrique-repo + +preparation-flatpak: + image: fedora:latest + stage: preparation + script: + - cd /tmp + - git clone "https://$GIT_USERNAME:$GIT_PASSWORD@gitlab.com/b0/matrique-repo" + - cd /builds/b0/matrique build-native: image: rabits/qt:5.11-desktop @@ -20,16 +36,19 @@ build-flatpak: stage: build before_script: - git submodule update --init --recursive - - cd /tmp - - git config --global user.name "$GIT_NAME" - - git config --global user.email "$GIT_EMAIL" - - git clone "https://$GIT_USERNAME:$GIT_PASSWORD@gitlab.com/b0/matrique-repo" - - cd /builds/b0/matrique script: - gpg2 -v --import <(echo "$GPG_SECRET_KEY") - cd flatpak - flatpak-builder --repo=/tmp/matrique-repo/public build-dir org.eu.encom.matrique.json --force-clean --gpg-sign=52986BF4D61350EC249F2E891B0DB3358FC5E4B2 + +deploy-flatpak: + image: fedora:latest + stage: deploy + before_script: + - git config --global user.name "$GIT_NAME" + - git config --global user.email "$GIT_EMAIL" + script: - cd /tmp/matrique-repo - git add -A - git commit -m "$CI_COMMIT_MESSAGE" - - git push origin master + - git push origin master \ No newline at end of file