mirror of
https://github.com/status-im/status-mobile.git
synced 2025-01-10 00:35:43 +00:00
Jakub Sokołowski
28aeb2dad0
I have created separate API tokens for Mobile project and changed how they are passed in Jenkins by using a single file. Depends on: https://github.com/status-im/status-jenkins-lib/pull/88 Signed-off-by: Jakub Sokołowski <jakub@status.im>
49 lines
938 B
Groovy
49 lines
938 B
Groovy
#!/usr/bin/env groovy
|
|
library 'status-jenkins-lib@v1.8.12'
|
|
|
|
pipeline {
|
|
agent {
|
|
label 'linux'
|
|
}
|
|
|
|
triggers {
|
|
cron('H 5 * * *')
|
|
}
|
|
|
|
options {
|
|
timestamps()
|
|
/* Prevent Jenkins jobs from running forever */
|
|
timeout(time: 15, unit: 'MINUTES')
|
|
/* Disable concurrent jobs */
|
|
disableConcurrentBuilds()
|
|
/* Don't keep more than 50 builds */
|
|
buildDiscarder(logRotator(numToKeepStr: '10'))
|
|
}
|
|
|
|
stages {
|
|
stage('Get Nodes') {
|
|
steps { script {
|
|
stagePerNode = nodesByLabel('macos').collectEntries {
|
|
["${it}" : generateNodeCleanupStage(it)]
|
|
}
|
|
} }
|
|
}
|
|
|
|
stage('Clean Xcode') {
|
|
steps { script {
|
|
parallel stagePerNode
|
|
} }
|
|
}
|
|
}
|
|
}
|
|
|
|
def generateNodeCleanupStage(nodeLabel) {
|
|
return { stage(nodeLabel) {
|
|
node(nodeLabel) {
|
|
dir('/Users/jenkins/Library/Developer/Xcode') {
|
|
sh 'rm -fr Archives DerivedData'
|
|
}
|
|
}
|
|
} }
|
|
}
|