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 from kubernetes/autoscaler/cluster-autoscaler-release-1.28
- Loading branch information
1 parent
66d006f
commit fd8fd35
Showing
93 changed files
with
29,699 additions
and
1,053 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' | ||
} |
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,21 @@ | ||
FROM golang:1.20.14 AS build | ||
|
||
ARG TARGETARCH | ||
ENV GOPATH /gopath/ | ||
ENV PATH $GOPATH/bin:$PATH | ||
ENV GO111MODULE auto | ||
ENV GOARCH ${TARGETARCH} | ||
|
||
RUN apt-get update && apt-get --yes install libseccomp-dev | ||
RUN go version | ||
RUN go get github.com/tools/godep | ||
RUN godep version | ||
|
||
WORKDIR /gopath/src/k8s.io/autoscaler/cluster-autoscaler | ||
ADD . . | ||
RUN CGO_ENABLED=0 GOOS=linux go build -o cluster-autoscaler --ldflags "-s" | ||
|
||
FROM alpine | ||
COPY --from=build /gopath/src/k8s.io/autoscaler/cluster-autoscaler/cluster-autoscaler / | ||
|
||
CMD ["./cluster-autoscaler"] |
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
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
Oops, something went wrong.