From ec0568bc908d822e2d3187d5d887d93d716cb78c Mon Sep 17 00:00:00 2001 From: Vibhav Bobade Date: Tue, 31 Oct 2023 19:25:28 +0530 Subject: [PATCH 01/20] test-k8s-version --- .../workflows/changelog_builder/config.json | 30 ++++ .github/workflows/e2e.yaml | 170 ++++++++++++++++++ 2 files changed, 200 insertions(+) create mode 100644 .github/workflows/changelog_builder/config.json create mode 100644 .github/workflows/e2e.yaml diff --git a/.github/workflows/changelog_builder/config.json b/.github/workflows/changelog_builder/config.json new file mode 100644 index 0000000..7a5af25 --- /dev/null +++ b/.github/workflows/changelog_builder/config.json @@ -0,0 +1,30 @@ +{ + "categories": [ + { + "title": "## � Features", + "labels": ["feature"] + }, + { + "title": "## � Fixes", + "labels": ["fix"] + }, + { + "title": "## � Tests", + "labels": ["test"] + }, + { + "title": "## � Other", + "labels": ["other"] + }, + { + "title": "## � Dependencies", + "labels": ["dependencies"] + } + ], + "sort": "ASC", + "template": "${{CHANGELOG}}", + "pr_template": "- ${{TITLE}}\n - PR: #${{NUMBER}}", + "empty_template": "- no changes", + "max_pull_requests": 1000, + "max_back_track_time_days": 1000 +} \ No newline at end of file diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml new file mode 100644 index 0000000..91311da --- /dev/null +++ b/.github/workflows/e2e.yaml @@ -0,0 +1,170 @@ +name: Multicluster e2e + +on: + pull_request: + branches: [ main ] + types: [opened,reopened,synchronize,closed] + +permissions: + contents: read + pull-requests: write + id-token: write + +jobs: + build-image: + name: Build and Push `nodejs` Image + runs-on: ubuntu-latest + if: ${{ github.event_name == 'pull_request' && github.event.action != 'closed' }} + outputs: + tags: ${{ steps.meta.outputs.tags }} + uuid: ${{ env.UUID_IMAGE }} + steps: + - name: Checkout git repo + uses: actions/checkout@v3 + - name: Generate UUID image name + id: uuid + run: echo "UUID_IMAGE=$(uuidgen)" >> $GITHUB_ENV + - name: Docker metadata + id: meta + uses: docker/metadata-action@v4 + with: + # An anonymous, emphemeral registry built on ttl.sh + images: registry.uffizzi.com/${{ env.UUID_IMAGE }} + tags: type=raw,value=48h + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Build and Push Image to Uffizzi Ephemeral Registry + uses: docker/build-push-action@v3 + with: + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + context: ./ + cache-from: type=gha + cache-to: type=gha,mode=max + + uffizzi-cluster: + name: Deploy Helm chart to Uffizzi Virtual Cluster + needs: + - build-image + if: ${{ github.event_name == 'pull_request' && github.event.action != 'closed' }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + # Identify comment to be updated + - name: Find comment for Ephemeral Environment + uses: peter-evans/find-comment@v2 + id: find-comment + with: + issue-number: ${{ github.event.pull_request.number }} + comment-author: "github-actions[bot]" + body-includes: pr-${{ github.event.pull_request.number }}-e2e-helm + direction: last + + # Create/Update comment with action deployment status + - name: Create or Update Comment with Deployment Notification + id: notification + uses: peter-evans/create-or-update-comment@v2 + with: + comment-id: ${{ steps.find-comment.outputs.comment-id }} + issue-number: ${{ github.event.pull_request.number }} + body: | + ## Uffizzi Ephemeral Environment - Virtual Cluster - E2E Helm Chart + + :cloud: deploying ... + + :gear: Updating now by workflow run [${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}). + + Cluster name will be `pr-${{ github.event.pull_request.number }}-e2e-helm` + + Download the Uffizzi CLI to interact with the upcoming virtual cluster + https://docs.uffizzi.com/install + edit-mode: replace + + - name: Create and connect to vcluster + uses: UffizziCloud/cluster-action@k8s_version + with: + cluster-name: pr-${{ github.event.pull_request.number }}-1276 + server: https://app.uffizzi.com + k8s-version: 1.27.6 + kubeconfig-name: kubeconfig-1276 + + - name: Create and connect to vcluster + uses: UffizziCloud/cluster-action@k8s_version + with: + cluster-name: pr-${{ github.event.pull_request.number }}-1282 + server: https://app.uffizzi.com + k8s-version: 1.28.2 + kubeconfig-name: kubeconfig-1282 + + - name: Apply Kustomize to test the new image + id: prev + run: | + # Change the image name to those just built and pushed. + kustomize edit set image uffizzi/hello-world-k8s=${{ needs.build-image.outputs.tags }} + + if [[ ${RUNNER_DEBUG} == 1 ]]; then + cat kustomization.yaml + echo "`pwd`" + echo "`ls`" + fi + + # Apply kustomized manifests to virtual cluster. + kubectl apply --kustomize . --kubeconfig ./kubeconfig + + # Allow uffizzi to sync the resources + sleep 5 + + # Get the hostnames assigned by uffizzi + export WEB_HOST=$(kubectl get ingress web --kubeconfig kubeconfig -o json | jq '.spec.rules[0].host' | tr -d '"') + + if [[ ${RUNNER_DEBUG} == 1 ]]; then + kubectl get all --kubeconfig ./kubeconfig + fi + + echo "web_url=${WEB_HOST}" >> $GITHUB_OUTPUT + + echo "Access the \`web\` endpoint at [\`${WEB_HOST}\`](http://${WEB_HOST})" >> $GITHUB_STEP_SUMMARY + + - name: Create or Update Comment with Deployment URL + uses: peter-evans/create-or-update-comment@v2 + with: + comment-id: ${{ steps.notification.outputs.comment-id }} + issue-number: ${{ github.event.pull_request.number }} + body: | + ## Uffizzi Ephemeral Environment - Virtual Cluster - E2E Helm Chart + + E2E tests in progress on the `pr-${{ github.event.pull_request.number }}-e2e-helm` cluster. + edit-mode: replace + + uffizzi-cluster-delete: + if: ${{ github.event_name == 'pull_request' && github.event.action == 'closed' }} + runs-on: ubuntu-latest + steps: + - name: Delete Virtual Cluster + uses: UffizziCloud/cluster-action@main + with: + action: delete + cluster-name: pr-${{ github.event.pull_request.number }}-e2e-helm + server: https://app.uffizzi.com + + # Identify comment to be updated + - name: Find comment for Ephemeral Environment + uses: peter-evans/find-comment@v2 + id: find-comment + with: + issue-number: ${{ github.event.pull_request.number }} + comment-author: "github-actions[bot]" + body-includes: pr-${{ github.event.pull_request.number }}-e2e-helm + direction: last + + - name: Update Comment with Deletion + uses: peter-evans/create-or-update-comment@v2 + with: + comment-id: ${{ steps.find-comment.outputs.comment-id }} + issue-number: ${{ github.event.pull_request.number }} + body: | + Uffizzi Cluster `pr-${{ github.event.pull_request.number }}` was deleted. + edit-mode: replace From 6b1ac269398ec3644ebed97b2a4c39bf04033a0d Mon Sep 17 00:00:00 2001 From: Vibhav Bobade Date: Tue, 31 Oct 2023 19:27:45 +0530 Subject: [PATCH 02/20] delete the newly created clusters --- .github/workflows/e2e.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 91311da..c7e511a 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -149,6 +149,15 @@ jobs: action: delete cluster-name: pr-${{ github.event.pull_request.number }}-e2e-helm server: https://app.uffizzi.com + kubeconfig-name: kubeconfig-1276 + + - name: Delete Virtual Cluster + uses: UffizziCloud/cluster-action@main + with: + action: delete + cluster-name: pr-${{ github.event.pull_request.number }}-e2e-helm + server: https://app.uffizzi.com + kubeconfig-name: kubeconfig-1282 # Identify comment to be updated - name: Find comment for Ephemeral Environment From 84a466cef6a33e0faff38c1f4c98556e3b4baa6f Mon Sep 17 00:00:00 2001 From: Vibhav Bobade Date: Tue, 31 Oct 2023 19:40:38 +0530 Subject: [PATCH 03/20] fix image location --- .github/workflows/e2e.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index c7e511a..67ae48f 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -39,7 +39,7 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - context: ./ + context: ./src cache-from: type=gha cache-to: type=gha,mode=max From 96ad9fd6b8602dec53aeae6e57168e93388e6d22 Mon Sep 17 00:00:00 2001 From: Vibhav Bobade Date: Tue, 31 Oct 2023 19:59:32 +0530 Subject: [PATCH 04/20] test From c91868af750f7cfdbc6004adb15cf6016be021ce Mon Sep 17 00:00:00 2001 From: Vibhav Bobade Date: Tue, 31 Oct 2023 20:02:54 +0530 Subject: [PATCH 05/20] pass correct paramters --- .github/workflows/e2e.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 67ae48f..379c2d4 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -89,7 +89,7 @@ jobs: cluster-name: pr-${{ github.event.pull_request.number }}-1276 server: https://app.uffizzi.com k8s-version: 1.27.6 - kubeconfig-name: kubeconfig-1276 + kubeconfig: kubeconfig-1276 - name: Create and connect to vcluster uses: UffizziCloud/cluster-action@k8s_version @@ -97,7 +97,7 @@ jobs: cluster-name: pr-${{ github.event.pull_request.number }}-1282 server: https://app.uffizzi.com k8s-version: 1.28.2 - kubeconfig-name: kubeconfig-1282 + kubeconfig: kubeconfig-1282 - name: Apply Kustomize to test the new image id: prev From 6161192bded919f8daa899bb11507c306257da13 Mon Sep 17 00:00:00 2001 From: Vibhav Bobade Date: Tue, 31 Oct 2023 20:07:43 +0530 Subject: [PATCH 06/20] test From 2a59e9f050966077d84ac1df58ca884ed253ab0a Mon Sep 17 00:00:00 2001 From: Vibhav Bobade Date: Tue, 31 Oct 2023 20:16:15 +0530 Subject: [PATCH 07/20] test From 6ea631f1179771a81003a27a78e96bdbf8141d75 Mon Sep 17 00:00:00 2001 From: Vibhav Bobade Date: Tue, 31 Oct 2023 20:16:58 +0530 Subject: [PATCH 08/20] test From e0bcb368521f99054704335dee1b51409adbeb39 Mon Sep 17 00:00:00 2001 From: Vibhav Bobade Date: Tue, 31 Oct 2023 20:17:14 +0530 Subject: [PATCH 09/20] test From 60f9c060825507f166521043cf9ce5ad997e2e77 Mon Sep 17 00:00:00 2001 From: Vibhav Bobade Date: Tue, 31 Oct 2023 20:31:23 +0530 Subject: [PATCH 10/20] pass the correct parameters --- .github/workflows/e2e.yaml | 50 +++++++++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 14 deletions(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 379c2d4..4ccb0f8 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -112,21 +112,25 @@ jobs: fi # Apply kustomized manifests to virtual cluster. - kubectl apply --kustomize . --kubeconfig ./kubeconfig + kubectl apply --kustomize . --kubeconfig ./kubeconfig-1276 + kubectl apply --kustomize . --kubeconfig ./kubeconfig-1282 # Allow uffizzi to sync the resources sleep 5 # Get the hostnames assigned by uffizzi - export WEB_HOST=$(kubectl get ingress web --kubeconfig kubeconfig -o json | jq '.spec.rules[0].host' | tr -d '"') + export WEB_HOST_1=$(kubectl get ingress web --kubeconfig ./kubeconfig-1276 -o json | jq '.spec.rules[0].host' | tr -d '"') + export WEB_HOST_2=$(kubectl get ingress web --kubeconfig ./kubeconfig-1282 -o json | jq '.spec.rules[0].host' | tr -d '"') if [[ ${RUNNER_DEBUG} == 1 ]]; then - kubectl get all --kubeconfig ./kubeconfig + kubectl get all --kubeconfig ./kubeconfig-1276 + kubectl get all --kubeconfig ./kubeconfig-1282 fi echo "web_url=${WEB_HOST}" >> $GITHUB_OUTPUT - echo "Access the \`web\` endpoint at [\`${WEB_HOST}\`](http://${WEB_HOST})" >> $GITHUB_STEP_SUMMARY + echo "Access the \`web\` endpoint deployed on k8s version 1.27.6 at [\`${WEB_HOST_1}\`](http://${WEB_HOST_1})" >> $GITHUB_STEP_SUMMARY + echo "Access the \`web\` endpoint deployed on k8s version 1.28.2 at [\`${WEB_HOST_2}\`](http://${WEB_HOST_2})" >> $GITHUB_STEP_SUMMARY - name: Create or Update Comment with Deployment URL uses: peter-evans/create-or-update-comment@v2 @@ -136,7 +140,8 @@ jobs: body: | ## Uffizzi Ephemeral Environment - Virtual Cluster - E2E Helm Chart - E2E tests in progress on the `pr-${{ github.event.pull_request.number }}-e2e-helm` cluster. + E2E tests in progress on the `pr-${{ github.event.pull_request.number }}-1276` and + `pr-${{ github.event.pull_request.number }}-1282` virtual clusters. edit-mode: replace uffizzi-cluster-delete: @@ -147,33 +152,50 @@ jobs: uses: UffizziCloud/cluster-action@main with: action: delete - cluster-name: pr-${{ github.event.pull_request.number }}-e2e-helm + cluster-name: pr-${{ github.event.pull_request.number }}-1276 server: https://app.uffizzi.com - kubeconfig-name: kubeconfig-1276 - name: Delete Virtual Cluster uses: UffizziCloud/cluster-action@main with: action: delete - cluster-name: pr-${{ github.event.pull_request.number }}-e2e-helm + cluster-name: pr-${{ github.event.pull_request.number }}-1282 server: https://app.uffizzi.com - kubeconfig-name: kubeconfig-1282 # Identify comment to be updated - - name: Find comment for Ephemeral Environment + - name: Find comment for Ephemeral Environment 1 uses: peter-evans/find-comment@v2 - id: find-comment + id: find-comment-1 with: issue-number: ${{ github.event.pull_request.number }} comment-author: "github-actions[bot]" - body-includes: pr-${{ github.event.pull_request.number }}-e2e-helm + body-includes: pr-${{ github.event.pull_request.number }}-1276 + direction: last + + # Identify comment to be updated + - name: Find comment for Ephemeral Environment 2 + uses: peter-evans/find-comment@v2 + id: find-comment-2 + with: + issue-number: ${{ github.event.pull_request.number }} + comment-author: "github-actions[bot]" + body-includes: pr-${{ github.event.pull_request.number }}-1282 direction: last - name: Update Comment with Deletion uses: peter-evans/create-or-update-comment@v2 with: - comment-id: ${{ steps.find-comment.outputs.comment-id }} + comment-id: ${{ steps.find-comment-1.outputs.comment-id }} + issue-number: ${{ github.event.pull_request.number }} + body: | + Uffizzi Cluster `pr-${{ github.event.pull_request.number }}-1276` was deleted. + edit-mode: replace + + - name: Update Comment with Deletion + uses: peter-evans/create-or-update-comment@v2 + with: + comment-id: ${{ steps.find-comment-2.outputs.comment-id }} issue-number: ${{ github.event.pull_request.number }} body: | - Uffizzi Cluster `pr-${{ github.event.pull_request.number }}` was deleted. + Uffizzi Cluster `pr-${{ github.event.pull_request.number }}-1282` was deleted. edit-mode: replace From 2444b78efe9d4c9b3970d646f583ebf797259e56 Mon Sep 17 00:00:00 2001 From: Vibhav Bobade Date: Tue, 31 Oct 2023 20:39:20 +0530 Subject: [PATCH 11/20] test From 1f1d27e6024585ab87e57fc4d4f2cfc1606de650 Mon Sep 17 00:00:00 2001 From: Vibhav Bobade Date: Tue, 31 Oct 2023 20:55:14 +0530 Subject: [PATCH 12/20] try to make this shit work --- .github/k8s/deployment.yaml | 18 ++++++++++++++++++ .github/k8s/ingress.yaml | 20 ++++++++++++++++++++ .github/k8s/kustomization.yaml | 6 ++++++ .github/k8s/service.yaml | 10 ++++++++++ .github/workflows/e2e.yaml | 7 +------ 5 files changed, 55 insertions(+), 6 deletions(-) create mode 100644 .github/k8s/deployment.yaml create mode 100644 .github/k8s/ingress.yaml create mode 100644 .github/k8s/kustomization.yaml create mode 100644 .github/k8s/service.yaml diff --git a/.github/k8s/deployment.yaml b/.github/k8s/deployment.yaml new file mode 100644 index 0000000..d451510 --- /dev/null +++ b/.github/k8s/deployment.yaml @@ -0,0 +1,18 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: web +spec: + selector: + matchLabels: + app: web + template: + metadata: + labels: + app: web + spec: + containers: + - name: web + image: registry.uffizzi.com/quickstart + ports: + - containerPort: 8080 diff --git a/.github/k8s/ingress.yaml b/.github/k8s/ingress.yaml new file mode 100644 index 0000000..5d8bab3 --- /dev/null +++ b/.github/k8s/ingress.yaml @@ -0,0 +1,20 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: web +spec: + ingressClassName: uffizzi + rules: + - host: web.example.com + http: + paths: + - backend: + service: + name: web + port: + number: 8080 + path: / + pathType: Prefix + tls: + - hosts: + - web.example.com diff --git a/.github/k8s/kustomization.yaml b/.github/k8s/kustomization.yaml new file mode 100644 index 0000000..f77144d --- /dev/null +++ b/.github/k8s/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - deployment.yaml + - ingress.yaml + - service.yaml \ No newline at end of file diff --git a/.github/k8s/service.yaml b/.github/k8s/service.yaml new file mode 100644 index 0000000..12d5c21 --- /dev/null +++ b/.github/k8s/service.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: Service +metadata: + name: web +spec: + ports: + - port: 8080 + type: ClusterIP + selector: + app: web diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 4ccb0f8..8eb2ab6 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -102,15 +102,10 @@ jobs: - name: Apply Kustomize to test the new image id: prev run: | + cd .github/k8s # Change the image name to those just built and pushed. kustomize edit set image uffizzi/hello-world-k8s=${{ needs.build-image.outputs.tags }} - if [[ ${RUNNER_DEBUG} == 1 ]]; then - cat kustomization.yaml - echo "`pwd`" - echo "`ls`" - fi - # Apply kustomized manifests to virtual cluster. kubectl apply --kustomize . --kubeconfig ./kubeconfig-1276 kubectl apply --kustomize . --kubeconfig ./kubeconfig-1282 From eb2dcc8707de770e2f6b16ac63b5c05025f1fd95 Mon Sep 17 00:00:00 2001 From: Vibhav Bobade Date: Tue, 31 Oct 2023 20:59:53 +0530 Subject: [PATCH 13/20] try diffrent referencing --- .github/workflows/e2e.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 8eb2ab6..20ad8ca 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -102,13 +102,12 @@ jobs: - name: Apply Kustomize to test the new image id: prev run: | - cd .github/k8s # Change the image name to those just built and pushed. kustomize edit set image uffizzi/hello-world-k8s=${{ needs.build-image.outputs.tags }} # Apply kustomized manifests to virtual cluster. - kubectl apply --kustomize . --kubeconfig ./kubeconfig-1276 - kubectl apply --kustomize . --kubeconfig ./kubeconfig-1282 + kubectl apply --kustomize .github/k8s --kubeconfig ./kubeconfig-1276 + kubectl apply --kustomize .github/k8s --kubeconfig ./kubeconfig-1282 # Allow uffizzi to sync the resources sleep 5 @@ -122,7 +121,8 @@ jobs: kubectl get all --kubeconfig ./kubeconfig-1282 fi - echo "web_url=${WEB_HOST}" >> $GITHUB_OUTPUT + echo "web_url_1=${WEB_HOST_1}" >> $GITHUB_OUTPUT + echo "web_url_2=${WEB_HOST_2}" >> $GITHUB_OUTPUT echo "Access the \`web\` endpoint deployed on k8s version 1.27.6 at [\`${WEB_HOST_1}\`](http://${WEB_HOST_1})" >> $GITHUB_STEP_SUMMARY echo "Access the \`web\` endpoint deployed on k8s version 1.28.2 at [\`${WEB_HOST_2}\`](http://${WEB_HOST_2})" >> $GITHUB_STEP_SUMMARY From 9c8e2c062c650c2e5093d2e60e3298222d702772 Mon Sep 17 00:00:00 2001 From: Vibhav Bobade Date: Tue, 31 Oct 2023 21:09:22 +0530 Subject: [PATCH 14/20] make kustomize work --- .github/workflows/e2e.yaml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 20ad8ca..c7d0ec4 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -104,11 +104,14 @@ jobs: run: | # Change the image name to those just built and pushed. kustomize edit set image uffizzi/hello-world-k8s=${{ needs.build-image.outputs.tags }} - + + cp ./kubeconfig-1276 ./kubeconfig-1282 ./github/k8s # Apply kustomized manifests to virtual cluster. - kubectl apply --kustomize .github/k8s --kubeconfig ./kubeconfig-1276 - kubectl apply --kustomize .github/k8s --kubeconfig ./kubeconfig-1282 - + ( + cd ./github/k8s + kubectl apply --kustomize . --kubeconfig ./kubeconfig-1276 + kubectl apply --kustomize . --kubeconfig ./kubeconfig-1282 + ) # Allow uffizzi to sync the resources sleep 5 From 8b8ef243adc284131f153985c62cd413f26b0523 Mon Sep 17 00:00:00 2001 From: Vibhav Bobade Date: Tue, 31 Oct 2023 22:22:59 +0530 Subject: [PATCH 15/20] improvement: change directory early --- .github/workflows/e2e.yaml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index c7d0ec4..0e57da9 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -102,13 +102,14 @@ jobs: - name: Apply Kustomize to test the new image id: prev run: | - # Change the image name to those just built and pushed. - kustomize edit set image uffizzi/hello-world-k8s=${{ needs.build-image.outputs.tags }} - - cp ./kubeconfig-1276 ./kubeconfig-1282 ./github/k8s - # Apply kustomized manifests to virtual cluster. ( cd ./github/k8s + + # Change the image name to those just built and pushed. + kustomize edit set image uffizzi/hello-world-k8s=${{ needs.build-image.outputs.tags }} + + cp ./kubeconfig-1276 ./kubeconfig-1282 ./github/k8s + # Apply kustomized manifests to virtual cluster. kubectl apply --kustomize . --kubeconfig ./kubeconfig-1276 kubectl apply --kustomize . --kubeconfig ./kubeconfig-1282 ) From ce6823065697ce1219df1ed6eb462871aae538db Mon Sep 17 00:00:00 2001 From: Vibhav Bobade Date: Tue, 31 Oct 2023 22:30:15 +0530 Subject: [PATCH 16/20] add debug --- .github/workflows/e2e.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 0e57da9..d6f783e 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -102,6 +102,10 @@ jobs: - name: Apply Kustomize to test the new image id: prev run: | + if [[ ${RUNNER_DEBUG} == 1 ]]; then + pwd + ls -la + fi ( cd ./github/k8s From 8712698267a124566c99c5e7d32c1a7beb3387fc Mon Sep 17 00:00:00 2001 From: Vibhav Bobade Date: Tue, 31 Oct 2023 22:37:11 +0530 Subject: [PATCH 17/20] correct location for .github --- .github/workflows/e2e.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index d6f783e..a346d2e 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -107,7 +107,7 @@ jobs: ls -la fi ( - cd ./github/k8s + cd .github/k8s # Change the image name to those just built and pushed. kustomize edit set image uffizzi/hello-world-k8s=${{ needs.build-image.outputs.tags }} From 440ce4cc0afbd967413e7cbe50191b3b40622ca1 Mon Sep 17 00:00:00 2001 From: Vibhav Bobade Date: Tue, 31 Oct 2023 23:00:02 +0530 Subject: [PATCH 18/20] fix location --- .github/workflows/e2e.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index a346d2e..ffbc2a1 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -112,7 +112,7 @@ jobs: # Change the image name to those just built and pushed. kustomize edit set image uffizzi/hello-world-k8s=${{ needs.build-image.outputs.tags }} - cp ./kubeconfig-1276 ./kubeconfig-1282 ./github/k8s + cp ./kubeconfig-1276 ./kubeconfig-1282 .github/k8s # Apply kustomized manifests to virtual cluster. kubectl apply --kustomize . --kubeconfig ./kubeconfig-1276 kubectl apply --kustomize . --kubeconfig ./kubeconfig-1282 From e95168394122250c8986a35d4de92e5dd5936aa7 Mon Sep 17 00:00:00 2001 From: Vibhav Bobade Date: Tue, 31 Oct 2023 23:26:34 +0530 Subject: [PATCH 19/20] place copy command in the right place --- .github/workflows/e2e.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index ffbc2a1..41f275b 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -107,12 +107,12 @@ jobs: ls -la fi ( + cp ./kubeconfig-1276 ./kubeconfig-1282 ./.github/k8s cd .github/k8s - # Change the image name to those just built and pushed. kustomize edit set image uffizzi/hello-world-k8s=${{ needs.build-image.outputs.tags }} - cp ./kubeconfig-1276 ./kubeconfig-1282 .github/k8s + # Apply kustomized manifests to virtual cluster. kubectl apply --kustomize . --kubeconfig ./kubeconfig-1276 kubectl apply --kustomize . --kubeconfig ./kubeconfig-1282 From 278d282242831f67357d8ec928ffdf39e2a277d6 Mon Sep 17 00:00:00 2001 From: Vibhav Bobade Date: Mon, 6 Nov 2023 01:30:27 +0530 Subject: [PATCH 20/20] major k8s versions only --- .github/workflows/e2e.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 41f275b..7389608 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -88,7 +88,7 @@ jobs: with: cluster-name: pr-${{ github.event.pull_request.number }}-1276 server: https://app.uffizzi.com - k8s-version: 1.27.6 + k8s-version: 1.27 kubeconfig: kubeconfig-1276 - name: Create and connect to vcluster @@ -96,7 +96,7 @@ jobs: with: cluster-name: pr-${{ github.event.pull_request.number }}-1282 server: https://app.uffizzi.com - k8s-version: 1.28.2 + k8s-version: 1.28 kubeconfig: kubeconfig-1282 - name: Apply Kustomize to test the new image