From fc86afd00cb28441d40e8e730629239173627b2d Mon Sep 17 00:00:00 2001 From: Jacob Salmela Date: Mon, 31 Jul 2023 15:56:51 -0500 Subject: [PATCH] fix release action by not making alpha release 'stable' Signed-off-by: Jacob Salmela --- Jenkinsfile.github | 50 ++++++++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/Jenkinsfile.github b/Jenkinsfile.github index a37cf64e..3055d5b1 100644 --- a/Jenkinsfile.github +++ b/Jenkinsfile.github @@ -1,30 +1,36 @@ /* - MIT License - - (C) Copyright 2022-2023 Hewlett Packard Enterprise Development LP - - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the "Software"), - to deal in the Software without restriction, including without limitation - the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR - OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - OTHER DEALINGS IN THE SOFTWARE. + * + * MIT License + * + * (C) Copyright 2023 Hewlett Packard Enterprise Development LP + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * */ @Library('csm-shared-library') _ def goImage = 'artifactory.algol60.net/csm-docker/stable/csm-docker-sle-go' -def isStable = env.TAG_NAME != null ? true : false +// Only consider X.Y.Z and X.Y.Z.postN tags as stable. +// Never consider X.Y.Z{[a|b|rc} or X.Y.Z.* tags (that are not post-releases) as stable. +// The ==~ operator performs an exact match. +def stableToken = ~/v?\d+\.\d+\.\d+(\.post\d+)?/ +def isStable = (env.TAG_NAME != null & env.TAG_NAME ==~ stableToken) ? true : false pipeline { agent {