Skip to content

Commit

Permalink
AAE-16224 use provided context to filter clusters (#329)
Browse files Browse the repository at this point in the history
  • Loading branch information
erdemedeiros authored Sep 19, 2023
1 parent 25453e2 commit 0443227
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/actions/setup-rancher-cli/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ inputs:
context:
description: 'Rancher context for kubectl configuration'
required: false
default: local

runs:
using: "composite"
steps:
Expand All @@ -36,10 +38,13 @@ runs:
RANCHER2_URL=${{ inputs.url }}
if [[ -n "$RANCHER2_BEARER_TOKEN" ]]
then
RANCHER_SYSTEM_CONTEXT_INDEX=$(echo 1 | rancher login $RANCHER2_URL -t $RANCHER2_BEARER_TOKEN | grep local | grep System | cut -d ' ' -f1)
RANCHER_SYSTEM_CONTEXT_INDEX=$(echo 1 | rancher login $RANCHER2_URL -t $RANCHER2_BEARER_TOKEN | grep "$KUBECONTEXT" | grep System | cut -d ' ' -f1)
echo $RANCHER_SYSTEM_CONTEXT_INDEX | rancher login $RANCHER2_URL -t $RANCHER2_BEARER_TOKEN > /dev/null
fi
shell: bash
env:
KUBECONTEXT: ${{ inputs.context }}
- run: |
KUBECONTEXT="${{ inputs.context }}"
if [[ -n "$KUBECONTEXT" ]]
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v3.3.1
v3.3.2

0 comments on commit 0443227

Please sign in to comment.