-
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: separate updatecli to its own pipeline (#2866)
* feat: separate updatecli to its own pipeline Ref: jenkins-infra/helpdesk#2778 * add updatecli job for kubernetes-management on infra.ci * remove redundant 'Management' * clean Jenkinsfile_updatecli * remove unused do token credential for kubernetes-management-updatecli * update updatecli manifest * set a top folder with one children instead for now until we adapt the job-dsl chart for a 'organization-scanning' kind * cleanup: remove helmfile image in Jenkinsfile_updatecli As it's already defined in the 'updatecli' function of the shared pipeline library * chore: better job description * fix: quote Co-authored-by: Damien Duportal <[email protected]>
- Loading branch information
1 parent
8b5bb24
commit 3b2693b
Showing
4 changed files
with
68 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
def cronExpr = env.BRANCH_IS_PRIMARY ? 'H/30 * * * *' : '' | ||
|
||
pipeline { | ||
agent { | ||
kubernetes { | ||
yamlFile 'PodTemplates.yaml' | ||
} | ||
} | ||
|
||
options { | ||
buildDiscarder(logRotator(numToKeepStr: '10')) | ||
timeout(time: 30, unit: 'MINUTES') | ||
disableConcurrentBuilds() | ||
} | ||
|
||
triggers { | ||
cron (cronExpr) | ||
} | ||
|
||
environment { | ||
AWS_ACCESS_KEY_ID = credentials('packer-aws-access-key-id') | ||
AWS_SECRET_ACCESS_KEY = credentials('packer-aws-secret-access-key') | ||
AWS_DEFAULT_REGION = 'us-east-2' | ||
} | ||
stages { | ||
stage('Check Configuration Update') { | ||
// Run updatecli's diff on both push and pull requests (in case a configuration change breaks updatecli) | ||
steps { | ||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { | ||
updatecli(action: 'diff', cronTriggerExpression: cronExpr) | ||
} | ||
} | ||
} // stage | ||
stage('Apply Configuration Update') { | ||
when { | ||
expression { env.BRANCH_IS_PRIMARY } | ||
} | ||
steps { | ||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { | ||
updatecli(action: 'apply', cronTriggerExpression: cronExpr) | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters