[gnome-build-meta/abderrahim/child-pipelines: 10/11] .gitlab-ci.yml: publish to gnomeos in a single job
- From: Abderrahim Kitouni <akitouni src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-build-meta/abderrahim/child-pipelines: 10/11] .gitlab-ci.yml: publish to gnomeos in a single job
- Date: Sun, 9 Aug 2020 18:24:09 +0000 (UTC)
commit 102064bf171e29f5c1763f6742a9d44ef1c4d650
Author: Abderrahim Kitouni <akitouni gnome org>
Date: Sun Aug 9 19:12:11 2020 +0100
.gitlab-ci.yml: publish to gnomeos in a single job
This simplifies the pipeline especially since we only publish on x86_64
.gitlab-ci.yml | 72 ++++++++++++++++------------------------------------------
1 file changed, 19 insertions(+), 53 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5b8ffaf4..6a6d1410 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -18,9 +18,7 @@ stages:
- prepare_flatpak
- flatpak
- finish_flatpak
-- prepare_ostree
- ostree
-- finish_ostree
- reports
default:
@@ -73,10 +71,6 @@ default:
;;
esac
- - |
- export OSTREE_FLAT_MANAGER_SERVER=https://flatmgr-ostree.openshift.gnome.org/
- export OSTREE_FLAT_MANAGER_REPO=gnomeos
-
#
# Templates shared by multiple jobs
#
@@ -164,23 +158,29 @@ default:
.ostree-template:
stage: ostree
- dependencies: [track, ostree-prepare]
+ dependencies: [track]
script:
- - export REPO_TOKEN=$OSTREE_REPO_TOKEN
+ - |
+ FLAT_MANAGER_SERVER=https://flatmgr-ostree.openshift.gnome.org/
+ FLAT_MANAGER_REPO=gnomeos
+ REPO_TOKEN=$OSTREE_REPO_TOKEN
- ostree init --repo repo/ --mode archive
- ${BST_NO_PUSH} -o arch "${ARCH}" build vm/repo.bst vm/repo-devel.bst
- - ${BST_NO_PUSH} -o arch "${ARCH}" checkout --hardlinks vm/repo.bst checkout-repo/
- - ostree pull-local --repo=repo/ checkout-repo/
- - rm -rf checkout-repo/
+ - |
+ for element in vm/repo.bst vm/repo-devel.bst; do
+ ${BST} -o arch "${ARCH}" checkout --hardlinks $element checkout-repo/
+ ostree pull-local --repo=repo/ checkout-repo/
+ rm -rf checkout-repo/
+ done
- - ${BST_NO_PUSH} -o arch "${ARCH}" checkout --hardlinks vm/repo-devel.bst checkout-devel-repo/
- - ostree pull-local --repo=repo/ checkout-devel-repo/
- - rm -rf checkout-devel-repo/
+ - BUILD_ID=$(flat-manager-client create $FLAT_MANAGER_SERVER $FLAT_MANAGER_REPO)
+
+ - flat-manager-client push --commit --publish --wait $BUILD_ID repo/ $(ostree --repo=repo/ refs) ||
result=$?
+ - flat-manager-client purge $BUILD_ID
- - flat-manager-client push $(cat build.txt) repo/ $(ostree --repo=repo/ refs)
rules: *flatpak-publish-rules
@@ -309,18 +309,6 @@ flatpak-prepare:
- build.txt
rules: *flatpak-publish-rules
-ostree-prepare:
- extends: .x86_64
- stage: prepare_ostree
- dependencies: []
- script:
- - export REPO_TOKEN=$OSTREE_REPO_TOKEN
- - flat-manager-client create $OSTREE_FLAT_MANAGER_SERVER $OSTREE_FLAT_MANAGER_REPO > build.txt
- artifacts:
- paths:
- - build.txt
- rules: *flatpak-publish-rules
-
flatpak-x86_64:
extends:
- .flatpak-template
@@ -346,11 +334,6 @@ flatpak-ppc64le:
- .flatpak-template
- .ppc64le
-ostree-x86_64:
- extends:
- - .ostree-template
- - .x86_64
-
flatpak-finish:
extends: .x86_64
stage: finish_flatpak
@@ -373,27 +356,10 @@ flatpak-finish-failed:
- if: $CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_REF_NAME =~ /^gnome-\d-\d\d$/
when: on_failure
-ostree-finish:
- extends: .x86_64
- stage: finish_ostree
- dependencies: [ostree-prepare]
- script:
- - export REPO_TOKEN=$OSTREE_REPO_TOKEN
- - flat-manager-client commit --wait $(cat build.txt)
- - flat-manager-client publish --wait $(cat build.txt)
- - flat-manager-client purge $(cat build.txt)
- rules: *flatpak-publish-rules
-
-ostree-finish-failed:
- extends: .x86_64
- stage: finish_ostree
- dependencies: [ostree-prepare]
- script:
- - export REPO_TOKEN=$OSTREE_REPO_TOKEN
- - flat-manager-client purge $(cat build.txt)
- rules: *flatpak-failed-rules
- - if: $CI_COMMIT_REF_NAME == "master"
- when: on_failure
+ostree-x86_64:
+ extends:
+ - .ostree-template
+ - .x86_64
cve_report:
extends: .x86_64
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]