Skip to content

Commit

Permalink
Fixing kubeconfig issue in test.yaml (#918)
Browse files Browse the repository at this point in the history
  • Loading branch information
willdavsmith authored Jan 4, 2024
1 parent 347842c commit 7336155
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,34 @@ jobs:
--username ${{ secrets.AZURE_SP_TESTS_APPID }} \
--password ${{ secrets.AZURE_SP_TESTS_PASSWORD }} \
--tenant ${{ secrets.AZURE_SP_TESTS_TENANTID }}
- name: Configure AWS
if: steps.gen-id.outputs.RUN_TEST == 'true' && matrix.credential == 'aws'
run: |
aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }}
aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws configure set region ${{ env.AWS_REGION }}
aws configure set output json
- name: Download k3d
if: steps.gen-id.outputs.RUN_TEST == 'true'
run: wget -q -O - https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash
- name: Create k3d cluster
if: steps.gen-id.outputs.RUN_TEST == 'true'
run: k3d cluster create --agents 2 -p "80:80@loadbalancer" --k3s-arg "--disable=traefik@server:0" --registry-create sampleregistry:51351
- name: Build images
if: steps.gen-id.outputs.RUN_TEST == 'true' && matrix.images != ''
run: |
# split images and directories into arrays
IFS=',' read -ra images <<< "${{ matrix.images }}"
IFS=',' read -ra directories <<< "${{ matrix.directories }}"
echo "Building images: $images"
echo "Directories: $directories"
for index in "${!images[@]}"; do
image=${images[$index]}
directory=${directories[$index]}
echo "Building image $image from directory $directory"
docker build -t localhost:51351/$image:latest $directory
docker push localhost:51351/$image:latest
done
# Create and install test environment
- name: Create Azure resource group
if: steps.gen-id.outputs.RUN_TEST == 'true' && matrix.credential == 'azure'
Expand All @@ -151,13 +179,6 @@ jobs:
echo "Waiting for resource group ${{ steps.gen-id.outputs.TEST_AZURE_RESOURCE_GROUP }} to be created..."
sleep 5
done
- name: Configure AWS
if: steps.gen-id.outputs.RUN_TEST == 'true' && matrix.credential == 'aws'
run: |
aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }}
aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws configure set region ${{ env.AWS_REGION }}
aws configure set output json
- name: Create EKS Cluster
if: steps.gen-id.outputs.RUN_TEST == 'true' && matrix.credential == 'aws'
id: create-eks
Expand All @@ -177,27 +198,6 @@ jobs:
aws eks update-kubeconfig --region ${{ env.AWS_REGION }} --name ${{ steps.gen-id.outputs.TEST_EKS_CLUSTER_NAME }}
timeout-minutes: 60
continue-on-error: false
- name: Download k3d
if: steps.gen-id.outputs.RUN_TEST == 'true'
run: wget -q -O - https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash
- name: Create k3d cluster
if: steps.gen-id.outputs.RUN_TEST == 'true'
run: k3d cluster create --agents 2 -p "80:80@loadbalancer" --k3s-arg "--disable=traefik@server:0" --registry-create sampleregistry:51351
- name: Build images
if: steps.gen-id.outputs.RUN_TEST == 'true' && matrix.images != ''
run: |
# split images and directories into arrays
IFS=',' read -ra images <<< "${{ matrix.images }}"
IFS=',' read -ra directories <<< "${{ matrix.directories }}"
echo "Building images: $images"
echo "Directories: $directories"
for index in "${!images[@]}"; do
image=${images[$index]}
directory=${directories[$index]}
echo "Building image $image from directory $directory"
docker build -t localhost:51351/$image:latest $directory
docker push localhost:51351/$image:latest
done
- name: Install Dapr
if: steps.gen-id.outputs.RUN_TEST == 'true' && steps.gen-id.outputs.ENABLE_DAPR == 'true'
run: |
Expand Down

0 comments on commit 7336155

Please sign in to comment.