From 31ac3c2215287e17997f4da8a8869afd7feb5b98 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Thu, 10 Jul 2025 12:59:09 -0500 Subject: [PATCH 01/39] Added Jenkinsfile to replace fast-build-and-deploy-docs jobs Requires Organizational Folders or Pipelines in jenkins Ticket: ENT-12581 Changelog: none --- Jenkinsfile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 000000000..a4002171a --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,17 @@ +pipeline { + agent any + + stages { + stage('Checkout') { + steps { + sh 'mkdir -p core' + dir('core') + { + git branch: "master", + credentialsId: 'autobuild', + url: 'git@github.com:cfengine/core' + } + } + } + } +} From 5ad57cc4195a23f3d1768f85165de10a7b2b47b5 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Thu, 10 Jul 2025 13:26:01 -0500 Subject: [PATCH 02/39] try to checkout a private repo: nova --- Jenkinsfile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index a4002171a..7fdef9fa9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -2,7 +2,7 @@ pipeline { agent any stages { - stage('Checkout') { + stage('Checkout core') { steps { sh 'mkdir -p core' dir('core') @@ -13,5 +13,16 @@ pipeline { } } } + stage('Checkout nova') { + steps { + sh 'mkdir -p nova' + dir('nova') + { + git branch: "master", + credentialsId: 'autobuild', + url: 'git@github.com:cfengine/nova' + } + } + } } } From 68e3e1d95c920b4a9730efc26715662461322e4c Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Thu, 10 Jul 2025 13:31:38 -0500 Subject: [PATCH 03/39] run on CONTAINERS labeled instances --- Jenkinsfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7fdef9fa9..480be9158 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,5 +1,7 @@ pipeline { - agent any + agent { + label 'CONTAINERS' + } stages { stage('Checkout core') { From 6c6627b111a7220f789f143b94ea0525f036dae6 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Thu, 10 Jul 2025 13:34:51 -0500 Subject: [PATCH 04/39] limit to 3 builds in history --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 480be9158..b337c89d1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,4 +1,5 @@ pipeline { + options { buildDiscarder(logRotator(numToKeepStr: '3')) } agent { label 'CONTAINERS' } From 6359caba3fad69a4a1762be90f244c3993554b7c Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Thu, 10 Jul 2025 13:47:23 -0500 Subject: [PATCH 05/39] try to refactor to use a list of repos to checkout and generate the stages with groovy scripting --- Jenkinsfile | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index b337c89d1..bb6bd480d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,3 +1,4 @@ +def cfengine_repos = ['core', 'enterprise', 'nova', 'masterfiles'] pipeline { options { buildDiscarder(logRotator(numToKeepStr: '3')) } agent { @@ -5,25 +6,12 @@ pipeline { } stages { - stage('Checkout core') { - steps { - sh 'mkdir -p core' - dir('core') - { + script { + cfengine_repos.each { repo -> + stage("Checkout ${repo}") { git branch: "master", credentialsId: 'autobuild', - url: 'git@github.com:cfengine/core' - } - } - } - stage('Checkout nova') { - steps { - sh 'mkdir -p nova' - dir('nova') - { - git branch: "master", - credentialsId: 'autobuild', - url: 'git@github.com:cfengine/nova' + url: 'git@github.com:cfengine/${repo}' } } } From 4c267ffaa2af5e090111e382a504420d3ea7cda5 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Thu, 10 Jul 2025 14:13:35 -0500 Subject: [PATCH 06/39] fixup structure --- Jenkinsfile | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index bb6bd480d..4e6edc753 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,12 +6,16 @@ pipeline { } stages { - script { - cfengine_repos.each { repo -> - stage("Checkout ${repo}") { - git branch: "master", - credentialsId: 'autobuild', - url: 'git@github.com:cfengine/${repo}' + stage('Checkout repositories') { + steps { + script { + cfengine_repos.each { repo -> + stage("Checkout ${repo}") { + git branch: "master", + credentialsId: 'autobuild', + url: 'git@github.com:cfengine/${repo}' + } + } } } } From 438e9e6adf9ba9c8a55fcc5ac7ba910b53d75407 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Thu, 10 Jul 2025 14:14:44 -0500 Subject: [PATCH 07/39] fix quotes to allow variable expansion? --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 4e6edc753..f7aaa39f1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -13,7 +13,7 @@ pipeline { stage("Checkout ${repo}") { git branch: "master", credentialsId: 'autobuild', - url: 'git@github.com:cfengine/${repo}' + url: "git@github.com:cfengine/${repo}" } } } From 769d6edba333023b6381fa1600bbf41ca90b171a Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Thu, 10 Jul 2025 14:21:30 -0500 Subject: [PATCH 08/39] do comments work? and if so, added a todo --- Jenkinsfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index f7aaa39f1..6222f275a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,4 +1,9 @@ def cfengine_repos = ['core', 'enterprise', 'nova', 'masterfiles'] + +/* comments OK? +TODO: +- [ ] provide a way of specifying refs in other repos, like a coordinated multi-pr build +*/ pipeline { options { buildDiscarder(logRotator(numToKeepStr: '3')) } agent { From aa2a4725763f0f69b3def6384ec2dac0b7103ad2 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Thu, 10 Jul 2025 14:27:10 -0500 Subject: [PATCH 09/39] added see what cloned and build stages --- Jenkinsfile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 6222f275a..28b906873 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,6 +14,7 @@ pipeline { stage('Checkout repositories') { steps { script { + // Note that stages created this way are NOT available for "Restart from Stage" in jenkins UI cfengine_repos.each { repo -> stage("Checkout ${repo}") { git branch: "master", @@ -24,5 +25,19 @@ pipeline { } } } + stage('See what cloned') { + steps { + sh 'pwd' + sh 'whoami' + sh 'ls -la documentation' + sh 'cd documentation; git log --oneline | head -n1' + } + } + stage('Build') { + steps { + sh 'bash -x documentation/generator/build/run.sh' +// need env BRANCH=$DOCS_BRANCH + } + } } } From 73fec606f32cba86ddb649f79b9851b9811592dc Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Thu, 10 Jul 2025 14:30:09 -0500 Subject: [PATCH 10/39] get our bearings of where we are when building and running shell commands --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 28b906873..438c72527 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -29,7 +29,7 @@ pipeline { steps { sh 'pwd' sh 'whoami' - sh 'ls -la documentation' + sh 'ls -la' sh 'cd documentation; git log --oneline | head -n1' } } From 459a7ab68fd13b2a93b8315f2a7e3a167b288878 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Thu, 10 Jul 2025 14:55:29 -0500 Subject: [PATCH 11/39] try to refactor as scripted pipeline to gain access to checkout scm for documentation repo as not pwd --- Jenkinsfile | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 438c72527..aa87e96b8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,22 +4,24 @@ def cfengine_repos = ['core', 'enterprise', 'nova', 'masterfiles'] TODO: - [ ] provide a way of specifying refs in other repos, like a coordinated multi-pr build */ -pipeline { +node('CONTAINERS') { options { buildDiscarder(logRotator(numToKeepStr: '3')) } - agent { - label 'CONTAINERS' - } - stages { stage('Checkout repositories') { steps { script { // Note that stages created this way are NOT available for "Restart from Stage" in jenkins UI cfengine_repos.each { repo -> stage("Checkout ${repo}") { - git branch: "master", - credentialsId: 'autobuild', - url: "git@github.com:cfengine/${repo}" + steps { + sh "mkdir -p ${repo}" + dir ("${repo}") + { + git branch: "master", + credentialsId: 'autobuild', + url: "git@github.com:cfengine/${repo}" + } + } } } } @@ -39,5 +41,4 @@ pipeline { // need env BRANCH=$DOCS_BRANCH } } - } } From cdf772025029574e270ee1f63f6257349a9697a5 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Thu, 10 Jul 2025 14:56:06 -0500 Subject: [PATCH 12/39] checkout documentation into a subdir --- Jenkinsfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index aa87e96b8..96fb7f292 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -5,6 +5,9 @@ TODO: - [ ] provide a way of specifying refs in other repos, like a coordinated multi-pr build */ node('CONTAINERS') { + dir('documentation') { + checkout scm + } options { buildDiscarder(logRotator(numToKeepStr: '3')) } stage('Checkout repositories') { From a4f9f913cde002854d0a783ebf0264b1289d43e8 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Thu, 10 Jul 2025 14:57:41 -0500 Subject: [PATCH 13/39] try to find the right place for options --- Jenkinsfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 96fb7f292..9c662ba43 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,11 +4,13 @@ def cfengine_repos = ['core', 'enterprise', 'nova', 'masterfiles'] TODO: - [ ] provide a way of specifying refs in other repos, like a coordinated multi-pr build */ +pipeline { + options { buildDiscarder(logRotator(numToKeepStr: '3')) } +} node('CONTAINERS') { dir('documentation') { checkout scm } - options { buildDiscarder(logRotator(numToKeepStr: '3')) } stage('Checkout repositories') { steps { From d8736b513fd3fc7599a582465280a997a1e563dd Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Thu, 10 Jul 2025 15:00:23 -0500 Subject: [PATCH 14/39] try to get both pipeline with buildDiscarder and node items working --- Jenkinsfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 9c662ba43..43b5c0950 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,6 +6,8 @@ TODO: */ pipeline { options { buildDiscarder(logRotator(numToKeepStr: '3')) } + stages {} + agent any } node('CONTAINERS') { dir('documentation') { From 3f541a7ff2fe1cb54db2050d15fa264c11fcc554 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Thu, 10 Jul 2025 15:05:14 -0500 Subject: [PATCH 15/39] try to use the snippet generator to set 3 builds to keep in a scripted pipeline --- Jenkinsfile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 43b5c0950..a497aefc1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,11 +4,7 @@ def cfengine_repos = ['core', 'enterprise', 'nova', 'masterfiles'] TODO: - [ ] provide a way of specifying refs in other repos, like a coordinated multi-pr build */ -pipeline { - options { buildDiscarder(logRotator(numToKeepStr: '3')) } - stages {} - agent any -} +properties([buildBlocker(blockLevel: , blockingJobs: '', scanQueueFor: , useBuildBlocker: false), buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '3')), [$class: 'RebuildSettings', autoRebuild: false, rebuildDisabled: false]]) node('CONTAINERS') { dir('documentation') { checkout scm From 83ddb84c108a71779b130a688716c5073b3d17b7 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Thu, 10 Jul 2025 15:06:24 -0500 Subject: [PATCH 16/39] fix syntax of buildDiscarder property --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index a497aefc1..6471c4bb2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,7 +4,7 @@ def cfengine_repos = ['core', 'enterprise', 'nova', 'masterfiles'] TODO: - [ ] provide a way of specifying refs in other repos, like a coordinated multi-pr build */ -properties([buildBlocker(blockLevel: , blockingJobs: '', scanQueueFor: , useBuildBlocker: false), buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '3')), [$class: 'RebuildSettings', autoRebuild: false, rebuildDisabled: false]]) +properties([buildDiscarder(logRotator(numToKeepStr: '3'))]) node('CONTAINERS') { dir('documentation') { checkout scm From 760cf2c2f1487cb9eec5a861f133573c4338b81c Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Thu, 10 Jul 2025 15:11:49 -0500 Subject: [PATCH 17/39] remove steps item as it is not needed in a scripted pipeline --- Jenkinsfile | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6471c4bb2..22e712aec 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -11,8 +11,6 @@ node('CONTAINERS') { } stage('Checkout repositories') { - steps { - script { // Note that stages created this way are NOT available for "Restart from Stage" in jenkins UI cfengine_repos.each { repo -> stage("Checkout ${repo}") { @@ -26,22 +24,16 @@ node('CONTAINERS') { } } } - } - } } } stage('See what cloned') { - steps { sh 'pwd' sh 'whoami' sh 'ls -la' sh 'cd documentation; git log --oneline | head -n1' - } } stage('Build') { - steps { sh 'bash -x documentation/generator/build/run.sh' // need env BRANCH=$DOCS_BRANCH - } } } From d2ae595ce91d007891c9603e0d3e98a0ec706f8a Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Thu, 10 Jul 2025 15:12:36 -0500 Subject: [PATCH 18/39] FP4 --- Jenkinsfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 22e712aec..53986f3b2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,7 +14,6 @@ node('CONTAINERS') { // Note that stages created this way are NOT available for "Restart from Stage" in jenkins UI cfengine_repos.each { repo -> stage("Checkout ${repo}") { - steps { sh "mkdir -p ${repo}" dir ("${repo}") { @@ -22,7 +21,6 @@ node('CONTAINERS') { credentialsId: 'autobuild', url: "git@github.com:cfengine/${repo}" } - } } } } From a4d7db72d75d4b84ad2cba50e058178c7bd39412 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Thu, 10 Jul 2025 15:14:46 -0500 Subject: [PATCH 19/39] add hard-coded BRANCH env var for master --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 53986f3b2..ff9968352 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -31,7 +31,7 @@ node('CONTAINERS') { sh 'cd documentation; git log --oneline | head -n1' } stage('Build') { - sh 'bash -x documentation/generator/build/run.sh' -// need env BRANCH=$DOCS_BRANCH + // hard code for now, won't actually publish yet so not too big of a deal + sh 'BRANCH=master bash -x documentation/generator/build/run.sh' } } From c690c17a8e9962a17014f9a997d392750e8e538e Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Thu, 10 Jul 2025 15:20:24 -0500 Subject: [PATCH 20/39] try to clean workspaces on success --- Jenkinsfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index ff9968352..cbbdca884 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -5,6 +5,9 @@ TODO: - [ ] provide a way of specifying refs in other repos, like a coordinated multi-pr build */ properties([buildDiscarder(logRotator(numToKeepStr: '3'))]) + +// clean workspace on Success (specify all the OTHER cases as false) +cleanWs cleanWhenAborted: false, cleanWhenFailure: false, cleanWhenNotBuilt: false, cleanWhenUnstable: false node('CONTAINERS') { dir('documentation') { checkout scm From f88d2e000168918ae6c94ca999f1c8c5ff38d148 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Thu, 10 Jul 2025 15:25:29 -0500 Subject: [PATCH 21/39] add needed environment variables hard coded for now --- Jenkinsfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index cbbdca884..5d0483d82 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -35,6 +35,11 @@ node('CONTAINERS') { } stage('Build') { // hard code for now, won't actually publish yet so not too big of a deal - sh 'BRANCH=master bash -x documentation/generator/build/run.sh' + withEnv([ +'BRANCH=master', +'PACKAGE_JOB=testing-pr' +]) { + sh 'bash -x documentation/generator/build/run.sh' } } +} From 2f3f77627f7f4a506ce995b6c36fb735278b68c3 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Thu, 10 Jul 2025 15:26:36 -0500 Subject: [PATCH 22/39] add withEnv in the right location, under node and enclosing stage --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5d0483d82..bd8343b58 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,12 +33,12 @@ node('CONTAINERS') { sh 'ls -la' sh 'cd documentation; git log --oneline | head -n1' } - stage('Build') { - // hard code for now, won't actually publish yet so not too big of a deal withEnv([ 'BRANCH=master', 'PACKAGE_JOB=testing-pr' ]) { + stage('Build') { + // hard code for now, won't actually publish yet so not too big of a deal sh 'bash -x documentation/generator/build/run.sh' } } From b5cb7d7c8fa06502e79e45391f6dc8b85f368e73 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Thu, 10 Jul 2025 15:29:21 -0500 Subject: [PATCH 23/39] move cleanWS to a stage instead of at the node level --- Jenkinsfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index bd8343b58..8ebac49d0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -7,7 +7,7 @@ TODO: properties([buildDiscarder(logRotator(numToKeepStr: '3'))]) // clean workspace on Success (specify all the OTHER cases as false) -cleanWs cleanWhenAborted: false, cleanWhenFailure: false, cleanWhenNotBuilt: false, cleanWhenUnstable: false + node('CONTAINERS') { dir('documentation') { checkout scm @@ -42,4 +42,7 @@ node('CONTAINERS') { sh 'bash -x documentation/generator/build/run.sh' } } +stage('Clean workspace on Success') { + cleanWs cleanWhenAborted: false, cleanWhenFailure: false, cleanWhenNotBuilt: false, cleanWhenUnstable: false +} } From 412681ea0bc2dbb3c22c7e10720006efc5789d22 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Thu, 10 Jul 2025 15:31:45 -0500 Subject: [PATCH 24/39] added needed PACKAGE_UPLOAD_DIRECTORY env var with a temp value --- Jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8ebac49d0..0d34f1eed 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -35,7 +35,8 @@ node('CONTAINERS') { } withEnv([ 'BRANCH=master', -'PACKAGE_JOB=testing-pr' +'PACKAGE_JOB=testing-pr', +'PACKAGE_UPLOAD_DIRECTORY=junk-craig-test', ]) { stage('Build') { // hard code for now, won't actually publish yet so not too big of a deal From 1fa4f877fea36a802661d14ed38f18ec2585c23c Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Thu, 10 Jul 2025 15:34:02 -0500 Subject: [PATCH 25/39] added needed env var PACKAGE_BUILD=1 --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 0d34f1eed..50ff56ed2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -37,6 +37,7 @@ node('CONTAINERS') { 'BRANCH=master', 'PACKAGE_JOB=testing-pr', 'PACKAGE_UPLOAD_DIRECTORY=junk-craig-test', +'PACKAGE_BUILD=1', ]) { stage('Build') { // hard code for now, won't actually publish yet so not too big of a deal From 6e6211ce1416b947ada60ec34be175fa07564b07 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Thu, 10 Jul 2025 15:38:14 -0500 Subject: [PATCH 26/39] add a working ubu22hub providing PACKAGE_UPLOAD_DIRECTORY --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 50ff56ed2..9b8337d67 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -36,7 +36,7 @@ node('CONTAINERS') { withEnv([ 'BRANCH=master', 'PACKAGE_JOB=testing-pr', -'PACKAGE_UPLOAD_DIRECTORY=junk-craig-test', +'PACKAGE_UPLOAD_DIRECTORY=jenkins-master-nightly-pipeline-152', 'PACKAGE_BUILD=1', ]) { stage('Build') { From b8e4d25ba70bfed2e4337715c839341d19b713b6 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Thu, 10 Jul 2025 15:53:38 -0500 Subject: [PATCH 27/39] save output as artifact --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 9b8337d67..867fbc5a7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -42,6 +42,7 @@ node('CONTAINERS') { stage('Build') { // hard code for now, won't actually publish yet so not too big of a deal sh 'bash -x documentation/generator/build/run.sh' + archiveArtifacts artifacts: 'output/', fingerprint: true } } stage('Clean workspace on Success') { From e95a3c4fba010830c953a1d77da610d04c9cfa59 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Thu, 10 Jul 2025 16:14:25 -0500 Subject: [PATCH 28/39] refactored repo checkout to include nice data structure for multi-org repo checkouts --- Jenkinsfile | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 867fbc5a7..087cc09c0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,4 +1,14 @@ -def cfengine_repos = ['core', 'enterprise', 'nova', 'masterfiles'] +def repos = [ + 'cfengine': [ + 'core', +'enterprise', +'nova', +'masterfiles' + ], + 'NorthernTechHQ': [ +'nt-docs', + ] +] /* comments OK? TODO: @@ -15,18 +25,24 @@ node('CONTAINERS') { stage('Checkout repositories') { // Note that stages created this way are NOT available for "Restart from Stage" in jenkins UI - cfengine_repos.each { repo -> +repos.each { + org, org_repos -> { + println("organization is ${org}") + org_repos.each { + repo -> { stage("Checkout ${repo}") { sh "mkdir -p ${repo}" dir ("${repo}") { git branch: "master", credentialsId: 'autobuild', - url: "git@github.com:cfengine/${repo}" + url: "git@github.com:${org}/${repo}" } } } } +} } +} stage('See what cloned') { sh 'pwd' sh 'whoami' @@ -42,7 +58,6 @@ node('CONTAINERS') { stage('Build') { // hard code for now, won't actually publish yet so not too big of a deal sh 'bash -x documentation/generator/build/run.sh' - archiveArtifacts artifacts: 'output/', fingerprint: true } } stage('Clean workspace on Success') { From b3563362102c0358a51c380a750a74f456efd657 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Thu, 10 Jul 2025 16:20:01 -0500 Subject: [PATCH 29/39] fixup a million-ish curly braces, thanks groovy --- Jenkinsfile | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 087cc09c0..6c637b2d7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -30,19 +30,20 @@ repos.each { println("organization is ${org}") org_repos.each { repo -> { - stage("Checkout ${repo}") { - sh "mkdir -p ${repo}" - dir ("${repo}") - { - git branch: "master", - credentialsId: 'autobuild', - url: "git@github.com:${org}/${repo}" - } - } + stage("Checkout ${repo}") { + sh "mkdir -p ${repo}" + dir ("${repo}") + { + git branch: "master", + credentialsId: 'autobuild', + url: "git@github.com:${org}/${repo}" + } + } } } -} } + } } +} // for the stage stage('See what cloned') { sh 'pwd' sh 'whoami' From d1184b4dc1c96e73d9ac8ebee74e69cdb895e37b Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Thu, 10 Jul 2025 16:29:44 -0500 Subject: [PATCH 30/39] cross fingers --- Jenkinsfile | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6c637b2d7..8a60f7579 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -25,20 +25,16 @@ node('CONTAINERS') { stage('Checkout repositories') { // Note that stages created this way are NOT available for "Restart from Stage" in jenkins UI -repos.each { - org, org_repos -> { - println("organization is ${org}") - org_repos.each { - repo -> { - stage("Checkout ${repo}") { - sh "mkdir -p ${repo}" - dir ("${repo}") - { - git branch: "master", - credentialsId: 'autobuild', - url: "git@github.com:${org}/${repo}" - } - } +repos.each { org -> + println("organization is ${org.key}") + org.value.each { repo -> + stage("Checkout ${repo}") { + sh "mkdir -p ${repo}" + dir ("${repo}") + { + git branch: "master", + credentialsId: 'autobuild', + url: "git@github.com:${org.key}/${repo}" } } } From b0e01ac24c61d95cbd058dc7056cd72aa08457de Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Thu, 10 Jul 2025 17:00:54 -0500 Subject: [PATCH 31/39] complicated, should push this checkout code to a library somehow --- Jenkinsfile | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8a60f7579..5e43e4869 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,7 +6,7 @@ def repos = [ 'masterfiles' ], 'NorthernTechHQ': [ -'nt-docs', +['nt-docs': 'main'], ] ] @@ -27,14 +27,19 @@ node('CONTAINERS') { // Note that stages created this way are NOT available for "Restart from Stage" in jenkins UI repos.each { org -> println("organization is ${org.key}") - org.value.each { repo -> - stage("Checkout ${repo}") { - sh "mkdir -p ${repo}" - dir ("${repo}") - { - git branch: "master", - credentialsId: 'autobuild', - url: "git@github.com:${org.key}/${repo}" + org.value.each { repo_data -> + if (!(repo_data instanceof Map)) { + repo_data=["${repo_data}": "master"] + } + repo_data.each{ repo, branch -> + stage("Checkout ${repo}") { + sh "mkdir -p ${repo}" + dir ("${repo}") + { + git branch: "${branch}", + credentialsId: 'autobuild', + url: "git@github.com:${org.key}/${repo}" + } } } } From 9ed487dd41a9b176ebc4d9bb783b1eacf0455fb5 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Fri, 11 Jul 2025 08:05:46 -0500 Subject: [PATCH 32/39] restore archiving artifacts --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 5e43e4869..355f88166 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -60,6 +60,7 @@ repos.each { org -> stage('Build') { // hard code for now, won't actually publish yet so not too big of a deal sh 'bash -x documentation/generator/build/run.sh' + archiveArtifacts artifacts: 'output/', fingerprint: true } } stage('Clean workspace on Success') { From e62219768f14dc191cbc2125e84bfb6dbea8f98a Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Fri, 11 Jul 2025 14:04:09 -0500 Subject: [PATCH 33/39] Explain a bit what generator/build/run.sh script does and what it produces --- generator/build/run.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/generator/build/run.sh b/generator/build/run.sh index 0e1384ba0..864d321ac 100644 --- a/generator/build/run.sh +++ b/generator/build/run.sh @@ -1,4 +1,8 @@ #!/bin/bash +# documentation/generator/build/run.sh +# In a container, using buildah, builds the documentation site and produces two files in output/: +# - cfengine-documentation-.tar.gz - an archive of the documentation +# - packed-for-shipping.tgz - the actual site, unpacked to _site set -ex trap "echo FAILURE" ERR From 45500fbc728e7c564eabb0acfa93fb96b458ebb4 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Fri, 11 Jul 2025 14:34:41 -0500 Subject: [PATCH 34/39] Try to add parameters as in fast-build-and-deploy-docs-master job --- Jenkinsfile | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 355f88166..f3f9fea66 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,11 +10,26 @@ def repos = [ ] ] +rev_ref_description="Use NUMBER or 'pull/NUMBER/merge' for pull request (it's merged version, THIS DOESN'T MERGE THE PR) or 'pull/NUMBER/head' to run the tests on the non-merged code. Special syntax 'tag:SOME_TAG' can be used to use a tag as a revision." + /* comments OK? TODO: - [ ] provide a way of specifying refs in other repos, like a coordinated multi-pr build */ -properties([buildDiscarder(logRotator(numToKeepStr: '3'))]) +properties([ + buildDiscarder(logRotator(daysToKeepStr: '10')) + parameters([ + string(name: 'CORE_REV', defaultValue: 'master'), + string(name: 'NOVA_REV', defaultValue: 'master'), + string(name: 'ENTERPRISE_REV', defaultValue: 'master'), + string(name: 'MASTERFILES_REV', defaultValue: 'master'), + string(name: 'DOCS_REV', defaultValue: 'master'), + string(name: 'DOCS_BRANCH', defaultValue: 'master', description: 'Where to upload artifacts - to http://buildcache.cloud.cfengine.com/packages/build-documentation-$DOCS_BRANCH/ and https://docs.cfengine.com/docs/$DOCS_BRANCH/'), + string(name: 'PACKAGE_JOB', defaultValue: 'testing-pr', description: 'where to take CFEngine HUB package from, a dir at http://buildcache.cloud.cfengine.com/packages/'), + string(name: 'USE_NIGHTLIES_FOR', defaultValue: 'master', description: 'branch whose nightlies to use (master, 3.18.x, etc) - will be one of http://buildcache.cloud.cfengine.com/packages/testing-pr/jenkins-$USE_NIGHTLIES_FOR-nightly-pipeline-$NUMBER/'), + string(name: 'NT_DOCS_REV', defaultValue: 'main', description: "${rev_ref_description}") + ]) +]) // clean workspace on Success (specify all the OTHER cases as false) From ffc2605a326afad850b55b1cde343635a6433eda Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Fri, 11 Jul 2025 14:34:57 -0500 Subject: [PATCH 35/39] simplify clean workspace to always clean --- Jenkinsfile | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index f3f9fea66..e5c7a03dd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -78,7 +78,39 @@ repos.each { org -> archiveArtifacts artifacts: 'output/', fingerprint: true } } +stage('Publish') { + sshPublisher(publishers: [sshPublisherDesc(configName: 'buildcache.cloud.cfengine.com', transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: '''set -x +export WRKDIR=`pwd` + +mkdir -p upload +mkdir -p output + +# find two tarballs +archive=`find upload -name \'cfengine-documentation-*.tar.gz\'` +tarball=`find upload -name packed-for-shipping.tar.gz` +echo "TARBALL: $tarball" +echo "ARCHIVE: $archive" + +# unpack $tarball +cd `dirname $tarball` +tar zxvf packed-for-shipping.tar.gz +rm packed-for-shipping.tar.gz + +# move $archive to the _site +mv $WRKDIR/$archive _site + +ls -la +cd - + +ls -la upload + +# note: this triggers systemd job to AV-scan new files +# and move them to proper places +mv upload/* output +''', execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: 'upload/$BUILD_TAG/build-documentation-$DOCS_BRANCH/$BUILD_TAG/', remoteDirectorySDF: false, removePrefix: '', sourceFiles: 'output/')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)]) +} + stage('Clean workspace on Success') { - cleanWs cleanWhenAborted: false, cleanWhenFailure: false, cleanWhenNotBuilt: false, cleanWhenUnstable: false + cleanWs() } } From 99d293d5eb70f7f8c9581a96f98ddb754c0d6998 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Fri, 11 Jul 2025 14:36:03 -0500 Subject: [PATCH 36/39] fixup properties --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index e5c7a03dd..8cbf32e7b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ TODO: - [ ] provide a way of specifying refs in other repos, like a coordinated multi-pr build */ properties([ - buildDiscarder(logRotator(daysToKeepStr: '10')) + buildDiscarder(logRotator(daysToKeepStr: '10')), parameters([ string(name: 'CORE_REV', defaultValue: 'master'), string(name: 'NOVA_REV', defaultValue: 'master'), From 9190ad23f92bcf1887b9176816cc90000ad8720f Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Fri, 11 Jul 2025 16:14:56 -0500 Subject: [PATCH 37/39] FP4 --- Jenkinsfile | 117 +++------------------------------------- fromscratch.Jenkinsfile | 116 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 122 insertions(+), 111 deletions(-) create mode 100644 fromscratch.Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile index 8cbf32e7b..63abb5007 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,116 +1,11 @@ -def repos = [ - 'cfengine': [ - 'core', -'enterprise', -'nova', -'masterfiles' - ], - 'NorthernTechHQ': [ -['nt-docs': 'main'], - ] -] +pipeline { + agent any -rev_ref_description="Use NUMBER or 'pull/NUMBER/merge' for pull request (it's merged version, THIS DOESN'T MERGE THE PR) or 'pull/NUMBER/head' to run the tests on the non-merged code. Special syntax 'tag:SOME_TAG' can be used to use a tag as a revision." - -/* comments OK? -TODO: -- [ ] provide a way of specifying refs in other repos, like a coordinated multi-pr build -*/ -properties([ - buildDiscarder(logRotator(daysToKeepStr: '10')), - parameters([ - string(name: 'CORE_REV', defaultValue: 'master'), - string(name: 'NOVA_REV', defaultValue: 'master'), - string(name: 'ENTERPRISE_REV', defaultValue: 'master'), - string(name: 'MASTERFILES_REV', defaultValue: 'master'), - string(name: 'DOCS_REV', defaultValue: 'master'), - string(name: 'DOCS_BRANCH', defaultValue: 'master', description: 'Where to upload artifacts - to http://buildcache.cloud.cfengine.com/packages/build-documentation-$DOCS_BRANCH/ and https://docs.cfengine.com/docs/$DOCS_BRANCH/'), - string(name: 'PACKAGE_JOB', defaultValue: 'testing-pr', description: 'where to take CFEngine HUB package from, a dir at http://buildcache.cloud.cfengine.com/packages/'), - string(name: 'USE_NIGHTLIES_FOR', defaultValue: 'master', description: 'branch whose nightlies to use (master, 3.18.x, etc) - will be one of http://buildcache.cloud.cfengine.com/packages/testing-pr/jenkins-$USE_NIGHTLIES_FOR-nightly-pipeline-$NUMBER/'), - string(name: 'NT_DOCS_REV', defaultValue: 'main', description: "${rev_ref_description}") - ]) -]) - -// clean workspace on Success (specify all the OTHER cases as false) - -node('CONTAINERS') { - dir('documentation') { - checkout scm - } - - stage('Checkout repositories') { - // Note that stages created this way are NOT available for "Restart from Stage" in jenkins UI -repos.each { org -> - println("organization is ${org.key}") - org.value.each { repo_data -> - if (!(repo_data instanceof Map)) { - repo_data=["${repo_data}": "master"] - } - repo_data.each{ repo, branch -> - stage("Checkout ${repo}") { - sh "mkdir -p ${repo}" - dir ("${repo}") - { - git branch: "${branch}", - credentialsId: 'autobuild', - url: "git@github.com:${org.key}/${repo}" - } + stages { + stage('Check environment'){ + steps { + sh 'env' } } } } -} // for the stage - stage('See what cloned') { - sh 'pwd' - sh 'whoami' - sh 'ls -la' - sh 'cd documentation; git log --oneline | head -n1' - } - withEnv([ -'BRANCH=master', -'PACKAGE_JOB=testing-pr', -'PACKAGE_UPLOAD_DIRECTORY=jenkins-master-nightly-pipeline-152', -'PACKAGE_BUILD=1', -]) { - stage('Build') { - // hard code for now, won't actually publish yet so not too big of a deal - sh 'bash -x documentation/generator/build/run.sh' - archiveArtifacts artifacts: 'output/', fingerprint: true - } -} -stage('Publish') { - sshPublisher(publishers: [sshPublisherDesc(configName: 'buildcache.cloud.cfengine.com', transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: '''set -x -export WRKDIR=`pwd` - -mkdir -p upload -mkdir -p output - -# find two tarballs -archive=`find upload -name \'cfengine-documentation-*.tar.gz\'` -tarball=`find upload -name packed-for-shipping.tar.gz` -echo "TARBALL: $tarball" -echo "ARCHIVE: $archive" - -# unpack $tarball -cd `dirname $tarball` -tar zxvf packed-for-shipping.tar.gz -rm packed-for-shipping.tar.gz - -# move $archive to the _site -mv $WRKDIR/$archive _site - -ls -la -cd - - -ls -la upload - -# note: this triggers systemd job to AV-scan new files -# and move them to proper places -mv upload/* output -''', execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: 'upload/$BUILD_TAG/build-documentation-$DOCS_BRANCH/$BUILD_TAG/', remoteDirectorySDF: false, removePrefix: '', sourceFiles: 'output/')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)]) -} - -stage('Clean workspace on Success') { - cleanWs() -} -} diff --git a/fromscratch.Jenkinsfile b/fromscratch.Jenkinsfile new file mode 100644 index 000000000..8cbf32e7b --- /dev/null +++ b/fromscratch.Jenkinsfile @@ -0,0 +1,116 @@ +def repos = [ + 'cfengine': [ + 'core', +'enterprise', +'nova', +'masterfiles' + ], + 'NorthernTechHQ': [ +['nt-docs': 'main'], + ] +] + +rev_ref_description="Use NUMBER or 'pull/NUMBER/merge' for pull request (it's merged version, THIS DOESN'T MERGE THE PR) or 'pull/NUMBER/head' to run the tests on the non-merged code. Special syntax 'tag:SOME_TAG' can be used to use a tag as a revision." + +/* comments OK? +TODO: +- [ ] provide a way of specifying refs in other repos, like a coordinated multi-pr build +*/ +properties([ + buildDiscarder(logRotator(daysToKeepStr: '10')), + parameters([ + string(name: 'CORE_REV', defaultValue: 'master'), + string(name: 'NOVA_REV', defaultValue: 'master'), + string(name: 'ENTERPRISE_REV', defaultValue: 'master'), + string(name: 'MASTERFILES_REV', defaultValue: 'master'), + string(name: 'DOCS_REV', defaultValue: 'master'), + string(name: 'DOCS_BRANCH', defaultValue: 'master', description: 'Where to upload artifacts - to http://buildcache.cloud.cfengine.com/packages/build-documentation-$DOCS_BRANCH/ and https://docs.cfengine.com/docs/$DOCS_BRANCH/'), + string(name: 'PACKAGE_JOB', defaultValue: 'testing-pr', description: 'where to take CFEngine HUB package from, a dir at http://buildcache.cloud.cfengine.com/packages/'), + string(name: 'USE_NIGHTLIES_FOR', defaultValue: 'master', description: 'branch whose nightlies to use (master, 3.18.x, etc) - will be one of http://buildcache.cloud.cfengine.com/packages/testing-pr/jenkins-$USE_NIGHTLIES_FOR-nightly-pipeline-$NUMBER/'), + string(name: 'NT_DOCS_REV', defaultValue: 'main', description: "${rev_ref_description}") + ]) +]) + +// clean workspace on Success (specify all the OTHER cases as false) + +node('CONTAINERS') { + dir('documentation') { + checkout scm + } + + stage('Checkout repositories') { + // Note that stages created this way are NOT available for "Restart from Stage" in jenkins UI +repos.each { org -> + println("organization is ${org.key}") + org.value.each { repo_data -> + if (!(repo_data instanceof Map)) { + repo_data=["${repo_data}": "master"] + } + repo_data.each{ repo, branch -> + stage("Checkout ${repo}") { + sh "mkdir -p ${repo}" + dir ("${repo}") + { + git branch: "${branch}", + credentialsId: 'autobuild', + url: "git@github.com:${org.key}/${repo}" + } + } + } + } +} +} // for the stage + stage('See what cloned') { + sh 'pwd' + sh 'whoami' + sh 'ls -la' + sh 'cd documentation; git log --oneline | head -n1' + } + withEnv([ +'BRANCH=master', +'PACKAGE_JOB=testing-pr', +'PACKAGE_UPLOAD_DIRECTORY=jenkins-master-nightly-pipeline-152', +'PACKAGE_BUILD=1', +]) { + stage('Build') { + // hard code for now, won't actually publish yet so not too big of a deal + sh 'bash -x documentation/generator/build/run.sh' + archiveArtifacts artifacts: 'output/', fingerprint: true + } +} +stage('Publish') { + sshPublisher(publishers: [sshPublisherDesc(configName: 'buildcache.cloud.cfengine.com', transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: '''set -x +export WRKDIR=`pwd` + +mkdir -p upload +mkdir -p output + +# find two tarballs +archive=`find upload -name \'cfengine-documentation-*.tar.gz\'` +tarball=`find upload -name packed-for-shipping.tar.gz` +echo "TARBALL: $tarball" +echo "ARCHIVE: $archive" + +# unpack $tarball +cd `dirname $tarball` +tar zxvf packed-for-shipping.tar.gz +rm packed-for-shipping.tar.gz + +# move $archive to the _site +mv $WRKDIR/$archive _site + +ls -la +cd - + +ls -la upload + +# note: this triggers systemd job to AV-scan new files +# and move them to proper places +mv upload/* output +''', execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: 'upload/$BUILD_TAG/build-documentation-$DOCS_BRANCH/$BUILD_TAG/', remoteDirectorySDF: false, removePrefix: '', sourceFiles: 'output/')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)]) +} + +stage('Clean workspace on Success') { + cleanWs() +} +} From 4f91aa7da4045a98db17740e5919a82da81c025f Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Fri, 11 Jul 2025 16:25:01 -0500 Subject: [PATCH 38/39] FP4 --- Jenkinsfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 63abb5007..330301332 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -5,6 +5,10 @@ pipeline { stage('Check environment'){ steps { sh 'env' + if (env.CHANGE_ID) { +echo pullRequest.title +echo pullRequest.body + } } } } From a8f6631132a30cbf8fea9443e5b19e65c6f85110 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Fri, 11 Jul 2025 16:27:01 -0500 Subject: [PATCH 39/39] FP4 --- Jenkinsfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 330301332..6ccbdcb86 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -5,10 +5,12 @@ pipeline { stage('Check environment'){ steps { sh 'env' +script { if (env.CHANGE_ID) { echo pullRequest.title echo pullRequest.body } +} } } }