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
c31371c7
Commit
c31371c7
authored
Feb 1, 2023
by
P.-A. RIVIERE
Browse files
Options
Downloads
Patches
Plain Diff
fix(KUBECONFIG): select to the given KUBE_CONTEXT if provided
parent
c28ad61a
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
+6
-0
6 additions, 0 deletions
templates/gitlab-ci-k8s.yml
with
6 additions
and
0 deletions
templates/gitlab-ci-k8s.yml
+
6
−
0
View file @
c31371c7
...
...
@@ -303,6 +303,12 @@ stages:
elif [[ -n "$KUBECONFIG" ]]
then
log_info "--- using \\e[32mKUBECONFIG\\e[0m provided by GitLab"
if [[ -n "$KUBE_CONTEXT" ]]
then
kubectl config use-context "$KUBE_CONTEXT"
log_info "--- switch to the given \\e[32mKUBE_CONTEXT\\e[0m: ${KUBE_CONTEXT}"
fi
else
log_info "--- using exploded \\e[32mKUBECONFIG\\e[0m parameters (env: \\e[33;1m${environment_type}\\e[0m, url: \\e[33;1m${url}\\e[0m, namespace: \\e[33;1m${namespace}\\e[0m)"
...
...
This diff is collapsed.
Click to expand it.
Benguria Elguezabal, Gorka
@gorka.benguria
mentioned in commit
c7d0fbf4
·
Jun 4, 2024
mentioned in commit
c7d0fbf4
mentioned in commit c7d0fbf4fe0423cc5245977c921f7692c720506c
Toggle commit list
Ghost User
@ghost
mentioned in commit
7083e03b
·
Jun 5, 2024
mentioned in commit
7083e03b
mentioned in commit 7083e03b07ebfa883f30baae515913286b69e8e1
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