1
0
mirror of https://github.com/kubernetes-sigs/descheduler.git synced 2026-01-26 05:14:13 +01:00

Compare commits

...

7 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
8744928020 Merge pull request #875 from kubernetes-sigs/revert-868-existing-contraints-backport-1.24
Revert "Existing contraints fix backport 1.24"
2022-07-07 07:43:34 -07:00
Jan Chaloupka
546d8ef196 Revert "Existing contraints fix backport 1.24" 2022-07-07 16:31:28 +02:00
Kubernetes Prow Robot
e5fa6e455a Merge pull request #868 from knelasevero/existing-contraints-backport-1.24
Existing contraints fix backport 1.24
2022-07-04 05:03:23 -07:00
Lucas Severo Alves
3cbd411062 Check existing constraints before assigning 2022-07-04 13:22:45 +02:00
Kubernetes Prow Robot
9bf473b7e4 Merge pull request #824 from damemi/1.24-fix-version-cmd
[release-1.24] Fix version command to parse helm chart tags
2022-06-01 07:25:02 -07:00
Mike Dame
dcb4899f33 Increase cloudbuild timeout to 25 minutes 2022-06-01 14:12:27 +00:00
Mike Dame
55ab0deaf7 Fix version command to parse helm chart tags 2022-05-31 17:39:37 +00:00
3 changed files with 13 additions and 3 deletions

View File

@@ -15,7 +15,7 @@
.PHONY: test
# VERSION is based on a date stamp plus the last commit
VERSION?=v$(shell date +%Y%m%d)-$(shell git describe --tags --match "v*")
VERSION?=v$(shell date +%Y%m%d)-$(shell git describe --tags)
BRANCH?=$(shell git branch --show-current)
SHA1?=$(shell git rev-parse HEAD)
BUILD=$(shell date +%FT%T%z)

View File

@@ -1,7 +1,7 @@
# See https://cloud.google.com/cloud-build/docs/build-config
# this must be specified in seconds. If omitted, defaults to 600s (10 mins)
timeout: 1200s
timeout: 1500s
# this prevents errors if you don't use both _GIT_TAG and _PULL_BASE_REF,
# or any new substitutions added in the future.
options:

View File

@@ -80,9 +80,19 @@ func splitVersion(version string) (string, string) {
// Version from an automated container build environment(not a tag) or a local build. For example v20201009-v0.18.0-46-g939c1c0.
m2, _ := regexp.MatchString(`^v\d{8}-v\d+\.\d+\.\d+-\w+-\w+$`, version)
// Version tagged by helm chart releaser action
helm, _ := regexp.MatchString(`^v\d{8}-descheduler-helm-chart-\d+\.\d+\.\d+$`, version)
// Dirty version where helm chart is the last known tag
helm2, _ := regexp.MatchString(`^v\d{8}-descheduler-helm-chart-\d+\.\d+\.\d+-\w+-\w+$`, version)
if m1 || m2 {
semVer := strings.Split(version, "-")[1]
return strings.Trim(strings.Split(semVer, ".")[0], "v"), strings.Split(semVer, ".")[1] + "+"
return strings.Trim(strings.Split(semVer, ".")[0], "v"), strings.Split(semVer, ".")[1] + "." + strings.Split(semVer, ".")[2]
}
if helm || helm2 {
semVer := strings.Split(version, "-")[4]
return strings.Split(semVer, ".")[0], strings.Split(semVer, ".")[1] + "." + strings.Split(semVer, ".")[2]
}
// Something went wrong