Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Kubernetes
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SmartDataLab
public
CI-CD components
Kubernetes
Commits
7ac76459
Commit
7ac76459
authored
Sep 23, 2023
by
Pierre Smeyers
Browse files
Options
Downloads
Patches
Plain Diff
refactor: move assert defined
parent
42876cf5
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
templates/gitlab-ci-k8s.yml
+1
-2
1 addition, 2 deletions
templates/gitlab-ci-k8s.yml
with
1 addition
and
2 deletions
templates/gitlab-ci-k8s.yml
+
1
−
2
View file @
7ac76459
...
@@ -303,6 +303,7 @@ stages:
...
@@ -303,6 +303,7 @@ stages:
function k8s_login() {
function k8s_login() {
export k8s_namespace=${ENV_SPACE:-$K8S_SPACE}
export k8s_namespace=${ENV_SPACE:-$K8S_SPACE}
k8s_config=${ENV_KUBE_CONFIG:-${K8S_DEFAULT_KUBE_CONFIG}}
k8s_config=${ENV_KUBE_CONFIG:-${K8S_DEFAULT_KUBE_CONFIG}}
assert_defined "$k8s_namespace" 'Missing required env namespace'
if [[ -f "$k8s_config" ]]
if [[ -f "$k8s_config" ]]
then
then
...
@@ -698,7 +699,6 @@ k8s-score:
...
@@ -698,7 +699,6 @@ k8s-score:
before_script
:
before_script
:
-
*k8s-scripts
-
*k8s-scripts
-
install_ca_certs "${CUSTOM_CA_CERTS:-$DEFAULT_CA_CERTS}"
-
install_ca_certs "${CUSTOM_CA_CERTS:-$DEFAULT_CA_CERTS}"
-
assert_defined "${ENV_SPACE:-$K8S_SPACE}" 'Missing required env $ENV_SPACE or $K8S_SPACE'
-
k8s_login
-
k8s_login
script
:
script
:
-
k8s_deploy
-
k8s_deploy
...
@@ -734,7 +734,6 @@ k8s-score:
...
@@ -734,7 +734,6 @@ k8s-score:
before_script
:
before_script
:
-
*k8s-scripts
-
*k8s-scripts
-
install_ca_certs "${CUSTOM_CA_CERTS:-$DEFAULT_CA_CERTS}"
-
install_ca_certs "${CUSTOM_CA_CERTS:-$DEFAULT_CA_CERTS}"
-
assert_defined "${ENV_SPACE:-$K8S_SPACE}" 'Missing required env $ENV_SPACE or $K8S_SPACE'
-
k8s_login
-
k8s_login
script
:
script
:
-
k8s_cleanup
-
k8s_cleanup
...
...
This diff is collapsed.
Click to expand it.
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