Skip to content

Commit

Permalink
conditional cluster definition
Browse files Browse the repository at this point in the history
ocp_cluster_name=leogit5

delete_ocp_cluster=true
  • Loading branch information
leiicamundi committed May 15, 2024
1 parent 22ada8f commit dc42996
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/actions/rosa-create-cluster/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ inputs:
required: true
admin-username:
description: 'Admin username for the ROSA cluster'
default: "kubeadmin"
default: "cluster-admin"
required: true
aws-region:
description: 'AWS region where the ROSA cluster will be deployed'
Expand Down Expand Up @@ -177,8 +177,8 @@ runs:
echo "server_api=$server_api"
echo "server_api=$server_api" >> "$GITHUB_OUTPUT"
echo "oc login --username '${{ inputs.admin-username }}' --password '${{ inputs.admin-password }}' --server=$server_api" > login_command.txt
oc login --username="${{ inputs.admin-username }}" --password="${{ inputs.admin-password }}" --server="$server_api" --loglevel=10
echo "oc login --username '${{ inputs.admin-username }}' --password '${{ inputs.admin-password }}'" > login_command.txt
oc login $server_api --username="${{ inputs.admin-username }}" --password="${{ inputs.admin-password }}" --loglevel=10
kubectl config rename-context $(oc config current-context) "${{ inputs.cluster-name }}"
kubectl config use "${{ inputs.cluster-name }}"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ jobs:
with:
rh-token: ${{ steps.secrets.outputs.RH_OPENSHIFT_TOKEN }}
cluster-name: "${{ steps.commit_info.outputs.cluster_name }}"
admin-username: "cluster-admin"
admin-password: "${{ steps.secrets.outputs.CI_OPENSHIFT_MAIN_PASSWORD }}"
aws-region: ${{ env.AWS_REGION }}
namespace: "myns"
Expand Down

0 comments on commit dc42996

Please sign in to comment.