forked from kubernetes/autoscaler
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cluster-autoscaler) upgrade to 1.27
- Loading branch information
zoe.chou
committed
Jun 26, 2024
1 parent
89c404e
commit 3c6fd4a
Showing
2 changed files
with
6,465 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
// throttle concurrent build | ||
properties([[$class: 'ThrottleJobProperty', categories: [], limitOneJobWithMatchingParams: false, maxConcurrentPerNode: 1, maxConcurrentTotal: 1, paramsToUseForLimit: '', throttleEnabled: true, throttleOption: 'project']]) | ||
|
||
library(identifier: "visenze-lib@${params['VISENZE_LIB_BRANCH'] ?: 'master'}", changelog: false) | ||
|
||
pipeline { | ||
agent { | ||
label "build-amd64" | ||
} | ||
|
||
options { | ||
ansiColor('xterm') | ||
} | ||
|
||
tools { | ||
go 'go1.20' | ||
} | ||
|
||
stages { | ||
stage('Checkout') { | ||
steps { | ||
checkout([ | ||
$class: 'GitSCM', | ||
branches: scm.branches, | ||
doGenerateSubmoduleConfigurations: scm.doGenerateSubmoduleConfigurations, | ||
extensions: [ | ||
[ | ||
$class: 'CloneOption', | ||
noTags: true, | ||
reference: '', | ||
timeout: 60 | ||
], | ||
[ | ||
$class: 'SubmoduleOption', | ||
disableSubmodules: false, | ||
parentCredentials: true, | ||
recursiveSubmodules: true, | ||
trackingSubmodules: true, | ||
reference: '', | ||
timeout: 60 | ||
], | ||
[$class: 'CleanBeforeCheckout'] | ||
], | ||
userRemoteConfigs: scm.userRemoteConfigs | ||
]) | ||
} | ||
} | ||
|
||
stage('Test') { | ||
when { | ||
expression { | ||
return canRun() | ||
} | ||
} | ||
steps { | ||
script { | ||
dir('cluster-autoscaler') { | ||
sh('make test-in-docker') | ||
} | ||
} | ||
} | ||
} | ||
|
||
stage('Docker Build&Push') { | ||
when { | ||
expression { | ||
return canRun() | ||
} | ||
} | ||
steps { | ||
script { | ||
dir('cluster-autoscaler') { | ||
def version = sh(script: "grep ClusterAutoscalerVersion version/version.go", | ||
returnStdout: true).split('"')[-2] | ||
docker.withRegistry('', 'docker-hub-credential') { | ||
sh("docker buildx create --use") | ||
sh("docker buildx build -t visenze/cluster-autoscaler:${version} --push --platform linux/arm64,linux/amd64 .") | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
def canRun() { | ||
return env.BRANCH_NAME.startsWith('release-') || env.BRANCH_NAME == 'master' | ||
} |
Oops, something went wrong.