Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Helm
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
Gitlab 17.10.1 is available
Show more breadcrumbs
to be continuous...
Helm
Commits
5b60640d
Commit
5b60640d
authored
2 years ago
by
Cédric OLIVIER
Browse files
Options
Downloads
Patches
Plain Diff
feat: switch score job to package-test stage
parent
9edca585
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
templates/gitlab-ci-helm.yml
+22
-21
22 additions, 21 deletions
templates/gitlab-ci-helm.yml
with
22 additions
and
21 deletions
templates/gitlab-ci-helm.yml
+
22
−
21
View file @
5b60640d
# =========================================================================================
# =========================================================================================
# Copyright (C) 2021 Orange & contributors
# Copyright (C) 2021 Orange & contributors
#
#
# This program is free software; you can redistribute it and/or modify it under the terms
# This program is free software; you can redistribute it and/or modify it under the terms
# of the GNU Lesser General Public License as published by the Free Software Foundation;
# of the GNU Lesser General Public License as published by the Free Software Foundation;
# either version 3 of the License, or (at your option) any later version.
# either version 3 of the License, or (at your option) any later version.
#
#
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU Lesser General Public License for more details.
# See the GNU Lesser General Public License for more details.
#
#
# You should have received a copy of the GNU Lesser General Public License along with this
# You should have received a copy of the GNU Lesser General Public License along with this
# program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
# program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
# Floor, Boston, MA 02110-1301, USA.
# Floor, Boston, MA 02110-1301, USA.
# =========================================================================================
# =========================================================================================
# default workflow rules: Merge Request pipelines
# default workflow rules: Merge Request pipelines
...
@@ -115,6 +115,7 @@ variables:
...
@@ -115,6 +115,7 @@ variables:
stages
:
stages
:
-
test
-
test
-
package-build
-
package-build
-
package-test
-
deploy
-
deploy
-
publish
-
publish
-
production
-
production
...
@@ -189,8 +190,8 @@ stages:
...
@@ -189,8 +190,8 @@ stages:
_test_op=$(echo "$_fields" | cut -d: -f5)
_test_op=$(echo "$_fields" | cut -d: -f5)
case "$_test_op" in
case "$_test_op" in
defined)
defined)
if [[ -z "$_not" ]] && [[ -z "$_cond_val" ]]; then continue;
if [[ -z "$_not" ]] && [[ -z "$_cond_val" ]]; then continue;
elif [[ "$_not" ]] && [[ "$_cond_val" ]]; then continue;
elif [[ "$_not" ]] && [[ "$_cond_val" ]]; then continue;
fi
fi
;;
;;
equals|startswith|endswith|contains|in|equals_ic|startswith_ic|endswith_ic|contains_ic|in_ic)
equals|startswith|endswith|contains|in|equals_ic|startswith_ic|endswith_ic|contains_ic|in_ic)
...
@@ -209,28 +210,28 @@ stages:
...
@@ -209,28 +210,28 @@ stages:
fi
fi
case "$_test_op" in
case "$_test_op" in
equals*)
equals*)
if [[ -z "$_not" ]] && [[ "$_cond_val" != "$_cmp_val" ]]; then continue;
if [[ -z "$_not" ]] && [[ "$_cond_val" != "$_cmp_val" ]]; then continue;
elif [[ "$_not" ]] && [[ "$_cond_val" == "$_cmp_val" ]]; then continue;
elif [[ "$_not" ]] && [[ "$_cond_val" == "$_cmp_val" ]]; then continue;
fi
fi
;;
;;
startswith*)
startswith*)
if [[ -z "$_not" ]] && [[ "$_cond_val" != "$_cmp_val"* ]]; then continue;
if [[ -z "$_not" ]] && [[ "$_cond_val" != "$_cmp_val"* ]]; then continue;
elif [[ "$_not" ]] && [[ "$_cond_val" == "$_cmp_val"* ]]; then continue;
elif [[ "$_not" ]] && [[ "$_cond_val" == "$_cmp_val"* ]]; then continue;
fi
fi
;;
;;
endswith*)
endswith*)
if [[ -z "$_not" ]] && [[ "$_cond_val" != *"$_cmp_val" ]]; then continue;
if [[ -z "$_not" ]] && [[ "$_cond_val" != *"$_cmp_val" ]]; then continue;
elif [[ "$_not" ]] && [[ "$_cond_val" == *"$_cmp_val" ]]; then continue;
elif [[ "$_not" ]] && [[ "$_cond_val" == *"$_cmp_val" ]]; then continue;
fi
fi
;;
;;
contains*)
contains*)
if [[ -z "$_not" ]] && [[ "$_cond_val" != *"$_cmp_val"* ]]; then continue;
if [[ -z "$_not" ]] && [[ "$_cond_val" != *"$_cmp_val"* ]]; then continue;
elif [[ "$_not" ]] && [[ "$_cond_val" == *"$_cmp_val"* ]]; then continue;
elif [[ "$_not" ]] && [[ "$_cond_val" == *"$_cmp_val"* ]]; then continue;
fi
fi
;;
;;
in*)
in*)
if [[ -z "$_not" ]] && [[ "__${_cmp_val}__" != *"__${_cond_val}__"* ]]; then continue;
if [[ -z "$_not" ]] && [[ "__${_cmp_val}__" != *"__${_cond_val}__"* ]]; then continue;
elif [[ "$_not" ]] && [[ "__${_cmp_val}__" == *"__${_cond_val}__"* ]]; then continue;
elif [[ "$_not" ]] && [[ "__${_cmp_val}__" == *"__${_cond_val}__"* ]]; then continue;
fi
fi
;;
;;
esac
esac
...
@@ -319,7 +320,7 @@ stages:
...
@@ -319,7 +320,7 @@ stages:
eval_secret "$var"
eval_secret "$var"
done
done
}
}
function get_helm_config_opt() {
function get_helm_config_opt() {
echo -n "--registry-config $CI_PROJECT_DIR/.config/helm/registry.json "
echo -n "--registry-config $CI_PROJECT_DIR/.config/helm/registry.json "
echo -n "--repository-cache $CI_PROJECT_DIR/.cache/helm/repository "
echo -n "--repository-cache $CI_PROJECT_DIR/.cache/helm/repository "
...
@@ -474,7 +475,7 @@ stages:
...
@@ -474,7 +475,7 @@ stages:
# shellcheck disable=SC2086
# shellcheck disable=SC2086
helm ${TRACE+--debug} $helm_opts $helm_namespace_opt $HELM_TEST_ARGS $appname
helm ${TRACE+--debug} $helm_opts $helm_namespace_opt $HELM_TEST_ARGS $appname
}
}
function maybe_install_curl() {
function maybe_install_curl() {
if ! command -v curl > /dev/null
if ! command -v curl > /dev/null
then
then
...
@@ -518,7 +519,7 @@ stages:
...
@@ -518,7 +519,7 @@ stages:
image
:
image
:
name
:
$HELM_KUBE_SCORE_IMAGE
name
:
$HELM_KUBE_SCORE_IMAGE
entrypoint
:
[
"
"
]
entrypoint
:
[
"
"
]
stage
:
test
stage
:
package-
test
before_script
:
before_script
:
-
*helm-scripts
-
*helm-scripts
-
install_ca_certs "${CUSTOM_CA_CERTS:-$DEFAULT_CA_CERTS}"
-
install_ca_certs "${CUSTOM_CA_CERTS:-$DEFAULT_CA_CERTS}"
...
@@ -707,7 +708,7 @@ helm-package:
...
@@ -707,7 +708,7 @@ helm-package:
helm_version_opts="--app-version ${SEMREL_INFO_NEXT_VERSION} --version ${SEMREL_INFO_NEXT_VERSION}"
helm_version_opts="--app-version ${SEMREL_INFO_NEXT_VERSION} --version ${SEMREL_INFO_NEXT_VERSION}"
fi
fi
-
helm $HELM_PACKAGE_ARGS ${TRACE+--debug} $helm_version_opts $HELM_CHART_DIR --destination helm_packages
-
helm $HELM_PACKAGE_ARGS ${TRACE+--debug} $helm_version_opts $HELM_CHART_DIR --destination helm_packages
-
|
-
|
package=$(ls -1 ./helm_packages/*.tgz 2>/dev/null || echo "")
package=$(ls -1 ./helm_packages/*.tgz 2>/dev/null || echo "")
if [ -n "$HELM_PUBLISH_SNAPSHOT_URL" ] && [ -n "${package}" ]
if [ -n "$HELM_PUBLISH_SNAPSHOT_URL" ] && [ -n "${package}" ]
then
then
...
@@ -739,7 +740,7 @@ helm-publish:
...
@@ -739,7 +740,7 @@ helm-publish:
extends
:
.helm-base
extends
:
.helm-base
stage
:
publish
stage
:
publish
script
:
script
:
-
|
-
|
package=$(ls -1 ./helm_packages/*.tgz 2>/dev/null || echo "")
package=$(ls -1 ./helm_packages/*.tgz 2>/dev/null || echo "")
if [ -n "$HELM_PUBLISH_URL" ] && [ -n "${package}" ]
if [ -n "$HELM_PUBLISH_URL" ] && [ -n "${package}" ]
then
then
...
...
This diff is collapsed.
Click to expand it.
Ghost User
@ghost
mentioned in commit
3b192c57
·
2 years ago
mentioned in commit
3b192c57
mentioned in commit 3b192c5744344acd8aa5928dcd3dfbfaf588bc09
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment