[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [sysadmin/binary-factory-tooling] /: Migrate the MingW for MSVC cache build into the DSL
From: Ben Cooksley <null () kde ! org>
Date: 2018-09-01 0:27:11
Message-ID: E1fvtkt-0003W0-SC () code ! kde ! org
[Download RAW message or body]
Git commit 169e52e12e78c949b749b84cfe07e2f08b45251a by Ben Cooksley.
Committed on 01/09/2018 at 00:27.
Pushed by bcooksley into branch 'master'.
Migrate the MingW for MSVC cache build into the DSL
A +46 -0 craft-cache/mingw-for-msvc.pipeline
M +32 -0 dsl/craft_cache_jobs.groovy
https://commits.kde.org/sysadmin/binary-factory-tooling/169e52e12e78c949b749b84cfe07e2f08b45251a
diff --git a/craft-cache/mingw-for-msvc.pipeline \
b/craft-cache/mingw-for-msvc.pipeline new file mode 100644
index 0000000..e8f03de
--- /dev/null
+++ b/craft-cache/mingw-for-msvc.pipeline
@@ -0,0 +1,46 @@
+// Request a builder
+node( "WindowsMSVC" ) {
+ // We want Timestamps on everything
+ timestamps {
+ // As this is a cache rebuild, we operate from C:/Craft/MinGWBinariesForMSVC
+ // First things first though, updating our copies of craftmaster and ci-tooling
+ stage('Update Tooling') {
+ powershell '''
+ $ROOT = "C:/Craft/MinGWBinariesForMSVC/"
+ Write-Host "Setting up things in $ROOT"
+ function git_clone([string] $repo, [string]$checkoutDir)
+ {
+ if (!(test-path -path $ROOT)) {
+ mkdir -p $ROOT
+ }
+ if (test-path -path $ROOT/$checkoutDir/) {
+ cd $ROOT/$checkoutDir/
+ cmd /C "git pull --rebase 2>&1"
+ } else {
+ cmd /C "git clone $repo $ROOT/$checkoutDir 2>&1"
+ }
+ }
+ git_clone "git://anongit.kde.org/craftmaster.git" "craftmaster"
+ git_clone "git://anongit.kde.org/sysadmin/ci-tooling" "ci-tooling"
+ '''
+ }
+
+ // Now that is done, it's time to rebuild the Craft Cache!
+ stage('Build Craft Cache') {
+ bat '''
+ set ROOT="C:/Craft/MinGWBinariesForMSVC/"
+ cd %ROOT%
+ python -u craftmaster/Craftmaster.py --verbose --config \
craftmaster/config/autotools/autotools.ini + '''
+ }
+
+ // And finally, we'll upload it to the master server
+ stage('Publish Craft Cache') {
+ bat '''
+ set ROOT="C:/Craft/MinGWBinariesForMSVC/"
+ cd %ROOT%/ci-tooling/
+ python -u helpers/sftp-directory-mirror.py --source %ROOT%/cache/ \
--destination /srv/archives/files/craft/autotools/ --server racnoss.kde.org \
--username craft + '''
+ }
+ }
+}
diff --git a/dsl/craft_cache_jobs.groovy b/dsl/craft_cache_jobs.groovy
index ea12bb5..c7b3edc 100644
--- a/dsl/craft_cache_jobs.groovy
+++ b/dsl/craft_cache_jobs.groovy
@@ -79,3 +79,35 @@ pipelineJob( "Craft_Builder_Cleanup" ) {
}
}
}
+
+// We also want to ensure a MingW for MSVC build exists
+def pipelineScript = readFileFromWorkspace("craft-cache/mingw-for-msvc.pipeline")
+
+// Actually create the job now
+pipelineJob( "MinGW-w64_binaries_for_MSVC" ) {
+ properties {
+ // We don't want to keep build results forever
+ // We'll set it to keep the last 10 builds and discard everything else
+ buildDiscarder {
+ strategy {
+ logRotator {
+ numToKeepStr("5")
+ daysToKeepStr('')
+ artifactDaysToKeepStr('')
+ artifactNumToKeepStr('')
+ }
+ }
+ }
+ // We don't want to be building the same project more than once
+ // This is to prevent one project hogging resources
+ // And also has a practical component as otherwise an older build could finish \
afterwards and upload old build results + disableConcurrentBuilds()
+ }
+ // This is where the Pipeline script actually happens :)
+ definition {
+ cps {
+ script( pipelineScript )
+ sandbox()
+ }
+ }
+}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic