URL: https://github.com/SSSD/sssd/pull/919
Author: pbrezina
 Title: #919: ci: improvements for on-demand builds
Action: synchronized

To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/919/head:pr919
git checkout pr919
From 2928e6cbcd6bdba3fbf5316f40520924a88726db Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrez...@redhat.com>
Date: Tue, 29 Oct 2019 10:17:16 +0100
Subject: [PATCH 1/5] ci: store artifacts in jenkins for on-demand runs

---
 Jenkinsfile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Jenkinsfile b/Jenkinsfile
index c139b241fa..950216e12a 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -244,6 +244,8 @@ class OnDemandTest extends Test {
 
   def archive() {
     this.pipeline.echo 'On demand run. Artifacts are not stored in the cloud.'
+    this.pipeline.archiveArtifacts artifacts: "artifacts/**",
+      allowEmptyArchive: true
   }
 }
 

From cca14946d8a6b22c8ae3d2309f82925a4be3c04a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrez...@redhat.com>
Date: Tue, 29 Oct 2019 10:55:07 +0100
Subject: [PATCH 2/5] ci: allow to specify systems where tests should be run
 for on-demand tests

---
 Jenkinsfile | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Jenkinsfile b/Jenkinsfile
index 950216e12a..62756ebf8d 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -257,6 +257,12 @@ def notification = new Notification(
   on_demand
 )
 
+if (params.SYSTEMS) {
+  if (params.SYSTEMS != 'all') {
+    systems = params.SYSTEMS.split()
+  }
+}
+
 try {
   /* Setup nice build description so pull request are easy to find. */
   stage('Setup description') {

From 4e5ec1c0db56f3164d1856421f18311513805fdd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrez...@redhat.com>
Date: Mon, 4 Nov 2019 12:27:10 +0100
Subject: [PATCH 3/5] ci: add Fedora 31

---
 Jenkinsfile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Jenkinsfile b/Jenkinsfile
index 62756ebf8d..55705516b2 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -8,6 +8,7 @@ def systems = [
   'fedora28',
   'fedora29',
   'fedora30',
+  'fedora31',
   'fedora-rawhide',
   'debian10',
 ]

From d6a58b78e83e35c6ffb655d61b88ed1fcfc7b3ba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrez...@redhat.com>
Date: Mon, 4 Nov 2019 12:32:16 +0100
Subject: [PATCH 4/5] b

---
 Jenkinsfile | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Jenkinsfile b/Jenkinsfile
index 55705516b2..314cc7615b 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -105,6 +105,9 @@ class Test {
     this.artifactsdir = "${this.pipeline.env.WORKSPACE}/artifacts/${this.system}"
     this.codedir = "${this.pipeline.env.WORKSPACE}/sssd"
 
+    /* Clean-up previous artifacts just to be sure there are no leftovers. */
+    this.pipeline.sh "rm -fr ${this.artifactsdir} || :"
+
     try {
       this.pipeline.echo "Running on ${this.pipeline.env.NODE_NAME}"
       this.notify('PENDING', 'Build is in progress.')
@@ -245,8 +248,11 @@ class OnDemandTest extends Test {
 
   def archive() {
     this.pipeline.echo 'On demand run. Artifacts are not stored in the cloud.'
+    this.pipeline.echo 'They are accessible only from Jenkins.'
     this.pipeline.archiveArtifacts artifacts: "artifacts/**",
       allowEmptyArchive: true
+
+    this.pipeline.sh "rm -fr ${this.artifactsdir}"
   }
 }
 

From dd8d7f129ef32cf629c1cc918696e364cd2948b6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrez...@redhat.com>
Date: Mon, 4 Nov 2019 12:36:21 +0100
Subject: [PATCH 5/5] b

---
 Jenkinsfile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 314cc7615b..bc88b7895a 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -233,7 +233,7 @@ class OnDemandTest extends Test {
     this.pipeline.echo "Repository: ${this.repo}"
     this.pipeline.echo "Branch: ${this.branch}"
 
-    super.run()
+    //super.run()
   }
 
   def checkout() {
@@ -249,6 +249,7 @@ class OnDemandTest extends Test {
   def archive() {
     this.pipeline.echo 'On demand run. Artifacts are not stored in the cloud.'
     this.pipeline.echo 'They are accessible only from Jenkins.'
+    this.pipeline.echo "${this.env.BUILD_URL}/artifact/artifacts/"
     this.pipeline.archiveArtifacts artifacts: "artifacts/**",
       allowEmptyArchive: true
 
_______________________________________________
sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org
To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedorahosted.org/archives/list/sssd-devel@lists.fedorahosted.org

Reply via email to