[gnome-build-meta/abderrahim/buildstream-dirs-38] .gitlab-ci: move all buildstream configuration to build.conf




commit 0ebcac698e6a91ef594bb589f237f81af45f28f9
Author: Abderrahim Kitouni <akitouni gnome org>
Date:   Mon Feb 8 20:50:09 2021 +0100

    .gitlab-ci: move all buildstream configuration to build.conf

 .gitlab-ci.yml              | 24 ++----------------------
 .gitlab-ci/flat-manager.yml | 20 ++------------------
 build.conf                  | 18 ++++++++++++++++++
 3 files changed, 22 insertions(+), 40 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c2a37bfb..ae1c11d7 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,9 +1,6 @@
 include: .gitlab-ci/arch.yml
 
 variables:
-  # Store all the bst stuff under the "${CI_PROJECT_DIR}" directory.
-  # Note that GitLab CI will only cache stuff inside the "${CI_PROJECT_DIR}" folder.
-  XDG_CACHE_HOME: "${CI_PROJECT_DIR}/cache"
   GET_SOURCES_ATTEMPTS: 3
   BST_STRICT: '--strict'
   BST_TRACK_TAGS: 'False'
@@ -24,24 +21,8 @@ default:
   - mkdir -p logs
 
   # Setup certificate for pushing to the cache
-  - |
-    if [ -n "$GITLAB_CAS_PUSH_CERT" ]; then
-       echo "$GITLAB_CAS_PUSH_CERT" > client.crt
-       echo "$GITLAB_CAS_PUSH_KEY" > client.key
-    fi
-
-    cat >> build.conf << EOF
-
-    projects:
-      gnome:
-        artifacts:
-        - url: https://m1-xlarge-x86.gnome.org:11002
-          client-key: client.key
-          client-cert: client.crt
-          push: true
-
-    sourcedir: /cache/buildstream/sources
-    EOF
+  - echo "$GITLAB_CAS_PUSH_CERT" > client.crt
+  - echo "$GITLAB_CAS_PUSH_KEY" > client.key
 
 #
 # Templates shared by multiple jobs
@@ -188,7 +169,6 @@ generate-deploy-config:
   - |
     cat > flatpak-variables.yml << END
     variables:
-      XDG_CACHE_HOME: "${CI_PROJECT_DIR}/cache"
       BST: '$BST'
       TRACK_JOB_ID: '$TRACK_JOB_ID'
       FLAT_MANAGER_SERVER: '$FLAT_MANAGER_SERVER'
diff --git a/.gitlab-ci/flat-manager.yml b/.gitlab-ci/flat-manager.yml
index 7f990772..c0d2c393 100644
--- a/.gitlab-ci/flat-manager.yml
+++ b/.gitlab-ci/flat-manager.yml
@@ -12,24 +12,8 @@ default:
   - mkdir -p logs
 
   # Setup certificate for pushing to the cache
-  - |
-    if [ -n "$GITLAB_CAS_PUSH_CERT" ]; then
-       echo "$GITLAB_CAS_PUSH_CERT" > client.crt
-       echo "$GITLAB_CAS_PUSH_KEY" > client.key
-    fi
-
-    cat >> build.conf << EOF
-
-    projects:
-      gnome:
-        artifacts:
-        - url: https://m1-xlarge-x86.gnome.org:11002
-          client-key: client.key
-          client-cert: client.crt
-          push: true
-
-    sourcedir: /cache/buildstream/sources
-    EOF
+  - echo "$GITLAB_CAS_PUSH_CERT" > client.crt
+  - echo "$GITLAB_CAS_PUSH_KEY" > client.key
 
 .flatmgr-template:
   stage: deploy
diff --git a/build.conf b/build.conf
index 48e498d9..6e48766f 100644
--- a/build.conf
+++ b/build.conf
@@ -1,6 +1,15 @@
+# This is the buildstream configuration used for CI
+
 # The log directory
 logdir: logs
 
+# build area and artifacts inside the repo
+builddir: cache/build
+artifactdir: cache/artifacts
+
+# and sources in the dedicated volume
+sourcedir: /cache/buildstream/sources
+
 # Keep building and find all the errors
 scheduler:
   on-error: continue
@@ -8,3 +17,12 @@ scheduler:
 # Get a lot of output in case of errors
 logging:
   error-lines: 80
+
+# configuration for pushing, client key and cert will be written by CI
+projects:
+  gnome:
+    artifacts:
+    - url: https://m1-xlarge-x86.gnome.org:11002
+      client-key: client.key
+      client-cert: client.crt
+      push: true


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]