From 16f65ce7d3be98a18ef0e21601ee86d1fb9fef1c Mon Sep 17 00:00:00 2001 From: David Gamero Date: Tue, 17 Dec 2024 17:36:09 -0500 Subject: [PATCH] missing space rippp --- .github/workflows/integration-linux.yml | 5320 ++++++++++++++++- .../workflows/integration-per-language.yml | 2 +- .github/workflows/integration-windows.yml | 124 +- test/integration/go/helm.yaml | 2 +- test/integration/go/kustomize.yaml | 2 +- test/integration/go/manifest.yaml | 2 +- test/integration/swift/helm.yaml | 4 - test/integration/swift/kustomize.yaml | 4 - test/integration/swift/manifest.yaml | 4 - 9 files changed, 5370 insertions(+), 94 deletions(-) diff --git a/.github/workflows/integration-linux.yml b/.github/workflows/integration-linux.yml index ab52df70..16a968c5 100644 --- a/.github/workflows/integration-linux.yml +++ b/.github/workflows/integration-linux.yml @@ -2,15 +2,15 @@ name: draft Linux Integrations on: pull_request: - branches: [main, staging] + branches: [ main, staging ] workflow_dispatch: jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - name: Set up Go - uses: actions/setup-go@v5 + uses: actions/setup-go@v4 with: go-version: 1.22 - name: make @@ -25,16 +25,5304 @@ jobs: name: draft-binary path: ./draft if-no-files-found: error - language-integration-test: - needs: build - strategy: - matrix: - language: ["gomodule"] - repo: ["davidgamero/go_echo"] - include: - - language: "go" - repo: "davidgamero/go-echo-no-mod" - uses: ./.github/workflows/integration-per-language.yml - with: - language: ${{ matrix.language }} - repo: ${{ matrix.repo }} + + gomodule-helm-dry-run: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: gambtho/go_echo + path: ./langtest + - name: Execute Dry Run with config file + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -c ./test/integration/gomodule/helm.yaml -d ./langtest/ --skip-file-detection + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + - name: Execute Dry Run with variables passed through flag + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -d ./langtest/ -l gomodule --skip-file-detection --deploy-type helm --variable PORT=8080 --variable APPNAME=testingCreateCommand --variable VERSION=1.11 --variable BUILDERVERSION=1.11 --variable SERVICEPORT=8080 --variable NAMESPACE=testNamespace --variable IMAGENAME=testImage --variable IMAGETAG=latest + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + gomodule-helm-create-update: + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5001:5000 + needs: gomodule-helm-dry-run + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: gambtho/go_echo + path: ./langtest + - run: rm -rf ./langtest/manifests && rm -f ./langtest/Dockerfile ./langtest/.dockerignore + - run: ./draft -v create -c ./test/integration/gomodule/helm.yaml -d ./langtest/ + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + with: + insecure-registry: 'host.minikube.internal:5001,10.0.0.0/24' + # Runs Helm to create manifest files + - name: Bake deployment + uses: azure/k8s-bake@v2.2 + with: + renderEngine: 'helm' + helmChart: ./langtest/charts + overrideFiles: ./langtest/charts/values.yaml + overrides: | + replicas:2 + helm-version: 'latest' + releaseName: 'test-release' + id: bake + - name: Build and Push image + continue-on-error: true + run: | + export SHELL=/bin/bash + eval $(minikube -p minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + docker tag testapp host.minikube.internal:5001/testapp + echo -n "verifying images:" + docker images + docker push host.minikube.internal:5001/testapp + echo 'Curling host.minikube.internal test app images from minikube' + minikube ssh "curl http://host.minikube.internal:5001/v2/testapp/tags/list" + # Deploys application based on manifest files from previous step + - name: Deploy application + uses: Azure/k8s-deploy@v4.0 + continue-on-error: true + id: deploy + with: + action: deploy + manifests: ${{ steps.bake.outputs.manifestsBundle }} + images: | + host.minikube.internal:5001/testapp + - name: Wait for rollout + continue-on-error: true + id: rollout + run: | + kubectl rollout status deployment/test-release-testapp --timeout=2m + - name: Print K8s Objects + run: | + kubectl get po -o json + kubectl get svc -o json + kubectl get deploy -o json + - name: Curl Endpoint + run: | + kubectl get svc + echo 'Starting minikube tunnel' + minikube tunnel > /dev/null 2>&1 & tunnelPID=$! + sleep 120 + kubectl get svc + SERVICEIP=$(kubectl get svc -o jsonpath={'.items[1].status.loadBalancer.ingress[0].ip'}) + echo "SERVICEIP: $SERVICEIP" + echo 'Curling service IP' + curl -m 3 $SERVICEIP:80 + kill $tunnelPID + - run: | + ./draft -v generate-workflow -d ./langtest/ --deploy-type helm --variable WORKFLOWNAME=someWorkflow --variable BRANCHNAME=main --variable ACRRESOURCEGROUP=someAcrResourceGroup --variable AZURECONTAINERREGISTRY=someRegistry --variable CONTAINERNAME=someContainer --variable CLUSTERRESOURCEGROUP=someClusterResourceGroup --variable CLUSTERNAME=someAksCluster --variable DOCKERFILE=./Dockerfile --variable BUILDCONTEXTPATH=. --variable NAMESPACE=default + pwd + # Validate generated workflow yaml + - name: Install action-validator with asdf + uses: asdf-vm/actions/install@v1 + with: + tool_versions: | + action-validator 0.1.2 + - name: Lint Actions + run: | + find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) | xargs -I {} action-validator --verbose {} + - name: Execute dry run for update command + run: | + mkdir -p test/temp + pwd + ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/update_dry_run_schema.json -d test/temp/update_dry_run.json + - run: ./draft -v update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Check default namespace + if: steps.deploy.outcome != 'success' + run: kubectl get po + - name: Fail if any error + if: steps.deploy.outcome != 'success' + run: exit 6 + + gomodule-kustomize-dry-run: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: gambtho/go_echo + path: ./langtest + - name: Execute Dry Run with config file + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -c ./test/integration/gomodule/kustomize.yaml -d ./langtest/ --skip-file-detection + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + - name: Execute Dry Run with variables passed through flag + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -d ./langtest/ -l gomodule --skip-file-detection --deploy-type kustomize --variable PORT=8080 --variable APPNAME=testingCreateCommand --variable VERSION=1.11 --variable BUILDERVERSION=1.11 --variable SERVICEPORT=8080 --variable NAMESPACE=testNamespace --variable IMAGENAME=testImage --variable IMAGETAG=latest + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + gomodule-kustomize-create-update: + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5001:5000 + needs: gomodule-kustomize-dry-run + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: gambtho/go_echo + path: ./langtest + - run: rm -rf ./langtest/manifests && rm -f ./langtest/Dockerfile ./langtest/.dockerignore + - run: ./draft -v create -c ./test/integration/gomodule/kustomize.yaml -d ./langtest/ + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + with: + insecure-registry: 'host.minikube.internal:5001,10.0.0.0/24' + - name: Bake deployment + uses: azure/k8s-bake@v2.4 + id: bake + with: + renderEngine: 'kustomize' + kustomizationPath: ./langtest/base + kubectl-version: 'latest' + - name: Build and Push Image + continue-on-error: true + run: | + eval $(minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + docker tag testapp host.minikube.internal:5001/testapp + echo -n "verifying images:" + docker images + docker push host.minikube.internal:5001/testapp + echo 'Curling host.minikube.internal test app images from minikube' + minikube ssh "curl http://host.minikube.internal:5001/v2/testapp/tags/list" + # Deploys application based on manifest files from previous step + - name: Deploy application + uses: Azure/k8s-deploy@v4.0 + continue-on-error: true + id: deploy + with: + action: deploy + manifests: ${{ steps.bake.outputs.manifestsBundle }} + images: | + host.minikube.internal:5001/testapp + - name: Wait for rollout + continue-on-error: true + id: rollout + run: | + kubectl rollout status deployment/testapp --timeout=2m + - name: Print K8s Objects + run: | + kubectl get po -o json + kubectl get svc -o json + kubectl get deploy -o json + - name: Curl Endpoint + run: | + kubectl get svc + echo 'Starting minikube tunnel' + minikube tunnel > /dev/null 2>&1 & tunnelPID=$! + sleep 120 + kubectl get svc + SERVICEIP=$(kubectl get svc -o jsonpath={'.items[1].status.loadBalancer.ingress[0].ip'}) + echo "SERVICEIP: $SERVICEIP" + echo 'Curling service IP' + curl -m 3 $SERVICEIP:80 + kill $tunnelPID + - run: ./draft -v generate-workflow -d ./langtest/ --deploy-type kustomize --variable WORKFLOWNAME=someWorkflow --variable BRANCHNAME=main --variable ACRRESOURCEGROUP=someAcrResourceGroup --variable AZURECONTAINERREGISTRY=someRegistry --variable CONTAINERNAME=someContainer --variable CLUSTERRESOURCEGROUP=someClusterResourceGroup --variable CLUSTERNAME=someAksCluster --variable DOCKERFILE=./Dockerfile --variable BUILDCONTEXTPATH=. --variable NAMESPACE=default + # Validate generated workflow yaml + - name: Install action-validator with asdf + uses: asdf-vm/actions/install@v1 + with: + tool_versions: | + action-validator 0.1.2 + - name: Lint Actions + run: | + find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) | xargs -I {} action-validator --verbose {} + - name: Execute dry run for update command + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/update_dry_run_schema.json -d test/temp/update_dry_run.json + - run: ./draft -v update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Check default namespace + if: steps.deploy.outcome != 'success' + run: kubectl get po + - name: Fail if any error + if: steps.deploy.outcome != 'success' + run: exit 6 + + gomodule-manifest-dry-run: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: gambtho/go_echo + path: ./langtest + - name: Execute Dry Run with config file + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -c ./test/integration/gomodule/manifest.yaml -d ./langtest/ --skip-file-detection + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + - name: Execute Dry Run with variables passed through flag + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -d ./langtest/ -l gomodule --skip-file-detection --deploy-type manifests --variable PORT=8080 --variable APPNAME=testingCreateCommand --variable VERSION=1.11 --variable BUILDERVERSION=1.11 --variable SERVICEPORT=8080 --variable NAMESPACE=testNamespace --variable IMAGENAME=testImage --variable IMAGETAG=latest + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + gomodule-manifests-create: + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5001:5000 + needs: gomodule-manifest-dry-run + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: gambtho/go_echo + path: ./langtest + - run: rm -rf ./langtest/manifests && rm -f ./langtest/Dockerfile ./langtest/.dockerignore + - run: ./draft -v create -c ./test/integration/gomodule/manifest.yaml -d ./langtest/ + - name: print manifests + run: cat ./langtest/manifests/* + - name: Add docker.local host to /etc/hosts + run: | + sudo echo "127.0.0.1 docker.local" | sudo tee -a /etc/hosts + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + with: + insecure-registry: 'host.minikube.internal:5001,10.0.0.0/24' + - name: Build and Push Image + continue-on-error: true + run: | + eval $(minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + docker tag testapp host.minikube.internal:5001/testapp + echo -n "verifying images:" + docker images + docker push host.minikube.internal:5001/testapp + echo 'Curling host.minikube.internal test app images from minikube' + minikube ssh "curl http://host.minikube.internal:5001/v2/testapp/tags/list" + # Deploys application based on manifest files from previous step + - name: Deploy application + run: kubectl apply -f ./langtest/manifests/ + continue-on-error: true + id: deploy + - name: Wait for rollout + continue-on-error: true + id: rollout + run: | + kubectl rollout status deployment/testapp --timeout=2m + - name: Print K8s Objects + run: | + kubectl get po -o json + kubectl get svc -o json + kubectl get deploy -o json + - name: Curl Endpoint + run: | + kubectl get svc + echo 'Starting minikube tunnel' + minikube tunnel > /dev/null 2>&1 & tunnelPID=$! + sleep 120 + kubectl get svc + SERVICEIP=$(kubectl get svc -o jsonpath={'.items[1].status.loadBalancer.ingress[0].ip'}) + echo "SERVICEIP: $SERVICEIP" + echo 'Curling service IP' + curl -m 3 $SERVICEIP:80 + kill $tunnelPID + - run: ./draft -v generate-workflow -d ./langtest/ --deploy-type manifests --variable WORKFLOWNAME=someWorkflow --variable BRANCHNAME=main --variable ACRRESOURCEGROUP=someAcrResourceGroup --variable AZURECONTAINERREGISTRY=someRegistry --variable CONTAINERNAME=someContainer --variable CLUSTERRESOURCEGROUP=someClusterResourceGroup --variable CLUSTERNAME=someAksCluster --variable DOCKERFILE=./Dockerfile --variable BUILDCONTEXTPATH=. --variable NAMESPACE=default + # Validate generated workflow yaml + - name: Install action-validator with asdf + uses: asdf-vm/actions/install@v1 + with: + tool_versions: | + action-validator 0.1.2 + - name: Lint Actions + run: | + find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) | xargs -I {} action-validator --verbose {} + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + with: + name: gomodule-manifests-create + path: | + ./langtest + !./langtest/**/.git/* + - name: Fail if any error + if: steps.deploy.outcome != 'success' || steps.rollout.outcome != 'success' + run: exit 6 + gomodule-manifest-update: + needs: gomodule-manifests-create + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5000:5000 + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: gomodule-manifests-create + path: ./langtest/ + - name: Execute dry run for update command + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/update_dry_run_schema.json -d test/temp/update_dry_run.json + - run: ./draft -v update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + - name: Build image + run: | + export SHELL=/bin/bash + eval $(minikube -p minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + echo -n verifying images: + docker images + # Deploys application based on manifest files from previous step + - name: Deploy application + run: kubectl apply -f ./langtest/manifests/ + continue-on-error: true + id: deploy + - name: Check default namespace + if: steps.deploy.outcome != 'success' + run: kubectl get po + - name: Fail if any error + if: steps.deploy.outcome != 'success' + run: exit 6 + + go-helm-dry-run: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: davidgamero/go-echo-no-mod + path: ./langtest + - name: Execute Dry Run with config file + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -c ./test/integration/go/helm.yaml -d ./langtest/ --skip-file-detection + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + - name: Execute Dry Run with variables passed through flag + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -d ./langtest/ -l go --skip-file-detection --deploy-type helm --variable PORT=8080 --variable APPNAME=testingCreateCommand --variable VERSION=1.11 --variable BUILDERVERSION=1.11 --variable SERVICEPORT=8080 --variable NAMESPACE=testNamespace --variable IMAGENAME=testImage --variable IMAGETAG=latest + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + go-helm-create-update: + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5001:5000 + needs: go-helm-dry-run + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: davidgamero/go-echo-no-mod + path: ./langtest + - run: rm -rf ./langtest/manifests && rm -f ./langtest/Dockerfile ./langtest/.dockerignore + - run: ./draft -v create -c ./test/integration/go/helm.yaml -d ./langtest/ + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + with: + insecure-registry: 'host.minikube.internal:5001,10.0.0.0/24' + # Runs Helm to create manifest files + - name: Bake deployment + uses: azure/k8s-bake@v2.2 + with: + renderEngine: 'helm' + helmChart: ./langtest/charts + overrideFiles: ./langtest/charts/values.yaml + overrides: | + replicas:2 + helm-version: 'latest' + releaseName: 'test-release' + id: bake + - name: Build and Push image + continue-on-error: true + run: | + export SHELL=/bin/bash + eval $(minikube -p minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + docker tag testapp host.minikube.internal:5001/testapp + echo -n "verifying images:" + docker images + docker push host.minikube.internal:5001/testapp + echo 'Curling host.minikube.internal test app images from minikube' + minikube ssh "curl http://host.minikube.internal:5001/v2/testapp/tags/list" + # Deploys application based on manifest files from previous step + - name: Deploy application + uses: Azure/k8s-deploy@v4.0 + continue-on-error: true + id: deploy + with: + action: deploy + manifests: ${{ steps.bake.outputs.manifestsBundle }} + images: | + host.minikube.internal:5001/testapp + - name: Wait for rollout + continue-on-error: true + id: rollout + run: | + kubectl rollout status deployment/test-release-testapp --timeout=2m + - name: Print K8s Objects + run: | + kubectl get po -o json + kubectl get svc -o json + kubectl get deploy -o json + - name: Curl Endpoint + run: | + kubectl get svc + echo 'Starting minikube tunnel' + minikube tunnel > /dev/null 2>&1 & tunnelPID=$! + sleep 120 + kubectl get svc + SERVICEIP=$(kubectl get svc -o jsonpath={'.items[1].status.loadBalancer.ingress[0].ip'}) + echo "SERVICEIP: $SERVICEIP" + echo 'Curling service IP' + curl -m 3 $SERVICEIP:8080 + kill $tunnelPID + - run: | + ./draft -v generate-workflow -d ./langtest/ --deploy-type helm --variable WORKFLOWNAME=someWorkflow --variable BRANCHNAME=main --variable ACRRESOURCEGROUP=someAcrResourceGroup --variable AZURECONTAINERREGISTRY=someRegistry --variable CONTAINERNAME=someContainer --variable CLUSTERRESOURCEGROUP=someClusterResourceGroup --variable CLUSTERNAME=someAksCluster --variable DOCKERFILE=./Dockerfile --variable BUILDCONTEXTPATH=. --variable NAMESPACE=default + pwd + # Validate generated workflow yaml + - name: Install action-validator with asdf + uses: asdf-vm/actions/install@v1 + with: + tool_versions: | + action-validator 0.1.2 + - name: Lint Actions + run: | + find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) | xargs -I {} action-validator --verbose {} + - name: Execute dry run for update command + run: | + mkdir -p test/temp + pwd + ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/update_dry_run_schema.json -d test/temp/update_dry_run.json + - run: ./draft -v update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Check default namespace + if: steps.deploy.outcome != 'success' + run: kubectl get po + - name: Fail if any error + if: steps.deploy.outcome != 'success' + run: exit 6 + + go-kustomize-dry-run: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: davidgamero/go-echo-no-mod + path: ./langtest + - name: Execute Dry Run with config file + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -c ./test/integration/go/kustomize.yaml -d ./langtest/ --skip-file-detection + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + - name: Execute Dry Run with variables passed through flag + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -d ./langtest/ -l go --skip-file-detection --deploy-type kustomize --variable PORT=8080 --variable APPNAME=testingCreateCommand --variable VERSION=1.11 --variable BUILDERVERSION=1.11 --variable SERVICEPORT=8080 --variable NAMESPACE=testNamespace --variable IMAGENAME=testImage --variable IMAGETAG=latest + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + go-kustomize-create-update: + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5001:5000 + needs: go-kustomize-dry-run + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: davidgamero/go-echo-no-mod + path: ./langtest + - run: rm -rf ./langtest/manifests && rm -f ./langtest/Dockerfile ./langtest/.dockerignore + - run: ./draft -v create -c ./test/integration/go/kustomize.yaml -d ./langtest/ + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + with: + insecure-registry: 'host.minikube.internal:5001,10.0.0.0/24' + - name: Bake deployment + uses: azure/k8s-bake@v2.4 + id: bake + with: + renderEngine: 'kustomize' + kustomizationPath: ./langtest/base + kubectl-version: 'latest' + - name: Build and Push Image + continue-on-error: true + run: | + eval $(minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + docker tag testapp host.minikube.internal:5001/testapp + echo -n "verifying images:" + docker images + docker push host.minikube.internal:5001/testapp + echo 'Curling host.minikube.internal test app images from minikube' + minikube ssh "curl http://host.minikube.internal:5001/v2/testapp/tags/list" + # Deploys application based on manifest files from previous step + - name: Deploy application + uses: Azure/k8s-deploy@v4.0 + continue-on-error: true + id: deploy + with: + action: deploy + manifests: ${{ steps.bake.outputs.manifestsBundle }} + images: | + host.minikube.internal:5001/testapp + - name: Wait for rollout + continue-on-error: true + id: rollout + run: | + kubectl rollout status deployment/testapp --timeout=2m + - name: Print K8s Objects + run: | + kubectl get po -o json + kubectl get svc -o json + kubectl get deploy -o json + - name: Curl Endpoint + run: | + kubectl get svc + echo 'Starting minikube tunnel' + minikube tunnel > /dev/null 2>&1 & tunnelPID=$! + sleep 120 + kubectl get svc + SERVICEIP=$(kubectl get svc -o jsonpath={'.items[1].status.loadBalancer.ingress[0].ip'}) + echo "SERVICEIP: $SERVICEIP" + echo 'Curling service IP' + curl -m 3 $SERVICEIP:8080 + kill $tunnelPID + - run: ./draft -v generate-workflow -d ./langtest/ --deploy-type kustomize --variable WORKFLOWNAME=someWorkflow --variable BRANCHNAME=main --variable ACRRESOURCEGROUP=someAcrResourceGroup --variable AZURECONTAINERREGISTRY=someRegistry --variable CONTAINERNAME=someContainer --variable CLUSTERRESOURCEGROUP=someClusterResourceGroup --variable CLUSTERNAME=someAksCluster --variable DOCKERFILE=./Dockerfile --variable BUILDCONTEXTPATH=. --variable NAMESPACE=default + # Validate generated workflow yaml + - name: Install action-validator with asdf + uses: asdf-vm/actions/install@v1 + with: + tool_versions: | + action-validator 0.1.2 + - name: Lint Actions + run: | + find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) | xargs -I {} action-validator --verbose {} + - name: Execute dry run for update command + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/update_dry_run_schema.json -d test/temp/update_dry_run.json + - run: ./draft -v update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Check default namespace + if: steps.deploy.outcome != 'success' + run: kubectl get po + - name: Fail if any error + if: steps.deploy.outcome != 'success' + run: exit 6 + + go-manifest-dry-run: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: davidgamero/go-echo-no-mod + path: ./langtest + - name: Execute Dry Run with config file + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -c ./test/integration/go/manifest.yaml -d ./langtest/ --skip-file-detection + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + - name: Execute Dry Run with variables passed through flag + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -d ./langtest/ -l go --skip-file-detection --deploy-type manifests --variable PORT=8080 --variable APPNAME=testingCreateCommand --variable VERSION=1.11 --variable BUILDERVERSION=1.11 --variable SERVICEPORT=8080 --variable NAMESPACE=testNamespace --variable IMAGENAME=testImage --variable IMAGETAG=latest + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + go-manifests-create: + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5001:5000 + needs: go-manifest-dry-run + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: davidgamero/go-echo-no-mod + path: ./langtest + - run: rm -rf ./langtest/manifests && rm -f ./langtest/Dockerfile ./langtest/.dockerignore + - run: ./draft -v create -c ./test/integration/go/manifest.yaml -d ./langtest/ + - name: print manifests + run: cat ./langtest/manifests/* + - name: Add docker.local host to /etc/hosts + run: | + sudo echo "127.0.0.1 docker.local" | sudo tee -a /etc/hosts + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + with: + insecure-registry: 'host.minikube.internal:5001,10.0.0.0/24' + - name: Build and Push Image + continue-on-error: true + run: | + eval $(minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + docker tag testapp host.minikube.internal:5001/testapp + echo -n "verifying images:" + docker images + docker push host.minikube.internal:5001/testapp + echo 'Curling host.minikube.internal test app images from minikube' + minikube ssh "curl http://host.minikube.internal:5001/v2/testapp/tags/list" + # Deploys application based on manifest files from previous step + - name: Deploy application + run: kubectl apply -f ./langtest/manifests/ + continue-on-error: true + id: deploy + - name: Wait for rollout + continue-on-error: true + id: rollout + run: | + kubectl rollout status deployment/testapp --timeout=2m + - name: Print K8s Objects + run: | + kubectl get po -o json + kubectl get svc -o json + kubectl get deploy -o json + - name: Curl Endpoint + run: | + kubectl get svc + echo 'Starting minikube tunnel' + minikube tunnel > /dev/null 2>&1 & tunnelPID=$! + sleep 120 + kubectl get svc + SERVICEIP=$(kubectl get svc -o jsonpath={'.items[1].status.loadBalancer.ingress[0].ip'}) + echo "SERVICEIP: $SERVICEIP" + echo 'Curling service IP' + curl -m 3 $SERVICEIP:8080 + kill $tunnelPID + - run: ./draft -v generate-workflow -d ./langtest/ --deploy-type manifests --variable WORKFLOWNAME=someWorkflow --variable BRANCHNAME=main --variable ACRRESOURCEGROUP=someAcrResourceGroup --variable AZURECONTAINERREGISTRY=someRegistry --variable CONTAINERNAME=someContainer --variable CLUSTERRESOURCEGROUP=someClusterResourceGroup --variable CLUSTERNAME=someAksCluster --variable DOCKERFILE=./Dockerfile --variable BUILDCONTEXTPATH=. --variable NAMESPACE=default + # Validate generated workflow yaml + - name: Install action-validator with asdf + uses: asdf-vm/actions/install@v1 + with: + tool_versions: | + action-validator 0.1.2 + - name: Lint Actions + run: | + find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) | xargs -I {} action-validator --verbose {} + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + with: + name: go-manifests-create + path: | + ./langtest + !./langtest/**/.git/* + - name: Fail if any error + if: steps.deploy.outcome != 'success' || steps.rollout.outcome != 'success' + run: exit 6 + go-manifest-update: + needs: go-manifests-create + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5000:5000 + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: go-manifests-create + path: ./langtest/ + - name: Execute dry run for update command + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/update_dry_run_schema.json -d test/temp/update_dry_run.json + - run: ./draft -v update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + - name: Build image + run: | + export SHELL=/bin/bash + eval $(minikube -p minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + echo -n verifying images: + docker images + # Deploys application based on manifest files from previous step + - name: Deploy application + run: kubectl apply -f ./langtest/manifests/ + continue-on-error: true + id: deploy + - name: Check default namespace + if: steps.deploy.outcome != 'success' + run: kubectl get po + - name: Fail if any error + if: steps.deploy.outcome != 'success' + run: exit 6 + + python-helm-dry-run: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: OliverMKing/flask-hello-world + path: ./langtest + - name: Execute Dry Run with config file + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -c ./test/integration/python/helm.yaml -d ./langtest/ --skip-file-detection + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + - name: Execute Dry Run with variables passed through flag + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -d ./langtest/ -l python --skip-file-detection --deploy-type helm --variable PORT=8080 --variable APPNAME=testingCreateCommand --variable VERSION=1.11 --variable BUILDERVERSION=1.11 --variable SERVICEPORT=8080 --variable NAMESPACE=testNamespace --variable IMAGENAME=testImage --variable IMAGETAG=latest --variable ENTRYPOINT=testapp.py + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + python-helm-create-update: + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5001:5000 + needs: python-helm-dry-run + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: OliverMKing/flask-hello-world + path: ./langtest + - run: rm -rf ./langtest/manifests && rm -f ./langtest/Dockerfile ./langtest/.dockerignore + - run: ./draft -v create -c ./test/integration/python/helm.yaml -d ./langtest/ + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + with: + insecure-registry: 'host.minikube.internal:5001,10.0.0.0/24' + # Runs Helm to create manifest files + - name: Bake deployment + uses: azure/k8s-bake@v2.2 + with: + renderEngine: 'helm' + helmChart: ./langtest/charts + overrideFiles: ./langtest/charts/values.yaml + overrides: | + replicas:2 + helm-version: 'latest' + releaseName: 'test-release' + id: bake + - name: Build and Push image + continue-on-error: true + run: | + export SHELL=/bin/bash + eval $(minikube -p minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + docker tag testapp host.minikube.internal:5001/testapp + echo -n "verifying images:" + docker images + docker push host.minikube.internal:5001/testapp + echo 'Curling host.minikube.internal test app images from minikube' + minikube ssh "curl http://host.minikube.internal:5001/v2/testapp/tags/list" + # Deploys application based on manifest files from previous step + - name: Deploy application + uses: Azure/k8s-deploy@v4.0 + continue-on-error: true + id: deploy + with: + action: deploy + manifests: ${{ steps.bake.outputs.manifestsBundle }} + images: | + host.minikube.internal:5001/testapp + - name: Wait for rollout + continue-on-error: true + id: rollout + run: | + kubectl rollout status deployment/test-release-testapp --timeout=2m + - name: Print K8s Objects + run: | + kubectl get po -o json + kubectl get svc -o json + kubectl get deploy -o json + - name: Curl Endpoint + run: | + kubectl get svc + echo 'Starting minikube tunnel' + minikube tunnel > /dev/null 2>&1 & tunnelPID=$! + sleep 120 + kubectl get svc + SERVICEIP=$(kubectl get svc -o jsonpath={'.items[1].status.loadBalancer.ingress[0].ip'}) + echo "SERVICEIP: $SERVICEIP" + echo 'Curling service IP' + curl -m 3 $SERVICEIP:80 + kill $tunnelPID + - run: | + ./draft -v generate-workflow -d ./langtest/ --deploy-type helm --variable WORKFLOWNAME=someWorkflow --variable BRANCHNAME=main --variable ACRRESOURCEGROUP=someAcrResourceGroup --variable AZURECONTAINERREGISTRY=someRegistry --variable CONTAINERNAME=someContainer --variable CLUSTERRESOURCEGROUP=someClusterResourceGroup --variable CLUSTERNAME=someAksCluster --variable DOCKERFILE=./Dockerfile --variable BUILDCONTEXTPATH=. --variable NAMESPACE=default + pwd + # Validate generated workflow yaml + - name: Install action-validator with asdf + uses: asdf-vm/actions/install@v1 + with: + tool_versions: | + action-validator 0.1.2 + - name: Lint Actions + run: | + find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) | xargs -I {} action-validator --verbose {} + - name: Execute dry run for update command + run: | + mkdir -p test/temp + pwd + ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/update_dry_run_schema.json -d test/temp/update_dry_run.json + - run: ./draft -v update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Check default namespace + if: steps.deploy.outcome != 'success' + run: kubectl get po + - name: Fail if any error + if: steps.deploy.outcome != 'success' + run: exit 6 + + python-kustomize-dry-run: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: OliverMKing/flask-hello-world + path: ./langtest + - name: Execute Dry Run with config file + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -c ./test/integration/python/kustomize.yaml -d ./langtest/ --skip-file-detection + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + - name: Execute Dry Run with variables passed through flag + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -d ./langtest/ -l python --skip-file-detection --deploy-type kustomize --variable PORT=8080 --variable APPNAME=testingCreateCommand --variable VERSION=1.11 --variable BUILDERVERSION=1.11 --variable SERVICEPORT=8080 --variable NAMESPACE=testNamespace --variable IMAGENAME=testImage --variable IMAGETAG=latest --variable ENTRYPOINT=testapp.py + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + python-kustomize-create-update: + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5001:5000 + needs: python-kustomize-dry-run + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: OliverMKing/flask-hello-world + path: ./langtest + - run: rm -rf ./langtest/manifests && rm -f ./langtest/Dockerfile ./langtest/.dockerignore + - run: ./draft -v create -c ./test/integration/python/kustomize.yaml -d ./langtest/ + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + with: + insecure-registry: 'host.minikube.internal:5001,10.0.0.0/24' + - name: Bake deployment + uses: azure/k8s-bake@v2.4 + id: bake + with: + renderEngine: 'kustomize' + kustomizationPath: ./langtest/base + kubectl-version: 'latest' + - name: Build and Push Image + continue-on-error: true + run: | + eval $(minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + docker tag testapp host.minikube.internal:5001/testapp + echo -n "verifying images:" + docker images + docker push host.minikube.internal:5001/testapp + echo 'Curling host.minikube.internal test app images from minikube' + minikube ssh "curl http://host.minikube.internal:5001/v2/testapp/tags/list" + # Deploys application based on manifest files from previous step + - name: Deploy application + uses: Azure/k8s-deploy@v4.0 + continue-on-error: true + id: deploy + with: + action: deploy + manifests: ${{ steps.bake.outputs.manifestsBundle }} + images: | + host.minikube.internal:5001/testapp + - name: Wait for rollout + continue-on-error: true + id: rollout + run: | + kubectl rollout status deployment/testapp --timeout=2m + - name: Print K8s Objects + run: | + kubectl get po -o json + kubectl get svc -o json + kubectl get deploy -o json + - name: Curl Endpoint + run: | + kubectl get svc + echo 'Starting minikube tunnel' + minikube tunnel > /dev/null 2>&1 & tunnelPID=$! + sleep 120 + kubectl get svc + SERVICEIP=$(kubectl get svc -o jsonpath={'.items[1].status.loadBalancer.ingress[0].ip'}) + echo "SERVICEIP: $SERVICEIP" + echo 'Curling service IP' + curl -m 3 $SERVICEIP:80 + kill $tunnelPID + - run: ./draft -v generate-workflow -d ./langtest/ --deploy-type kustomize --variable WORKFLOWNAME=someWorkflow --variable BRANCHNAME=main --variable ACRRESOURCEGROUP=someAcrResourceGroup --variable AZURECONTAINERREGISTRY=someRegistry --variable CONTAINERNAME=someContainer --variable CLUSTERRESOURCEGROUP=someClusterResourceGroup --variable CLUSTERNAME=someAksCluster --variable DOCKERFILE=./Dockerfile --variable BUILDCONTEXTPATH=. --variable NAMESPACE=default + # Validate generated workflow yaml + - name: Install action-validator with asdf + uses: asdf-vm/actions/install@v1 + with: + tool_versions: | + action-validator 0.1.2 + - name: Lint Actions + run: | + find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) | xargs -I {} action-validator --verbose {} + - name: Execute dry run for update command + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/update_dry_run_schema.json -d test/temp/update_dry_run.json + - run: ./draft -v update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Check default namespace + if: steps.deploy.outcome != 'success' + run: kubectl get po + - name: Fail if any error + if: steps.deploy.outcome != 'success' + run: exit 6 + + python-manifest-dry-run: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: OliverMKing/flask-hello-world + path: ./langtest + - name: Execute Dry Run with config file + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -c ./test/integration/python/manifest.yaml -d ./langtest/ --skip-file-detection + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + - name: Execute Dry Run with variables passed through flag + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -d ./langtest/ -l python --skip-file-detection --deploy-type manifests --variable PORT=8080 --variable APPNAME=testingCreateCommand --variable VERSION=1.11 --variable BUILDERVERSION=1.11 --variable SERVICEPORT=8080 --variable NAMESPACE=testNamespace --variable IMAGENAME=testImage --variable IMAGETAG=latest --variable ENTRYPOINT=testapp.py + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + python-manifests-create: + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5001:5000 + needs: python-manifest-dry-run + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: OliverMKing/flask-hello-world + path: ./langtest + - run: rm -rf ./langtest/manifests && rm -f ./langtest/Dockerfile ./langtest/.dockerignore + - run: ./draft -v create -c ./test/integration/python/manifest.yaml -d ./langtest/ + - name: print manifests + run: cat ./langtest/manifests/* + - name: Add docker.local host to /etc/hosts + run: | + sudo echo "127.0.0.1 docker.local" | sudo tee -a /etc/hosts + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + with: + insecure-registry: 'host.minikube.internal:5001,10.0.0.0/24' + - name: Build and Push Image + continue-on-error: true + run: | + eval $(minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + docker tag testapp host.minikube.internal:5001/testapp + echo -n "verifying images:" + docker images + docker push host.minikube.internal:5001/testapp + echo 'Curling host.minikube.internal test app images from minikube' + minikube ssh "curl http://host.minikube.internal:5001/v2/testapp/tags/list" + # Deploys application based on manifest files from previous step + - name: Deploy application + run: kubectl apply -f ./langtest/manifests/ + continue-on-error: true + id: deploy + - name: Wait for rollout + continue-on-error: true + id: rollout + run: | + kubectl rollout status deployment/testapp --timeout=2m + - name: Print K8s Objects + run: | + kubectl get po -o json + kubectl get svc -o json + kubectl get deploy -o json + - name: Curl Endpoint + run: | + kubectl get svc + echo 'Starting minikube tunnel' + minikube tunnel > /dev/null 2>&1 & tunnelPID=$! + sleep 120 + kubectl get svc + SERVICEIP=$(kubectl get svc -o jsonpath={'.items[1].status.loadBalancer.ingress[0].ip'}) + echo "SERVICEIP: $SERVICEIP" + echo 'Curling service IP' + curl -m 3 $SERVICEIP:80 + kill $tunnelPID + - run: ./draft -v generate-workflow -d ./langtest/ --deploy-type manifests --variable WORKFLOWNAME=someWorkflow --variable BRANCHNAME=main --variable ACRRESOURCEGROUP=someAcrResourceGroup --variable AZURECONTAINERREGISTRY=someRegistry --variable CONTAINERNAME=someContainer --variable CLUSTERRESOURCEGROUP=someClusterResourceGroup --variable CLUSTERNAME=someAksCluster --variable DOCKERFILE=./Dockerfile --variable BUILDCONTEXTPATH=. --variable NAMESPACE=default + # Validate generated workflow yaml + - name: Install action-validator with asdf + uses: asdf-vm/actions/install@v1 + with: + tool_versions: | + action-validator 0.1.2 + - name: Lint Actions + run: | + find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) | xargs -I {} action-validator --verbose {} + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + with: + name: python-manifests-create + path: | + ./langtest + !./langtest/**/.git/* + - name: Fail if any error + if: steps.deploy.outcome != 'success' || steps.rollout.outcome != 'success' + run: exit 6 + python-manifest-update: + needs: python-manifests-create + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5000:5000 + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: python-manifests-create + path: ./langtest/ + - name: Execute dry run for update command + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/update_dry_run_schema.json -d test/temp/update_dry_run.json + - run: ./draft -v update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + - name: Build image + run: | + export SHELL=/bin/bash + eval $(minikube -p minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + echo -n verifying images: + docker images + # Deploys application based on manifest files from previous step + - name: Deploy application + run: kubectl apply -f ./langtest/manifests/ + continue-on-error: true + id: deploy + - name: Check default namespace + if: steps.deploy.outcome != 'success' + run: kubectl get po + - name: Fail if any error + if: steps.deploy.outcome != 'success' + run: exit 6 + + rust-helm-dry-run: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: OliverMKing/tiny-http-hello-world + path: ./langtest + - name: Execute Dry Run with config file + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -c ./test/integration/rust/helm.yaml -d ./langtest/ --skip-file-detection + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + - name: Execute Dry Run with variables passed through flag + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -d ./langtest/ -l rust --skip-file-detection --deploy-type helm --variable PORT=8080 --variable APPNAME=testingCreateCommand --variable VERSION=1.11 --variable BUILDERVERSION=1.11 --variable SERVICEPORT=8080 --variable NAMESPACE=testNamespace --variable IMAGENAME=testImage --variable IMAGETAG=latest + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + rust-helm-create-update: + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5001:5000 + needs: rust-helm-dry-run + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: OliverMKing/tiny-http-hello-world + path: ./langtest + - run: rm -rf ./langtest/manifests && rm -f ./langtest/Dockerfile ./langtest/.dockerignore + - run: ./draft -v create -c ./test/integration/rust/helm.yaml -d ./langtest/ + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + with: + insecure-registry: 'host.minikube.internal:5001,10.0.0.0/24' + # Runs Helm to create manifest files + - name: Bake deployment + uses: azure/k8s-bake@v2.2 + with: + renderEngine: 'helm' + helmChart: ./langtest/charts + overrideFiles: ./langtest/charts/values.yaml + overrides: | + replicas:2 + helm-version: 'latest' + releaseName: 'test-release' + id: bake + - name: Build and Push image + continue-on-error: true + run: | + export SHELL=/bin/bash + eval $(minikube -p minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + docker tag testapp host.minikube.internal:5001/testapp + echo -n "verifying images:" + docker images + docker push host.minikube.internal:5001/testapp + echo 'Curling host.minikube.internal test app images from minikube' + minikube ssh "curl http://host.minikube.internal:5001/v2/testapp/tags/list" + # Deploys application based on manifest files from previous step + - name: Deploy application + uses: Azure/k8s-deploy@v4.0 + continue-on-error: true + id: deploy + with: + action: deploy + manifests: ${{ steps.bake.outputs.manifestsBundle }} + images: | + host.minikube.internal:5001/testapp + - name: Wait for rollout + continue-on-error: true + id: rollout + run: | + kubectl rollout status deployment/test-release-testapp --timeout=2m + - name: Print K8s Objects + run: | + kubectl get po -o json + kubectl get svc -o json + kubectl get deploy -o json + - name: Curl Endpoint + run: | + kubectl get svc + echo 'Starting minikube tunnel' + minikube tunnel > /dev/null 2>&1 & tunnelPID=$! + sleep 120 + kubectl get svc + SERVICEIP=$(kubectl get svc -o jsonpath={'.items[1].status.loadBalancer.ingress[0].ip'}) + echo "SERVICEIP: $SERVICEIP" + echo 'Curling service IP' + curl -m 3 $SERVICEIP:80 + kill $tunnelPID + - run: | + ./draft -v generate-workflow -d ./langtest/ --deploy-type helm --variable WORKFLOWNAME=someWorkflow --variable BRANCHNAME=main --variable ACRRESOURCEGROUP=someAcrResourceGroup --variable AZURECONTAINERREGISTRY=someRegistry --variable CONTAINERNAME=someContainer --variable CLUSTERRESOURCEGROUP=someClusterResourceGroup --variable CLUSTERNAME=someAksCluster --variable DOCKERFILE=./Dockerfile --variable BUILDCONTEXTPATH=. --variable NAMESPACE=default + pwd + # Validate generated workflow yaml + - name: Install action-validator with asdf + uses: asdf-vm/actions/install@v1 + with: + tool_versions: | + action-validator 0.1.2 + - name: Lint Actions + run: | + find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) | xargs -I {} action-validator --verbose {} + - name: Execute dry run for update command + run: | + mkdir -p test/temp + pwd + ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/update_dry_run_schema.json -d test/temp/update_dry_run.json + - run: ./draft -v update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Check default namespace + if: steps.deploy.outcome != 'success' + run: kubectl get po + - name: Fail if any error + if: steps.deploy.outcome != 'success' + run: exit 6 + + rust-kustomize-dry-run: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: OliverMKing/tiny-http-hello-world + path: ./langtest + - name: Execute Dry Run with config file + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -c ./test/integration/rust/kustomize.yaml -d ./langtest/ --skip-file-detection + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + - name: Execute Dry Run with variables passed through flag + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -d ./langtest/ -l rust --skip-file-detection --deploy-type kustomize --variable PORT=8080 --variable APPNAME=testingCreateCommand --variable VERSION=1.11 --variable BUILDERVERSION=1.11 --variable SERVICEPORT=8080 --variable NAMESPACE=testNamespace --variable IMAGENAME=testImage --variable IMAGETAG=latest + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + rust-kustomize-create-update: + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5001:5000 + needs: rust-kustomize-dry-run + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: OliverMKing/tiny-http-hello-world + path: ./langtest + - run: rm -rf ./langtest/manifests && rm -f ./langtest/Dockerfile ./langtest/.dockerignore + - run: ./draft -v create -c ./test/integration/rust/kustomize.yaml -d ./langtest/ + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + with: + insecure-registry: 'host.minikube.internal:5001,10.0.0.0/24' + - name: Bake deployment + uses: azure/k8s-bake@v2.4 + id: bake + with: + renderEngine: 'kustomize' + kustomizationPath: ./langtest/base + kubectl-version: 'latest' + - name: Build and Push Image + continue-on-error: true + run: | + eval $(minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + docker tag testapp host.minikube.internal:5001/testapp + echo -n "verifying images:" + docker images + docker push host.minikube.internal:5001/testapp + echo 'Curling host.minikube.internal test app images from minikube' + minikube ssh "curl http://host.minikube.internal:5001/v2/testapp/tags/list" + # Deploys application based on manifest files from previous step + - name: Deploy application + uses: Azure/k8s-deploy@v4.0 + continue-on-error: true + id: deploy + with: + action: deploy + manifests: ${{ steps.bake.outputs.manifestsBundle }} + images: | + host.minikube.internal:5001/testapp + - name: Wait for rollout + continue-on-error: true + id: rollout + run: | + kubectl rollout status deployment/testapp --timeout=2m + - name: Print K8s Objects + run: | + kubectl get po -o json + kubectl get svc -o json + kubectl get deploy -o json + - name: Curl Endpoint + run: | + kubectl get svc + echo 'Starting minikube tunnel' + minikube tunnel > /dev/null 2>&1 & tunnelPID=$! + sleep 120 + kubectl get svc + SERVICEIP=$(kubectl get svc -o jsonpath={'.items[1].status.loadBalancer.ingress[0].ip'}) + echo "SERVICEIP: $SERVICEIP" + echo 'Curling service IP' + curl -m 3 $SERVICEIP:80 + kill $tunnelPID + - run: ./draft -v generate-workflow -d ./langtest/ --deploy-type kustomize --variable WORKFLOWNAME=someWorkflow --variable BRANCHNAME=main --variable ACRRESOURCEGROUP=someAcrResourceGroup --variable AZURECONTAINERREGISTRY=someRegistry --variable CONTAINERNAME=someContainer --variable CLUSTERRESOURCEGROUP=someClusterResourceGroup --variable CLUSTERNAME=someAksCluster --variable DOCKERFILE=./Dockerfile --variable BUILDCONTEXTPATH=. --variable NAMESPACE=default + # Validate generated workflow yaml + - name: Install action-validator with asdf + uses: asdf-vm/actions/install@v1 + with: + tool_versions: | + action-validator 0.1.2 + - name: Lint Actions + run: | + find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) | xargs -I {} action-validator --verbose {} + - name: Execute dry run for update command + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/update_dry_run_schema.json -d test/temp/update_dry_run.json + - run: ./draft -v update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Check default namespace + if: steps.deploy.outcome != 'success' + run: kubectl get po + - name: Fail if any error + if: steps.deploy.outcome != 'success' + run: exit 6 + + rust-manifest-dry-run: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: OliverMKing/tiny-http-hello-world + path: ./langtest + - name: Execute Dry Run with config file + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -c ./test/integration/rust/manifest.yaml -d ./langtest/ --skip-file-detection + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + - name: Execute Dry Run with variables passed through flag + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -d ./langtest/ -l rust --skip-file-detection --deploy-type manifests --variable PORT=8080 --variable APPNAME=testingCreateCommand --variable VERSION=1.11 --variable BUILDERVERSION=1.11 --variable SERVICEPORT=8080 --variable NAMESPACE=testNamespace --variable IMAGENAME=testImage --variable IMAGETAG=latest + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + rust-manifests-create: + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5001:5000 + needs: rust-manifest-dry-run + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: OliverMKing/tiny-http-hello-world + path: ./langtest + - run: rm -rf ./langtest/manifests && rm -f ./langtest/Dockerfile ./langtest/.dockerignore + - run: ./draft -v create -c ./test/integration/rust/manifest.yaml -d ./langtest/ + - name: print manifests + run: cat ./langtest/manifests/* + - name: Add docker.local host to /etc/hosts + run: | + sudo echo "127.0.0.1 docker.local" | sudo tee -a /etc/hosts + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + with: + insecure-registry: 'host.minikube.internal:5001,10.0.0.0/24' + - name: Build and Push Image + continue-on-error: true + run: | + eval $(minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + docker tag testapp host.minikube.internal:5001/testapp + echo -n "verifying images:" + docker images + docker push host.minikube.internal:5001/testapp + echo 'Curling host.minikube.internal test app images from minikube' + minikube ssh "curl http://host.minikube.internal:5001/v2/testapp/tags/list" + # Deploys application based on manifest files from previous step + - name: Deploy application + run: kubectl apply -f ./langtest/manifests/ + continue-on-error: true + id: deploy + - name: Wait for rollout + continue-on-error: true + id: rollout + run: | + kubectl rollout status deployment/testapp --timeout=2m + - name: Print K8s Objects + run: | + kubectl get po -o json + kubectl get svc -o json + kubectl get deploy -o json + - name: Curl Endpoint + run: | + kubectl get svc + echo 'Starting minikube tunnel' + minikube tunnel > /dev/null 2>&1 & tunnelPID=$! + sleep 120 + kubectl get svc + SERVICEIP=$(kubectl get svc -o jsonpath={'.items[1].status.loadBalancer.ingress[0].ip'}) + echo "SERVICEIP: $SERVICEIP" + echo 'Curling service IP' + curl -m 3 $SERVICEIP:80 + kill $tunnelPID + - run: ./draft -v generate-workflow -d ./langtest/ --deploy-type manifests --variable WORKFLOWNAME=someWorkflow --variable BRANCHNAME=main --variable ACRRESOURCEGROUP=someAcrResourceGroup --variable AZURECONTAINERREGISTRY=someRegistry --variable CONTAINERNAME=someContainer --variable CLUSTERRESOURCEGROUP=someClusterResourceGroup --variable CLUSTERNAME=someAksCluster --variable DOCKERFILE=./Dockerfile --variable BUILDCONTEXTPATH=. --variable NAMESPACE=default + # Validate generated workflow yaml + - name: Install action-validator with asdf + uses: asdf-vm/actions/install@v1 + with: + tool_versions: | + action-validator 0.1.2 + - name: Lint Actions + run: | + find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) | xargs -I {} action-validator --verbose {} + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + with: + name: rust-manifests-create + path: | + ./langtest + !./langtest/**/.git/* + - name: Fail if any error + if: steps.deploy.outcome != 'success' || steps.rollout.outcome != 'success' + run: exit 6 + rust-manifest-update: + needs: rust-manifests-create + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5000:5000 + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: rust-manifests-create + path: ./langtest/ + - name: Execute dry run for update command + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/update_dry_run_schema.json -d test/temp/update_dry_run.json + - run: ./draft -v update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + - name: Build image + run: | + export SHELL=/bin/bash + eval $(minikube -p minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + echo -n verifying images: + docker images + # Deploys application based on manifest files from previous step + - name: Deploy application + run: kubectl apply -f ./langtest/manifests/ + continue-on-error: true + id: deploy + - name: Check default namespace + if: steps.deploy.outcome != 'success' + run: kubectl get po + - name: Fail if any error + if: steps.deploy.outcome != 'success' + run: exit 6 + + javascript-helm-dry-run: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: davidgamero/express-hello-world + path: ./langtest + - name: Execute Dry Run with config file + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -c ./test/integration/javascript/helm.yaml -d ./langtest/ --skip-file-detection + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + - name: Execute Dry Run with variables passed through flag + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -d ./langtest/ -l javascript --skip-file-detection --deploy-type helm --variable PORT=8080 --variable APPNAME=testingCreateCommand --variable VERSION=1.11 --variable BUILDERVERSION=1.11 --variable SERVICEPORT=8080 --variable NAMESPACE=testNamespace --variable IMAGENAME=testImage --variable IMAGETAG=latest + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + javascript-helm-create-update: + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5001:5000 + needs: javascript-helm-dry-run + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: davidgamero/express-hello-world + path: ./langtest + - run: rm -rf ./langtest/manifests && rm -f ./langtest/Dockerfile ./langtest/.dockerignore + - run: ./draft -v create -c ./test/integration/javascript/helm.yaml -d ./langtest/ + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + with: + insecure-registry: 'host.minikube.internal:5001,10.0.0.0/24' + # Runs Helm to create manifest files + - name: Bake deployment + uses: azure/k8s-bake@v2.2 + with: + renderEngine: 'helm' + helmChart: ./langtest/charts + overrideFiles: ./langtest/charts/values.yaml + overrides: | + replicas:2 + helm-version: 'latest' + releaseName: 'test-release' + id: bake + - name: Build and Push image + continue-on-error: true + run: | + export SHELL=/bin/bash + eval $(minikube -p minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + docker tag testapp host.minikube.internal:5001/testapp + echo -n "verifying images:" + docker images + docker push host.minikube.internal:5001/testapp + echo 'Curling host.minikube.internal test app images from minikube' + minikube ssh "curl http://host.minikube.internal:5001/v2/testapp/tags/list" + # Deploys application based on manifest files from previous step + - name: Deploy application + uses: Azure/k8s-deploy@v4.0 + continue-on-error: true + id: deploy + with: + action: deploy + manifests: ${{ steps.bake.outputs.manifestsBundle }} + images: | + host.minikube.internal:5001/testapp + - name: Wait for rollout + continue-on-error: true + id: rollout + run: | + kubectl rollout status deployment/test-release-testapp --timeout=2m + - name: Print K8s Objects + run: | + kubectl get po -o json + kubectl get svc -o json + kubectl get deploy -o json + - name: Curl Endpoint + run: | + kubectl get svc + echo 'Starting minikube tunnel' + minikube tunnel > /dev/null 2>&1 & tunnelPID=$! + sleep 120 + kubectl get svc + SERVICEIP=$(kubectl get svc -o jsonpath={'.items[1].status.loadBalancer.ingress[0].ip'}) + echo "SERVICEIP: $SERVICEIP" + echo 'Curling service IP' + curl -m 3 $SERVICEIP:80 + kill $tunnelPID + - run: | + ./draft -v generate-workflow -d ./langtest/ --deploy-type helm --variable WORKFLOWNAME=someWorkflow --variable BRANCHNAME=main --variable ACRRESOURCEGROUP=someAcrResourceGroup --variable AZURECONTAINERREGISTRY=someRegistry --variable CONTAINERNAME=someContainer --variable CLUSTERRESOURCEGROUP=someClusterResourceGroup --variable CLUSTERNAME=someAksCluster --variable DOCKERFILE=./Dockerfile --variable BUILDCONTEXTPATH=. --variable NAMESPACE=default + pwd + # Validate generated workflow yaml + - name: Install action-validator with asdf + uses: asdf-vm/actions/install@v1 + with: + tool_versions: | + action-validator 0.1.2 + - name: Lint Actions + run: | + find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) | xargs -I {} action-validator --verbose {} + - name: Execute dry run for update command + run: | + mkdir -p test/temp + pwd + ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/update_dry_run_schema.json -d test/temp/update_dry_run.json + - run: ./draft -v update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Check default namespace + if: steps.deploy.outcome != 'success' + run: kubectl get po + - name: Fail if any error + if: steps.deploy.outcome != 'success' + run: exit 6 + + javascript-kustomize-dry-run: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: davidgamero/express-hello-world + path: ./langtest + - name: Execute Dry Run with config file + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -c ./test/integration/javascript/kustomize.yaml -d ./langtest/ --skip-file-detection + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + - name: Execute Dry Run with variables passed through flag + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -d ./langtest/ -l javascript --skip-file-detection --deploy-type kustomize --variable PORT=8080 --variable APPNAME=testingCreateCommand --variable VERSION=1.11 --variable BUILDERVERSION=1.11 --variable SERVICEPORT=8080 --variable NAMESPACE=testNamespace --variable IMAGENAME=testImage --variable IMAGETAG=latest + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + javascript-kustomize-create-update: + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5001:5000 + needs: javascript-kustomize-dry-run + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: davidgamero/express-hello-world + path: ./langtest + - run: rm -rf ./langtest/manifests && rm -f ./langtest/Dockerfile ./langtest/.dockerignore + - run: ./draft -v create -c ./test/integration/javascript/kustomize.yaml -d ./langtest/ + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + with: + insecure-registry: 'host.minikube.internal:5001,10.0.0.0/24' + - name: Bake deployment + uses: azure/k8s-bake@v2.4 + id: bake + with: + renderEngine: 'kustomize' + kustomizationPath: ./langtest/base + kubectl-version: 'latest' + - name: Build and Push Image + continue-on-error: true + run: | + eval $(minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + docker tag testapp host.minikube.internal:5001/testapp + echo -n "verifying images:" + docker images + docker push host.minikube.internal:5001/testapp + echo 'Curling host.minikube.internal test app images from minikube' + minikube ssh "curl http://host.minikube.internal:5001/v2/testapp/tags/list" + # Deploys application based on manifest files from previous step + - name: Deploy application + uses: Azure/k8s-deploy@v4.0 + continue-on-error: true + id: deploy + with: + action: deploy + manifests: ${{ steps.bake.outputs.manifestsBundle }} + images: | + host.minikube.internal:5001/testapp + - name: Wait for rollout + continue-on-error: true + id: rollout + run: | + kubectl rollout status deployment/testapp --timeout=2m + - name: Print K8s Objects + run: | + kubectl get po -o json + kubectl get svc -o json + kubectl get deploy -o json + - name: Curl Endpoint + run: | + kubectl get svc + echo 'Starting minikube tunnel' + minikube tunnel > /dev/null 2>&1 & tunnelPID=$! + sleep 120 + kubectl get svc + SERVICEIP=$(kubectl get svc -o jsonpath={'.items[1].status.loadBalancer.ingress[0].ip'}) + echo "SERVICEIP: $SERVICEIP" + echo 'Curling service IP' + curl -m 3 $SERVICEIP:80 + kill $tunnelPID + - run: ./draft -v generate-workflow -d ./langtest/ --deploy-type kustomize --variable WORKFLOWNAME=someWorkflow --variable BRANCHNAME=main --variable ACRRESOURCEGROUP=someAcrResourceGroup --variable AZURECONTAINERREGISTRY=someRegistry --variable CONTAINERNAME=someContainer --variable CLUSTERRESOURCEGROUP=someClusterResourceGroup --variable CLUSTERNAME=someAksCluster --variable DOCKERFILE=./Dockerfile --variable BUILDCONTEXTPATH=. --variable NAMESPACE=default + # Validate generated workflow yaml + - name: Install action-validator with asdf + uses: asdf-vm/actions/install@v1 + with: + tool_versions: | + action-validator 0.1.2 + - name: Lint Actions + run: | + find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) | xargs -I {} action-validator --verbose {} + - name: Execute dry run for update command + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/update_dry_run_schema.json -d test/temp/update_dry_run.json + - run: ./draft -v update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Check default namespace + if: steps.deploy.outcome != 'success' + run: kubectl get po + - name: Fail if any error + if: steps.deploy.outcome != 'success' + run: exit 6 + + javascript-manifest-dry-run: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: davidgamero/express-hello-world + path: ./langtest + - name: Execute Dry Run with config file + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -c ./test/integration/javascript/manifest.yaml -d ./langtest/ --skip-file-detection + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + - name: Execute Dry Run with variables passed through flag + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -d ./langtest/ -l javascript --skip-file-detection --deploy-type manifests --variable PORT=8080 --variable APPNAME=testingCreateCommand --variable VERSION=1.11 --variable BUILDERVERSION=1.11 --variable SERVICEPORT=8080 --variable NAMESPACE=testNamespace --variable IMAGENAME=testImage --variable IMAGETAG=latest + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + javascript-manifests-create: + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5001:5000 + needs: javascript-manifest-dry-run + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: davidgamero/express-hello-world + path: ./langtest + - run: rm -rf ./langtest/manifests && rm -f ./langtest/Dockerfile ./langtest/.dockerignore + - run: ./draft -v create -c ./test/integration/javascript/manifest.yaml -d ./langtest/ + - name: print manifests + run: cat ./langtest/manifests/* + - name: Add docker.local host to /etc/hosts + run: | + sudo echo "127.0.0.1 docker.local" | sudo tee -a /etc/hosts + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + with: + insecure-registry: 'host.minikube.internal:5001,10.0.0.0/24' + - name: Build and Push Image + continue-on-error: true + run: | + eval $(minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + docker tag testapp host.minikube.internal:5001/testapp + echo -n "verifying images:" + docker images + docker push host.minikube.internal:5001/testapp + echo 'Curling host.minikube.internal test app images from minikube' + minikube ssh "curl http://host.minikube.internal:5001/v2/testapp/tags/list" + # Deploys application based on manifest files from previous step + - name: Deploy application + run: kubectl apply -f ./langtest/manifests/ + continue-on-error: true + id: deploy + - name: Wait for rollout + continue-on-error: true + id: rollout + run: | + kubectl rollout status deployment/testapp --timeout=2m + - name: Print K8s Objects + run: | + kubectl get po -o json + kubectl get svc -o json + kubectl get deploy -o json + - name: Curl Endpoint + run: | + kubectl get svc + echo 'Starting minikube tunnel' + minikube tunnel > /dev/null 2>&1 & tunnelPID=$! + sleep 120 + kubectl get svc + SERVICEIP=$(kubectl get svc -o jsonpath={'.items[1].status.loadBalancer.ingress[0].ip'}) + echo "SERVICEIP: $SERVICEIP" + echo 'Curling service IP' + curl -m 3 $SERVICEIP:80 + kill $tunnelPID + - run: ./draft -v generate-workflow -d ./langtest/ --deploy-type manifests --variable WORKFLOWNAME=someWorkflow --variable BRANCHNAME=main --variable ACRRESOURCEGROUP=someAcrResourceGroup --variable AZURECONTAINERREGISTRY=someRegistry --variable CONTAINERNAME=someContainer --variable CLUSTERRESOURCEGROUP=someClusterResourceGroup --variable CLUSTERNAME=someAksCluster --variable DOCKERFILE=./Dockerfile --variable BUILDCONTEXTPATH=. --variable NAMESPACE=default + # Validate generated workflow yaml + - name: Install action-validator with asdf + uses: asdf-vm/actions/install@v1 + with: + tool_versions: | + action-validator 0.1.2 + - name: Lint Actions + run: | + find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) | xargs -I {} action-validator --verbose {} + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + with: + name: javascript-manifests-create + path: | + ./langtest + !./langtest/**/.git/* + - name: Fail if any error + if: steps.deploy.outcome != 'success' || steps.rollout.outcome != 'success' + run: exit 6 + javascript-manifest-update: + needs: javascript-manifests-create + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5000:5000 + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: javascript-manifests-create + path: ./langtest/ + - name: Execute dry run for update command + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/update_dry_run_schema.json -d test/temp/update_dry_run.json + - run: ./draft -v update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + - name: Build image + run: | + export SHELL=/bin/bash + eval $(minikube -p minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + echo -n verifying images: + docker images + # Deploys application based on manifest files from previous step + - name: Deploy application + run: kubectl apply -f ./langtest/manifests/ + continue-on-error: true + id: deploy + - name: Check default namespace + if: steps.deploy.outcome != 'success' + run: kubectl get po + - name: Fail if any error + if: steps.deploy.outcome != 'success' + run: exit 6 + + ruby-helm-dry-run: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: davidgamero/sinatra-hello-world + path: ./langtest + - name: Execute Dry Run with config file + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -c ./test/integration/ruby/helm.yaml -d ./langtest/ --skip-file-detection + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + - name: Execute Dry Run with variables passed through flag + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -d ./langtest/ -l ruby --skip-file-detection --deploy-type helm --variable PORT=8080 --variable APPNAME=testingCreateCommand --variable VERSION=1.11 --variable BUILDERVERSION=1.11 --variable SERVICEPORT=8080 --variable NAMESPACE=testNamespace --variable IMAGENAME=testImage --variable IMAGETAG=latest + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + ruby-helm-create-update: + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5001:5000 + needs: ruby-helm-dry-run + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: davidgamero/sinatra-hello-world + path: ./langtest + - run: rm -rf ./langtest/manifests && rm -f ./langtest/Dockerfile ./langtest/.dockerignore + - run: ./draft -v create -c ./test/integration/ruby/helm.yaml -d ./langtest/ + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + with: + insecure-registry: 'host.minikube.internal:5001,10.0.0.0/24' + # Runs Helm to create manifest files + - name: Bake deployment + uses: azure/k8s-bake@v2.2 + with: + renderEngine: 'helm' + helmChart: ./langtest/charts + overrideFiles: ./langtest/charts/values.yaml + overrides: | + replicas:2 + helm-version: 'latest' + releaseName: 'test-release' + id: bake + - name: Build and Push image + continue-on-error: true + run: | + export SHELL=/bin/bash + eval $(minikube -p minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + docker tag testapp host.minikube.internal:5001/testapp + echo -n "verifying images:" + docker images + docker push host.minikube.internal:5001/testapp + echo 'Curling host.minikube.internal test app images from minikube' + minikube ssh "curl http://host.minikube.internal:5001/v2/testapp/tags/list" + # Deploys application based on manifest files from previous step + - name: Deploy application + uses: Azure/k8s-deploy@v4.0 + continue-on-error: true + id: deploy + with: + action: deploy + manifests: ${{ steps.bake.outputs.manifestsBundle }} + images: | + host.minikube.internal:5001/testapp + - name: Wait for rollout + continue-on-error: true + id: rollout + run: | + kubectl rollout status deployment/test-release-testapp --timeout=2m + - name: Print K8s Objects + run: | + kubectl get po -o json + kubectl get svc -o json + kubectl get deploy -o json + - name: Curl Endpoint + run: | + kubectl get svc + echo 'Starting minikube tunnel' + minikube tunnel > /dev/null 2>&1 & tunnelPID=$! + sleep 120 + kubectl get svc + SERVICEIP=$(kubectl get svc -o jsonpath={'.items[1].status.loadBalancer.ingress[0].ip'}) + echo "SERVICEIP: $SERVICEIP" + echo 'Curling service IP' + curl -m 3 $SERVICEIP:80 + kill $tunnelPID + - run: | + ./draft -v generate-workflow -d ./langtest/ --deploy-type helm --variable WORKFLOWNAME=someWorkflow --variable BRANCHNAME=main --variable ACRRESOURCEGROUP=someAcrResourceGroup --variable AZURECONTAINERREGISTRY=someRegistry --variable CONTAINERNAME=someContainer --variable CLUSTERRESOURCEGROUP=someClusterResourceGroup --variable CLUSTERNAME=someAksCluster --variable DOCKERFILE=./Dockerfile --variable BUILDCONTEXTPATH=. --variable NAMESPACE=default + pwd + # Validate generated workflow yaml + - name: Install action-validator with asdf + uses: asdf-vm/actions/install@v1 + with: + tool_versions: | + action-validator 0.1.2 + - name: Lint Actions + run: | + find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) | xargs -I {} action-validator --verbose {} + - name: Execute dry run for update command + run: | + mkdir -p test/temp + pwd + ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/update_dry_run_schema.json -d test/temp/update_dry_run.json + - run: ./draft -v update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Check default namespace + if: steps.deploy.outcome != 'success' + run: kubectl get po + - name: Fail if any error + if: steps.deploy.outcome != 'success' + run: exit 6 + + ruby-kustomize-dry-run: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: davidgamero/sinatra-hello-world + path: ./langtest + - name: Execute Dry Run with config file + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -c ./test/integration/ruby/kustomize.yaml -d ./langtest/ --skip-file-detection + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + - name: Execute Dry Run with variables passed through flag + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -d ./langtest/ -l ruby --skip-file-detection --deploy-type kustomize --variable PORT=8080 --variable APPNAME=testingCreateCommand --variable VERSION=1.11 --variable BUILDERVERSION=1.11 --variable SERVICEPORT=8080 --variable NAMESPACE=testNamespace --variable IMAGENAME=testImage --variable IMAGETAG=latest + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + ruby-kustomize-create-update: + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5001:5000 + needs: ruby-kustomize-dry-run + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: davidgamero/sinatra-hello-world + path: ./langtest + - run: rm -rf ./langtest/manifests && rm -f ./langtest/Dockerfile ./langtest/.dockerignore + - run: ./draft -v create -c ./test/integration/ruby/kustomize.yaml -d ./langtest/ + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + with: + insecure-registry: 'host.minikube.internal:5001,10.0.0.0/24' + - name: Bake deployment + uses: azure/k8s-bake@v2.4 + id: bake + with: + renderEngine: 'kustomize' + kustomizationPath: ./langtest/base + kubectl-version: 'latest' + - name: Build and Push Image + continue-on-error: true + run: | + eval $(minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + docker tag testapp host.minikube.internal:5001/testapp + echo -n "verifying images:" + docker images + docker push host.minikube.internal:5001/testapp + echo 'Curling host.minikube.internal test app images from minikube' + minikube ssh "curl http://host.minikube.internal:5001/v2/testapp/tags/list" + # Deploys application based on manifest files from previous step + - name: Deploy application + uses: Azure/k8s-deploy@v4.0 + continue-on-error: true + id: deploy + with: + action: deploy + manifests: ${{ steps.bake.outputs.manifestsBundle }} + images: | + host.minikube.internal:5001/testapp + - name: Wait for rollout + continue-on-error: true + id: rollout + run: | + kubectl rollout status deployment/testapp --timeout=2m + - name: Print K8s Objects + run: | + kubectl get po -o json + kubectl get svc -o json + kubectl get deploy -o json + - name: Curl Endpoint + run: | + kubectl get svc + echo 'Starting minikube tunnel' + minikube tunnel > /dev/null 2>&1 & tunnelPID=$! + sleep 120 + kubectl get svc + SERVICEIP=$(kubectl get svc -o jsonpath={'.items[1].status.loadBalancer.ingress[0].ip'}) + echo "SERVICEIP: $SERVICEIP" + echo 'Curling service IP' + curl -m 3 $SERVICEIP:80 + kill $tunnelPID + - run: ./draft -v generate-workflow -d ./langtest/ --deploy-type kustomize --variable WORKFLOWNAME=someWorkflow --variable BRANCHNAME=main --variable ACRRESOURCEGROUP=someAcrResourceGroup --variable AZURECONTAINERREGISTRY=someRegistry --variable CONTAINERNAME=someContainer --variable CLUSTERRESOURCEGROUP=someClusterResourceGroup --variable CLUSTERNAME=someAksCluster --variable DOCKERFILE=./Dockerfile --variable BUILDCONTEXTPATH=. --variable NAMESPACE=default + # Validate generated workflow yaml + - name: Install action-validator with asdf + uses: asdf-vm/actions/install@v1 + with: + tool_versions: | + action-validator 0.1.2 + - name: Lint Actions + run: | + find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) | xargs -I {} action-validator --verbose {} + - name: Execute dry run for update command + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/update_dry_run_schema.json -d test/temp/update_dry_run.json + - run: ./draft -v update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Check default namespace + if: steps.deploy.outcome != 'success' + run: kubectl get po + - name: Fail if any error + if: steps.deploy.outcome != 'success' + run: exit 6 + + ruby-manifest-dry-run: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: davidgamero/sinatra-hello-world + path: ./langtest + - name: Execute Dry Run with config file + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -c ./test/integration/ruby/manifest.yaml -d ./langtest/ --skip-file-detection + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + - name: Execute Dry Run with variables passed through flag + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -d ./langtest/ -l ruby --skip-file-detection --deploy-type manifests --variable PORT=8080 --variable APPNAME=testingCreateCommand --variable VERSION=1.11 --variable BUILDERVERSION=1.11 --variable SERVICEPORT=8080 --variable NAMESPACE=testNamespace --variable IMAGENAME=testImage --variable IMAGETAG=latest + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + ruby-manifests-create: + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5001:5000 + needs: ruby-manifest-dry-run + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: davidgamero/sinatra-hello-world + path: ./langtest + - run: rm -rf ./langtest/manifests && rm -f ./langtest/Dockerfile ./langtest/.dockerignore + - run: ./draft -v create -c ./test/integration/ruby/manifest.yaml -d ./langtest/ + - name: print manifests + run: cat ./langtest/manifests/* + - name: Add docker.local host to /etc/hosts + run: | + sudo echo "127.0.0.1 docker.local" | sudo tee -a /etc/hosts + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + with: + insecure-registry: 'host.minikube.internal:5001,10.0.0.0/24' + - name: Build and Push Image + continue-on-error: true + run: | + eval $(minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + docker tag testapp host.minikube.internal:5001/testapp + echo -n "verifying images:" + docker images + docker push host.minikube.internal:5001/testapp + echo 'Curling host.minikube.internal test app images from minikube' + minikube ssh "curl http://host.minikube.internal:5001/v2/testapp/tags/list" + # Deploys application based on manifest files from previous step + - name: Deploy application + run: kubectl apply -f ./langtest/manifests/ + continue-on-error: true + id: deploy + - name: Wait for rollout + continue-on-error: true + id: rollout + run: | + kubectl rollout status deployment/testapp --timeout=2m + - name: Print K8s Objects + run: | + kubectl get po -o json + kubectl get svc -o json + kubectl get deploy -o json + - name: Curl Endpoint + run: | + kubectl get svc + echo 'Starting minikube tunnel' + minikube tunnel > /dev/null 2>&1 & tunnelPID=$! + sleep 120 + kubectl get svc + SERVICEIP=$(kubectl get svc -o jsonpath={'.items[1].status.loadBalancer.ingress[0].ip'}) + echo "SERVICEIP: $SERVICEIP" + echo 'Curling service IP' + curl -m 3 $SERVICEIP:80 + kill $tunnelPID + - run: ./draft -v generate-workflow -d ./langtest/ --deploy-type manifests --variable WORKFLOWNAME=someWorkflow --variable BRANCHNAME=main --variable ACRRESOURCEGROUP=someAcrResourceGroup --variable AZURECONTAINERREGISTRY=someRegistry --variable CONTAINERNAME=someContainer --variable CLUSTERRESOURCEGROUP=someClusterResourceGroup --variable CLUSTERNAME=someAksCluster --variable DOCKERFILE=./Dockerfile --variable BUILDCONTEXTPATH=. --variable NAMESPACE=default + # Validate generated workflow yaml + - name: Install action-validator with asdf + uses: asdf-vm/actions/install@v1 + with: + tool_versions: | + action-validator 0.1.2 + - name: Lint Actions + run: | + find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) | xargs -I {} action-validator --verbose {} + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + with: + name: ruby-manifests-create + path: | + ./langtest + !./langtest/**/.git/* + - name: Fail if any error + if: steps.deploy.outcome != 'success' || steps.rollout.outcome != 'success' + run: exit 6 + ruby-manifest-update: + needs: ruby-manifests-create + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5000:5000 + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: ruby-manifests-create + path: ./langtest/ + - name: Execute dry run for update command + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/update_dry_run_schema.json -d test/temp/update_dry_run.json + - run: ./draft -v update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + - name: Build image + run: | + export SHELL=/bin/bash + eval $(minikube -p minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + echo -n verifying images: + docker images + # Deploys application based on manifest files from previous step + - name: Deploy application + run: kubectl apply -f ./langtest/manifests/ + continue-on-error: true + id: deploy + - name: Check default namespace + if: steps.deploy.outcome != 'success' + run: kubectl get po + - name: Fail if any error + if: steps.deploy.outcome != 'success' + run: exit 6 + + csharp-helm-dry-run: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: imiller31/csharp-simple-web-app + path: ./langtest + - name: Execute Dry Run with config file + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -c ./test/integration/csharp/helm.yaml -d ./langtest/ --skip-file-detection + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + - name: Execute Dry Run with variables passed through flag + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -d ./langtest/ -l csharp --skip-file-detection --deploy-type helm --variable PORT=8080 --variable APPNAME=testingCreateCommand --variable VERSION=1.11 --variable BUILDERVERSION=1.11 --variable SERVICEPORT=8080 --variable NAMESPACE=testNamespace --variable IMAGENAME=testImage --variable IMAGETAG=latest + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + csharp-helm-create-update: + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5001:5000 + needs: csharp-helm-dry-run + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: imiller31/csharp-simple-web-app + path: ./langtest + - run: rm -rf ./langtest/manifests && rm -f ./langtest/Dockerfile ./langtest/.dockerignore + - run: ./draft -v create -c ./test/integration/csharp/helm.yaml -d ./langtest/ + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + with: + insecure-registry: 'host.minikube.internal:5001,10.0.0.0/24' + # Runs Helm to create manifest files + - name: Bake deployment + uses: azure/k8s-bake@v2.2 + with: + renderEngine: 'helm' + helmChart: ./langtest/charts + overrideFiles: ./langtest/charts/values.yaml + overrides: | + replicas:2 + helm-version: 'latest' + releaseName: 'test-release' + id: bake + - name: Build and Push image + continue-on-error: true + run: | + export SHELL=/bin/bash + eval $(minikube -p minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + docker tag testapp host.minikube.internal:5001/testapp + echo -n "verifying images:" + docker images + docker push host.minikube.internal:5001/testapp + echo 'Curling host.minikube.internal test app images from minikube' + minikube ssh "curl http://host.minikube.internal:5001/v2/testapp/tags/list" + # Deploys application based on manifest files from previous step + - name: Deploy application + uses: Azure/k8s-deploy@v4.0 + continue-on-error: true + id: deploy + with: + action: deploy + manifests: ${{ steps.bake.outputs.manifestsBundle }} + images: | + host.minikube.internal:5001/testapp + - name: Wait for rollout + continue-on-error: true + id: rollout + run: | + kubectl rollout status deployment/test-release-testapp --timeout=2m + - name: Print K8s Objects + run: | + kubectl get po -o json + kubectl get svc -o json + kubectl get deploy -o json + - name: Curl Endpoint + run: | + kubectl get svc + echo 'Starting minikube tunnel' + minikube tunnel > /dev/null 2>&1 & tunnelPID=$! + sleep 120 + kubectl get svc + SERVICEIP=$(kubectl get svc -o jsonpath={'.items[1].status.loadBalancer.ingress[0].ip'}) + echo "SERVICEIP: $SERVICEIP" + echo 'Curling service IP' + curl -m 3 $SERVICEIP:80 + kill $tunnelPID + - run: | + ./draft -v generate-workflow -d ./langtest/ --deploy-type helm --variable WORKFLOWNAME=someWorkflow --variable BRANCHNAME=main --variable ACRRESOURCEGROUP=someAcrResourceGroup --variable AZURECONTAINERREGISTRY=someRegistry --variable CONTAINERNAME=someContainer --variable CLUSTERRESOURCEGROUP=someClusterResourceGroup --variable CLUSTERNAME=someAksCluster --variable DOCKERFILE=./Dockerfile --variable BUILDCONTEXTPATH=. --variable NAMESPACE=default + pwd + # Validate generated workflow yaml + - name: Install action-validator with asdf + uses: asdf-vm/actions/install@v1 + with: + tool_versions: | + action-validator 0.1.2 + - name: Lint Actions + run: | + find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) | xargs -I {} action-validator --verbose {} + - name: Execute dry run for update command + run: | + mkdir -p test/temp + pwd + ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/update_dry_run_schema.json -d test/temp/update_dry_run.json + - run: ./draft -v update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Check default namespace + if: steps.deploy.outcome != 'success' + run: kubectl get po + - name: Fail if any error + if: steps.deploy.outcome != 'success' + run: exit 6 + + csharp-kustomize-dry-run: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: imiller31/csharp-simple-web-app + path: ./langtest + - name: Execute Dry Run with config file + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -c ./test/integration/csharp/kustomize.yaml -d ./langtest/ --skip-file-detection + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + - name: Execute Dry Run with variables passed through flag + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -d ./langtest/ -l csharp --skip-file-detection --deploy-type kustomize --variable PORT=8080 --variable APPNAME=testingCreateCommand --variable VERSION=1.11 --variable BUILDERVERSION=1.11 --variable SERVICEPORT=8080 --variable NAMESPACE=testNamespace --variable IMAGENAME=testImage --variable IMAGETAG=latest + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + csharp-kustomize-create-update: + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5001:5000 + needs: csharp-kustomize-dry-run + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: imiller31/csharp-simple-web-app + path: ./langtest + - run: rm -rf ./langtest/manifests && rm -f ./langtest/Dockerfile ./langtest/.dockerignore + - run: ./draft -v create -c ./test/integration/csharp/kustomize.yaml -d ./langtest/ + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + with: + insecure-registry: 'host.minikube.internal:5001,10.0.0.0/24' + - name: Bake deployment + uses: azure/k8s-bake@v2.4 + id: bake + with: + renderEngine: 'kustomize' + kustomizationPath: ./langtest/base + kubectl-version: 'latest' + - name: Build and Push Image + continue-on-error: true + run: | + eval $(minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + docker tag testapp host.minikube.internal:5001/testapp + echo -n "verifying images:" + docker images + docker push host.minikube.internal:5001/testapp + echo 'Curling host.minikube.internal test app images from minikube' + minikube ssh "curl http://host.minikube.internal:5001/v2/testapp/tags/list" + # Deploys application based on manifest files from previous step + - name: Deploy application + uses: Azure/k8s-deploy@v4.0 + continue-on-error: true + id: deploy + with: + action: deploy + manifests: ${{ steps.bake.outputs.manifestsBundle }} + images: | + host.minikube.internal:5001/testapp + - name: Wait for rollout + continue-on-error: true + id: rollout + run: | + kubectl rollout status deployment/testapp --timeout=2m + - name: Print K8s Objects + run: | + kubectl get po -o json + kubectl get svc -o json + kubectl get deploy -o json + - name: Curl Endpoint + run: | + kubectl get svc + echo 'Starting minikube tunnel' + minikube tunnel > /dev/null 2>&1 & tunnelPID=$! + sleep 120 + kubectl get svc + SERVICEIP=$(kubectl get svc -o jsonpath={'.items[1].status.loadBalancer.ingress[0].ip'}) + echo "SERVICEIP: $SERVICEIP" + echo 'Curling service IP' + curl -m 3 $SERVICEIP:80 + kill $tunnelPID + - run: ./draft -v generate-workflow -d ./langtest/ --deploy-type kustomize --variable WORKFLOWNAME=someWorkflow --variable BRANCHNAME=main --variable ACRRESOURCEGROUP=someAcrResourceGroup --variable AZURECONTAINERREGISTRY=someRegistry --variable CONTAINERNAME=someContainer --variable CLUSTERRESOURCEGROUP=someClusterResourceGroup --variable CLUSTERNAME=someAksCluster --variable DOCKERFILE=./Dockerfile --variable BUILDCONTEXTPATH=. --variable NAMESPACE=default + # Validate generated workflow yaml + - name: Install action-validator with asdf + uses: asdf-vm/actions/install@v1 + with: + tool_versions: | + action-validator 0.1.2 + - name: Lint Actions + run: | + find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) | xargs -I {} action-validator --verbose {} + - name: Execute dry run for update command + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/update_dry_run_schema.json -d test/temp/update_dry_run.json + - run: ./draft -v update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Check default namespace + if: steps.deploy.outcome != 'success' + run: kubectl get po + - name: Fail if any error + if: steps.deploy.outcome != 'success' + run: exit 6 + + csharp-manifest-dry-run: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: imiller31/csharp-simple-web-app + path: ./langtest + - name: Execute Dry Run with config file + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -c ./test/integration/csharp/manifest.yaml -d ./langtest/ --skip-file-detection + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + - name: Execute Dry Run with variables passed through flag + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -d ./langtest/ -l csharp --skip-file-detection --deploy-type manifests --variable PORT=8080 --variable APPNAME=testingCreateCommand --variable VERSION=1.11 --variable BUILDERVERSION=1.11 --variable SERVICEPORT=8080 --variable NAMESPACE=testNamespace --variable IMAGENAME=testImage --variable IMAGETAG=latest + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + csharp-manifests-create: + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5001:5000 + needs: csharp-manifest-dry-run + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: imiller31/csharp-simple-web-app + path: ./langtest + - run: rm -rf ./langtest/manifests && rm -f ./langtest/Dockerfile ./langtest/.dockerignore + - run: ./draft -v create -c ./test/integration/csharp/manifest.yaml -d ./langtest/ + - name: print manifests + run: cat ./langtest/manifests/* + - name: Add docker.local host to /etc/hosts + run: | + sudo echo "127.0.0.1 docker.local" | sudo tee -a /etc/hosts + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + with: + insecure-registry: 'host.minikube.internal:5001,10.0.0.0/24' + - name: Build and Push Image + continue-on-error: true + run: | + eval $(minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + docker tag testapp host.minikube.internal:5001/testapp + echo -n "verifying images:" + docker images + docker push host.minikube.internal:5001/testapp + echo 'Curling host.minikube.internal test app images from minikube' + minikube ssh "curl http://host.minikube.internal:5001/v2/testapp/tags/list" + # Deploys application based on manifest files from previous step + - name: Deploy application + run: kubectl apply -f ./langtest/manifests/ + continue-on-error: true + id: deploy + - name: Wait for rollout + continue-on-error: true + id: rollout + run: | + kubectl rollout status deployment/testapp --timeout=2m + - name: Print K8s Objects + run: | + kubectl get po -o json + kubectl get svc -o json + kubectl get deploy -o json + - name: Curl Endpoint + run: | + kubectl get svc + echo 'Starting minikube tunnel' + minikube tunnel > /dev/null 2>&1 & tunnelPID=$! + sleep 120 + kubectl get svc + SERVICEIP=$(kubectl get svc -o jsonpath={'.items[1].status.loadBalancer.ingress[0].ip'}) + echo "SERVICEIP: $SERVICEIP" + echo 'Curling service IP' + curl -m 3 $SERVICEIP:80 + kill $tunnelPID + - run: ./draft -v generate-workflow -d ./langtest/ --deploy-type manifests --variable WORKFLOWNAME=someWorkflow --variable BRANCHNAME=main --variable ACRRESOURCEGROUP=someAcrResourceGroup --variable AZURECONTAINERREGISTRY=someRegistry --variable CONTAINERNAME=someContainer --variable CLUSTERRESOURCEGROUP=someClusterResourceGroup --variable CLUSTERNAME=someAksCluster --variable DOCKERFILE=./Dockerfile --variable BUILDCONTEXTPATH=. --variable NAMESPACE=default + # Validate generated workflow yaml + - name: Install action-validator with asdf + uses: asdf-vm/actions/install@v1 + with: + tool_versions: | + action-validator 0.1.2 + - name: Lint Actions + run: | + find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) | xargs -I {} action-validator --verbose {} + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + with: + name: csharp-manifests-create + path: | + ./langtest + !./langtest/**/.git/* + - name: Fail if any error + if: steps.deploy.outcome != 'success' || steps.rollout.outcome != 'success' + run: exit 6 + csharp-manifest-update: + needs: csharp-manifests-create + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5000:5000 + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: csharp-manifests-create + path: ./langtest/ + - name: Execute dry run for update command + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/update_dry_run_schema.json -d test/temp/update_dry_run.json + - run: ./draft -v update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + - name: Build image + run: | + export SHELL=/bin/bash + eval $(minikube -p minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + echo -n verifying images: + docker images + # Deploys application based on manifest files from previous step + - name: Deploy application + run: kubectl apply -f ./langtest/manifests/ + continue-on-error: true + id: deploy + - name: Check default namespace + if: steps.deploy.outcome != 'success' + run: kubectl get po + - name: Fail if any error + if: steps.deploy.outcome != 'success' + run: exit 6 + + java-helm-dry-run: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: imiller31/simple-java-server + path: ./langtest + - name: Execute Dry Run with config file + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -c ./test/integration/java/helm.yaml -d ./langtest/ --skip-file-detection + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + - name: Execute Dry Run with variables passed through flag + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -d ./langtest/ -l java --skip-file-detection --deploy-type helm --variable PORT=8080 --variable APPNAME=testingCreateCommand --variable VERSION=1.11 --variable BUILDERVERSION=1.11 --variable SERVICEPORT=8080 --variable NAMESPACE=testNamespace --variable IMAGENAME=testImage --variable IMAGETAG=latest + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + java-helm-create-update: + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5001:5000 + needs: java-helm-dry-run + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: imiller31/simple-java-server + path: ./langtest + - run: rm -rf ./langtest/manifests && rm -f ./langtest/Dockerfile ./langtest/.dockerignore + - run: ./draft -v create -c ./test/integration/java/helm.yaml -d ./langtest/ + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + with: + insecure-registry: 'host.minikube.internal:5001,10.0.0.0/24' + # Runs Helm to create manifest files + - name: Bake deployment + uses: azure/k8s-bake@v2.2 + with: + renderEngine: 'helm' + helmChart: ./langtest/charts + overrideFiles: ./langtest/charts/values.yaml + overrides: | + replicas:2 + helm-version: 'latest' + releaseName: 'test-release' + id: bake + - name: Build and Push image + continue-on-error: true + run: | + export SHELL=/bin/bash + eval $(minikube -p minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + docker tag testapp host.minikube.internal:5001/testapp + echo -n "verifying images:" + docker images + docker push host.minikube.internal:5001/testapp + echo 'Curling host.minikube.internal test app images from minikube' + minikube ssh "curl http://host.minikube.internal:5001/v2/testapp/tags/list" + # Deploys application based on manifest files from previous step + - name: Deploy application + uses: Azure/k8s-deploy@v4.0 + continue-on-error: true + id: deploy + with: + action: deploy + manifests: ${{ steps.bake.outputs.manifestsBundle }} + images: | + host.minikube.internal:5001/testapp + - name: Wait for rollout + continue-on-error: true + id: rollout + run: | + kubectl rollout status deployment/test-release-testapp --timeout=2m + - name: Print K8s Objects + run: | + kubectl get po -o json + kubectl get svc -o json + kubectl get deploy -o json + - name: Curl Endpoint + run: | + kubectl get svc + echo 'Starting minikube tunnel' + minikube tunnel > /dev/null 2>&1 & tunnelPID=$! + sleep 120 + kubectl get svc + SERVICEIP=$(kubectl get svc -o jsonpath={'.items[1].status.loadBalancer.ingress[0].ip'}) + echo "SERVICEIP: $SERVICEIP" + echo 'Curling service IP' + curl -m 3 $SERVICEIP:80 + kill $tunnelPID + - run: | + ./draft -v generate-workflow -d ./langtest/ --deploy-type helm --variable WORKFLOWNAME=someWorkflow --variable BRANCHNAME=main --variable ACRRESOURCEGROUP=someAcrResourceGroup --variable AZURECONTAINERREGISTRY=someRegistry --variable CONTAINERNAME=someContainer --variable CLUSTERRESOURCEGROUP=someClusterResourceGroup --variable CLUSTERNAME=someAksCluster --variable DOCKERFILE=./Dockerfile --variable BUILDCONTEXTPATH=. --variable NAMESPACE=default + pwd + # Validate generated workflow yaml + - name: Install action-validator with asdf + uses: asdf-vm/actions/install@v1 + with: + tool_versions: | + action-validator 0.1.2 + - name: Lint Actions + run: | + find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) | xargs -I {} action-validator --verbose {} + - name: Execute dry run for update command + run: | + mkdir -p test/temp + pwd + ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/update_dry_run_schema.json -d test/temp/update_dry_run.json + - run: ./draft -v update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Check default namespace + if: steps.deploy.outcome != 'success' + run: kubectl get po + - name: Fail if any error + if: steps.deploy.outcome != 'success' + run: exit 6 + + java-kustomize-dry-run: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: imiller31/simple-java-server + path: ./langtest + - name: Execute Dry Run with config file + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -c ./test/integration/java/kustomize.yaml -d ./langtest/ --skip-file-detection + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + - name: Execute Dry Run with variables passed through flag + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -d ./langtest/ -l java --skip-file-detection --deploy-type kustomize --variable PORT=8080 --variable APPNAME=testingCreateCommand --variable VERSION=1.11 --variable BUILDERVERSION=1.11 --variable SERVICEPORT=8080 --variable NAMESPACE=testNamespace --variable IMAGENAME=testImage --variable IMAGETAG=latest + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + java-kustomize-create-update: + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5001:5000 + needs: java-kustomize-dry-run + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: imiller31/simple-java-server + path: ./langtest + - run: rm -rf ./langtest/manifests && rm -f ./langtest/Dockerfile ./langtest/.dockerignore + - run: ./draft -v create -c ./test/integration/java/kustomize.yaml -d ./langtest/ + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + with: + insecure-registry: 'host.minikube.internal:5001,10.0.0.0/24' + - name: Bake deployment + uses: azure/k8s-bake@v2.4 + id: bake + with: + renderEngine: 'kustomize' + kustomizationPath: ./langtest/base + kubectl-version: 'latest' + - name: Build and Push Image + continue-on-error: true + run: | + eval $(minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + docker tag testapp host.minikube.internal:5001/testapp + echo -n "verifying images:" + docker images + docker push host.minikube.internal:5001/testapp + echo 'Curling host.minikube.internal test app images from minikube' + minikube ssh "curl http://host.minikube.internal:5001/v2/testapp/tags/list" + # Deploys application based on manifest files from previous step + - name: Deploy application + uses: Azure/k8s-deploy@v4.0 + continue-on-error: true + id: deploy + with: + action: deploy + manifests: ${{ steps.bake.outputs.manifestsBundle }} + images: | + host.minikube.internal:5001/testapp + - name: Wait for rollout + continue-on-error: true + id: rollout + run: | + kubectl rollout status deployment/testapp --timeout=2m + - name: Print K8s Objects + run: | + kubectl get po -o json + kubectl get svc -o json + kubectl get deploy -o json + - name: Curl Endpoint + run: | + kubectl get svc + echo 'Starting minikube tunnel' + minikube tunnel > /dev/null 2>&1 & tunnelPID=$! + sleep 120 + kubectl get svc + SERVICEIP=$(kubectl get svc -o jsonpath={'.items[1].status.loadBalancer.ingress[0].ip'}) + echo "SERVICEIP: $SERVICEIP" + echo 'Curling service IP' + curl -m 3 $SERVICEIP:80 + kill $tunnelPID + - run: ./draft -v generate-workflow -d ./langtest/ --deploy-type kustomize --variable WORKFLOWNAME=someWorkflow --variable BRANCHNAME=main --variable ACRRESOURCEGROUP=someAcrResourceGroup --variable AZURECONTAINERREGISTRY=someRegistry --variable CONTAINERNAME=someContainer --variable CLUSTERRESOURCEGROUP=someClusterResourceGroup --variable CLUSTERNAME=someAksCluster --variable DOCKERFILE=./Dockerfile --variable BUILDCONTEXTPATH=. --variable NAMESPACE=default + # Validate generated workflow yaml + - name: Install action-validator with asdf + uses: asdf-vm/actions/install@v1 + with: + tool_versions: | + action-validator 0.1.2 + - name: Lint Actions + run: | + find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) | xargs -I {} action-validator --verbose {} + - name: Execute dry run for update command + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/update_dry_run_schema.json -d test/temp/update_dry_run.json + - run: ./draft -v update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Check default namespace + if: steps.deploy.outcome != 'success' + run: kubectl get po + - name: Fail if any error + if: steps.deploy.outcome != 'success' + run: exit 6 + + java-manifest-dry-run: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: imiller31/simple-java-server + path: ./langtest + - name: Execute Dry Run with config file + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -c ./test/integration/java/manifest.yaml -d ./langtest/ --skip-file-detection + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + - name: Execute Dry Run with variables passed through flag + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -d ./langtest/ -l java --skip-file-detection --deploy-type manifests --variable PORT=8080 --variable APPNAME=testingCreateCommand --variable VERSION=1.11 --variable BUILDERVERSION=1.11 --variable SERVICEPORT=8080 --variable NAMESPACE=testNamespace --variable IMAGENAME=testImage --variable IMAGETAG=latest + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + java-manifests-create: + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5001:5000 + needs: java-manifest-dry-run + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: imiller31/simple-java-server + path: ./langtest + - run: rm -rf ./langtest/manifests && rm -f ./langtest/Dockerfile ./langtest/.dockerignore + - run: ./draft -v create -c ./test/integration/java/manifest.yaml -d ./langtest/ + - name: print manifests + run: cat ./langtest/manifests/* + - name: Add docker.local host to /etc/hosts + run: | + sudo echo "127.0.0.1 docker.local" | sudo tee -a /etc/hosts + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + with: + insecure-registry: 'host.minikube.internal:5001,10.0.0.0/24' + - name: Build and Push Image + continue-on-error: true + run: | + eval $(minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + docker tag testapp host.minikube.internal:5001/testapp + echo -n "verifying images:" + docker images + docker push host.minikube.internal:5001/testapp + echo 'Curling host.minikube.internal test app images from minikube' + minikube ssh "curl http://host.minikube.internal:5001/v2/testapp/tags/list" + # Deploys application based on manifest files from previous step + - name: Deploy application + run: kubectl apply -f ./langtest/manifests/ + continue-on-error: true + id: deploy + - name: Wait for rollout + continue-on-error: true + id: rollout + run: | + kubectl rollout status deployment/testapp --timeout=2m + - name: Print K8s Objects + run: | + kubectl get po -o json + kubectl get svc -o json + kubectl get deploy -o json + - name: Curl Endpoint + run: | + kubectl get svc + echo 'Starting minikube tunnel' + minikube tunnel > /dev/null 2>&1 & tunnelPID=$! + sleep 120 + kubectl get svc + SERVICEIP=$(kubectl get svc -o jsonpath={'.items[1].status.loadBalancer.ingress[0].ip'}) + echo "SERVICEIP: $SERVICEIP" + echo 'Curling service IP' + curl -m 3 $SERVICEIP:80 + kill $tunnelPID + - run: ./draft -v generate-workflow -d ./langtest/ --deploy-type manifests --variable WORKFLOWNAME=someWorkflow --variable BRANCHNAME=main --variable ACRRESOURCEGROUP=someAcrResourceGroup --variable AZURECONTAINERREGISTRY=someRegistry --variable CONTAINERNAME=someContainer --variable CLUSTERRESOURCEGROUP=someClusterResourceGroup --variable CLUSTERNAME=someAksCluster --variable DOCKERFILE=./Dockerfile --variable BUILDCONTEXTPATH=. --variable NAMESPACE=default + # Validate generated workflow yaml + - name: Install action-validator with asdf + uses: asdf-vm/actions/install@v1 + with: + tool_versions: | + action-validator 0.1.2 + - name: Lint Actions + run: | + find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) | xargs -I {} action-validator --verbose {} + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + with: + name: java-manifests-create + path: | + ./langtest + !./langtest/**/.git/* + - name: Fail if any error + if: steps.deploy.outcome != 'success' || steps.rollout.outcome != 'success' + run: exit 6 + java-manifest-update: + needs: java-manifests-create + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5000:5000 + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: java-manifests-create + path: ./langtest/ + - name: Execute dry run for update command + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/update_dry_run_schema.json -d test/temp/update_dry_run.json + - run: ./draft -v update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + - name: Build image + run: | + export SHELL=/bin/bash + eval $(minikube -p minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + echo -n verifying images: + docker images + # Deploys application based on manifest files from previous step + - name: Deploy application + run: kubectl apply -f ./langtest/manifests/ + continue-on-error: true + id: deploy + - name: Check default namespace + if: steps.deploy.outcome != 'success' + run: kubectl get po + - name: Fail if any error + if: steps.deploy.outcome != 'success' + run: exit 6 + + gradle-helm-dry-run: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: imiller31/simple-gradle-server + path: ./langtest + - name: Execute Dry Run with config file + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -c ./test/integration/gradle/helm.yaml -d ./langtest/ --skip-file-detection + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + - name: Execute Dry Run with variables passed through flag + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -d ./langtest/ -l gradle --skip-file-detection --deploy-type helm --variable PORT=8080 --variable APPNAME=testingCreateCommand --variable VERSION=1.11 --variable BUILDERVERSION=1.11 --variable SERVICEPORT=8080 --variable NAMESPACE=testNamespace --variable IMAGENAME=testImage --variable IMAGETAG=latest + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + gradle-helm-create-update: + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5001:5000 + needs: gradle-helm-dry-run + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: imiller31/simple-gradle-server + path: ./langtest + - run: rm -rf ./langtest/manifests && rm -f ./langtest/Dockerfile ./langtest/.dockerignore + - run: ./draft -v create -c ./test/integration/gradle/helm.yaml -d ./langtest/ + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + with: + insecure-registry: 'host.minikube.internal:5001,10.0.0.0/24' + # Runs Helm to create manifest files + - name: Bake deployment + uses: azure/k8s-bake@v2.2 + with: + renderEngine: 'helm' + helmChart: ./langtest/charts + overrideFiles: ./langtest/charts/values.yaml + overrides: | + replicas:2 + helm-version: 'latest' + releaseName: 'test-release' + id: bake + - name: Build and Push image + continue-on-error: true + run: | + export SHELL=/bin/bash + eval $(minikube -p minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + docker tag testapp host.minikube.internal:5001/testapp + echo -n "verifying images:" + docker images + docker push host.minikube.internal:5001/testapp + echo 'Curling host.minikube.internal test app images from minikube' + minikube ssh "curl http://host.minikube.internal:5001/v2/testapp/tags/list" + # Deploys application based on manifest files from previous step + - name: Deploy application + uses: Azure/k8s-deploy@v4.0 + continue-on-error: true + id: deploy + with: + action: deploy + manifests: ${{ steps.bake.outputs.manifestsBundle }} + images: | + host.minikube.internal:5001/testapp + - name: Wait for rollout + continue-on-error: true + id: rollout + run: | + kubectl rollout status deployment/test-release-testapp --timeout=2m + - name: Print K8s Objects + run: | + kubectl get po -o json + kubectl get svc -o json + kubectl get deploy -o json + - name: Curl Endpoint + run: | + kubectl get svc + echo 'Starting minikube tunnel' + minikube tunnel > /dev/null 2>&1 & tunnelPID=$! + sleep 120 + kubectl get svc + SERVICEIP=$(kubectl get svc -o jsonpath={'.items[1].status.loadBalancer.ingress[0].ip'}) + echo "SERVICEIP: $SERVICEIP" + echo 'Curling service IP' + curl -m 3 $SERVICEIP:80 + kill $tunnelPID + - run: | + ./draft -v generate-workflow -d ./langtest/ --deploy-type helm --variable WORKFLOWNAME=someWorkflow --variable BRANCHNAME=main --variable ACRRESOURCEGROUP=someAcrResourceGroup --variable AZURECONTAINERREGISTRY=someRegistry --variable CONTAINERNAME=someContainer --variable CLUSTERRESOURCEGROUP=someClusterResourceGroup --variable CLUSTERNAME=someAksCluster --variable DOCKERFILE=./Dockerfile --variable BUILDCONTEXTPATH=. --variable NAMESPACE=default + pwd + # Validate generated workflow yaml + - name: Install action-validator with asdf + uses: asdf-vm/actions/install@v1 + with: + tool_versions: | + action-validator 0.1.2 + - name: Lint Actions + run: | + find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) | xargs -I {} action-validator --verbose {} + - name: Execute dry run for update command + run: | + mkdir -p test/temp + pwd + ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/update_dry_run_schema.json -d test/temp/update_dry_run.json + - run: ./draft -v update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Check default namespace + if: steps.deploy.outcome != 'success' + run: kubectl get po + - name: Fail if any error + if: steps.deploy.outcome != 'success' + run: exit 6 + + gradle-kustomize-dry-run: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: imiller31/simple-gradle-server + path: ./langtest + - name: Execute Dry Run with config file + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -c ./test/integration/gradle/kustomize.yaml -d ./langtest/ --skip-file-detection + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + - name: Execute Dry Run with variables passed through flag + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -d ./langtest/ -l gradle --skip-file-detection --deploy-type kustomize --variable PORT=8080 --variable APPNAME=testingCreateCommand --variable VERSION=1.11 --variable BUILDERVERSION=1.11 --variable SERVICEPORT=8080 --variable NAMESPACE=testNamespace --variable IMAGENAME=testImage --variable IMAGETAG=latest + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + gradle-kustomize-create-update: + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5001:5000 + needs: gradle-kustomize-dry-run + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: imiller31/simple-gradle-server + path: ./langtest + - run: rm -rf ./langtest/manifests && rm -f ./langtest/Dockerfile ./langtest/.dockerignore + - run: ./draft -v create -c ./test/integration/gradle/kustomize.yaml -d ./langtest/ + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + with: + insecure-registry: 'host.minikube.internal:5001,10.0.0.0/24' + - name: Bake deployment + uses: azure/k8s-bake@v2.4 + id: bake + with: + renderEngine: 'kustomize' + kustomizationPath: ./langtest/base + kubectl-version: 'latest' + - name: Build and Push Image + continue-on-error: true + run: | + eval $(minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + docker tag testapp host.minikube.internal:5001/testapp + echo -n "verifying images:" + docker images + docker push host.minikube.internal:5001/testapp + echo 'Curling host.minikube.internal test app images from minikube' + minikube ssh "curl http://host.minikube.internal:5001/v2/testapp/tags/list" + # Deploys application based on manifest files from previous step + - name: Deploy application + uses: Azure/k8s-deploy@v4.0 + continue-on-error: true + id: deploy + with: + action: deploy + manifests: ${{ steps.bake.outputs.manifestsBundle }} + images: | + host.minikube.internal:5001/testapp + - name: Wait for rollout + continue-on-error: true + id: rollout + run: | + kubectl rollout status deployment/testapp --timeout=2m + - name: Print K8s Objects + run: | + kubectl get po -o json + kubectl get svc -o json + kubectl get deploy -o json + - name: Curl Endpoint + run: | + kubectl get svc + echo 'Starting minikube tunnel' + minikube tunnel > /dev/null 2>&1 & tunnelPID=$! + sleep 120 + kubectl get svc + SERVICEIP=$(kubectl get svc -o jsonpath={'.items[1].status.loadBalancer.ingress[0].ip'}) + echo "SERVICEIP: $SERVICEIP" + echo 'Curling service IP' + curl -m 3 $SERVICEIP:80 + kill $tunnelPID + - run: ./draft -v generate-workflow -d ./langtest/ --deploy-type kustomize --variable WORKFLOWNAME=someWorkflow --variable BRANCHNAME=main --variable ACRRESOURCEGROUP=someAcrResourceGroup --variable AZURECONTAINERREGISTRY=someRegistry --variable CONTAINERNAME=someContainer --variable CLUSTERRESOURCEGROUP=someClusterResourceGroup --variable CLUSTERNAME=someAksCluster --variable DOCKERFILE=./Dockerfile --variable BUILDCONTEXTPATH=. --variable NAMESPACE=default + # Validate generated workflow yaml + - name: Install action-validator with asdf + uses: asdf-vm/actions/install@v1 + with: + tool_versions: | + action-validator 0.1.2 + - name: Lint Actions + run: | + find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) | xargs -I {} action-validator --verbose {} + - name: Execute dry run for update command + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/update_dry_run_schema.json -d test/temp/update_dry_run.json + - run: ./draft -v update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Check default namespace + if: steps.deploy.outcome != 'success' + run: kubectl get po + - name: Fail if any error + if: steps.deploy.outcome != 'success' + run: exit 6 + + gradle-manifest-dry-run: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: imiller31/simple-gradle-server + path: ./langtest + - name: Execute Dry Run with config file + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -c ./test/integration/gradle/manifest.yaml -d ./langtest/ --skip-file-detection + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + - name: Execute Dry Run with variables passed through flag + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -d ./langtest/ -l gradle --skip-file-detection --deploy-type manifests --variable PORT=8080 --variable APPNAME=testingCreateCommand --variable VERSION=1.11 --variable BUILDERVERSION=1.11 --variable SERVICEPORT=8080 --variable NAMESPACE=testNamespace --variable IMAGENAME=testImage --variable IMAGETAG=latest + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + gradle-manifests-create: + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5001:5000 + needs: gradle-manifest-dry-run + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: imiller31/simple-gradle-server + path: ./langtest + - run: rm -rf ./langtest/manifests && rm -f ./langtest/Dockerfile ./langtest/.dockerignore + - run: ./draft -v create -c ./test/integration/gradle/manifest.yaml -d ./langtest/ + - name: print manifests + run: cat ./langtest/manifests/* + - name: Add docker.local host to /etc/hosts + run: | + sudo echo "127.0.0.1 docker.local" | sudo tee -a /etc/hosts + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + with: + insecure-registry: 'host.minikube.internal:5001,10.0.0.0/24' + - name: Build and Push Image + continue-on-error: true + run: | + eval $(minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + docker tag testapp host.minikube.internal:5001/testapp + echo -n "verifying images:" + docker images + docker push host.minikube.internal:5001/testapp + echo 'Curling host.minikube.internal test app images from minikube' + minikube ssh "curl http://host.minikube.internal:5001/v2/testapp/tags/list" + # Deploys application based on manifest files from previous step + - name: Deploy application + run: kubectl apply -f ./langtest/manifests/ + continue-on-error: true + id: deploy + - name: Wait for rollout + continue-on-error: true + id: rollout + run: | + kubectl rollout status deployment/testapp --timeout=2m + - name: Print K8s Objects + run: | + kubectl get po -o json + kubectl get svc -o json + kubectl get deploy -o json + - name: Curl Endpoint + run: | + kubectl get svc + echo 'Starting minikube tunnel' + minikube tunnel > /dev/null 2>&1 & tunnelPID=$! + sleep 120 + kubectl get svc + SERVICEIP=$(kubectl get svc -o jsonpath={'.items[1].status.loadBalancer.ingress[0].ip'}) + echo "SERVICEIP: $SERVICEIP" + echo 'Curling service IP' + curl -m 3 $SERVICEIP:80 + kill $tunnelPID + - run: ./draft -v generate-workflow -d ./langtest/ --deploy-type manifests --variable WORKFLOWNAME=someWorkflow --variable BRANCHNAME=main --variable ACRRESOURCEGROUP=someAcrResourceGroup --variable AZURECONTAINERREGISTRY=someRegistry --variable CONTAINERNAME=someContainer --variable CLUSTERRESOURCEGROUP=someClusterResourceGroup --variable CLUSTERNAME=someAksCluster --variable DOCKERFILE=./Dockerfile --variable BUILDCONTEXTPATH=. --variable NAMESPACE=default + # Validate generated workflow yaml + - name: Install action-validator with asdf + uses: asdf-vm/actions/install@v1 + with: + tool_versions: | + action-validator 0.1.2 + - name: Lint Actions + run: | + find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) | xargs -I {} action-validator --verbose {} + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + with: + name: gradle-manifests-create + path: | + ./langtest + !./langtest/**/.git/* + - name: Fail if any error + if: steps.deploy.outcome != 'success' || steps.rollout.outcome != 'success' + run: exit 6 + gradle-manifest-update: + needs: gradle-manifests-create + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5000:5000 + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: gradle-manifests-create + path: ./langtest/ + - name: Execute dry run for update command + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/update_dry_run_schema.json -d test/temp/update_dry_run.json + - run: ./draft -v update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + - name: Build image + run: | + export SHELL=/bin/bash + eval $(minikube -p minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + echo -n verifying images: + docker images + # Deploys application based on manifest files from previous step + - name: Deploy application + run: kubectl apply -f ./langtest/manifests/ + continue-on-error: true + id: deploy + - name: Check default namespace + if: steps.deploy.outcome != 'success' + run: kubectl get po + - name: Fail if any error + if: steps.deploy.outcome != 'success' + run: exit 6 + + swift-helm-dry-run: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: OliverMKing/swift-hello-world + path: ./langtest + - name: Execute Dry Run with config file + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -c ./test/integration/swift/helm.yaml -d ./langtest/ --skip-file-detection + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + - name: Execute Dry Run with variables passed through flag + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -d ./langtest/ -l swift --skip-file-detection --deploy-type helm --variable PORT=8080 --variable APPNAME=testingCreateCommand --variable VERSION=1.11 --variable BUILDERVERSION=1.11 --variable SERVICEPORT=8080 --variable NAMESPACE=testNamespace --variable IMAGENAME=testImage --variable IMAGETAG=latest + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + swift-helm-create-update: + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5001:5000 + needs: swift-helm-dry-run + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: OliverMKing/swift-hello-world + path: ./langtest + - run: rm -rf ./langtest/manifests && rm -f ./langtest/Dockerfile ./langtest/.dockerignore + - run: ./draft -v create -c ./test/integration/swift/helm.yaml -d ./langtest/ + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + with: + insecure-registry: 'host.minikube.internal:5001,10.0.0.0/24' + # Runs Helm to create manifest files + - name: Bake deployment + uses: azure/k8s-bake@v2.2 + with: + renderEngine: 'helm' + helmChart: ./langtest/charts + overrideFiles: ./langtest/charts/values.yaml + overrides: | + replicas:2 + helm-version: 'latest' + releaseName: 'test-release' + id: bake + - name: Build and Push image + continue-on-error: true + run: | + export SHELL=/bin/bash + eval $(minikube -p minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + docker tag testapp host.minikube.internal:5001/testapp + echo -n "verifying images:" + docker images + docker push host.minikube.internal:5001/testapp + echo 'Curling host.minikube.internal test app images from minikube' + minikube ssh "curl http://host.minikube.internal:5001/v2/testapp/tags/list" + # Deploys application based on manifest files from previous step + - name: Deploy application + uses: Azure/k8s-deploy@v4.0 + continue-on-error: true + id: deploy + with: + action: deploy + manifests: ${{ steps.bake.outputs.manifestsBundle }} + images: | + host.minikube.internal:5001/testapp + - name: Wait for rollout + continue-on-error: true + id: rollout + run: | + kubectl rollout status deployment/test-release-testapp --timeout=2m + - name: Print K8s Objects + run: | + kubectl get po -o json + kubectl get svc -o json + kubectl get deploy -o json + - name: Curl Endpoint + run: | + kubectl get svc + echo 'Starting minikube tunnel' + minikube tunnel > /dev/null 2>&1 & tunnelPID=$! + sleep 120 + kubectl get svc + SERVICEIP=$(kubectl get svc -o jsonpath={'.items[1].status.loadBalancer.ingress[0].ip'}) + echo "SERVICEIP: $SERVICEIP" + echo 'Curling service IP' + curl -m 3 $SERVICEIP:80 + kill $tunnelPID + - run: | + ./draft -v generate-workflow -d ./langtest/ --deploy-type helm --variable WORKFLOWNAME=someWorkflow --variable BRANCHNAME=main --variable ACRRESOURCEGROUP=someAcrResourceGroup --variable AZURECONTAINERREGISTRY=someRegistry --variable CONTAINERNAME=someContainer --variable CLUSTERRESOURCEGROUP=someClusterResourceGroup --variable CLUSTERNAME=someAksCluster --variable DOCKERFILE=./Dockerfile --variable BUILDCONTEXTPATH=. --variable NAMESPACE=default + pwd + # Validate generated workflow yaml + - name: Install action-validator with asdf + uses: asdf-vm/actions/install@v1 + with: + tool_versions: | + action-validator 0.1.2 + - name: Lint Actions + run: | + find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) | xargs -I {} action-validator --verbose {} + - name: Execute dry run for update command + run: | + mkdir -p test/temp + pwd + ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/update_dry_run_schema.json -d test/temp/update_dry_run.json + - run: ./draft -v update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Check default namespace + if: steps.deploy.outcome != 'success' + run: kubectl get po + - name: Fail if any error + if: steps.deploy.outcome != 'success' + run: exit 6 + + swift-kustomize-dry-run: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: OliverMKing/swift-hello-world + path: ./langtest + - name: Execute Dry Run with config file + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -c ./test/integration/swift/kustomize.yaml -d ./langtest/ --skip-file-detection + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + - name: Execute Dry Run with variables passed through flag + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -d ./langtest/ -l swift --skip-file-detection --deploy-type kustomize --variable PORT=8080 --variable APPNAME=testingCreateCommand --variable VERSION=1.11 --variable BUILDERVERSION=1.11 --variable SERVICEPORT=8080 --variable NAMESPACE=testNamespace --variable IMAGENAME=testImage --variable IMAGETAG=latest + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + swift-kustomize-create-update: + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5001:5000 + needs: swift-kustomize-dry-run + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: OliverMKing/swift-hello-world + path: ./langtest + - run: rm -rf ./langtest/manifests && rm -f ./langtest/Dockerfile ./langtest/.dockerignore + - run: ./draft -v create -c ./test/integration/swift/kustomize.yaml -d ./langtest/ + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + with: + insecure-registry: 'host.minikube.internal:5001,10.0.0.0/24' + - name: Bake deployment + uses: azure/k8s-bake@v2.4 + id: bake + with: + renderEngine: 'kustomize' + kustomizationPath: ./langtest/base + kubectl-version: 'latest' + - name: Build and Push Image + continue-on-error: true + run: | + eval $(minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + docker tag testapp host.minikube.internal:5001/testapp + echo -n "verifying images:" + docker images + docker push host.minikube.internal:5001/testapp + echo 'Curling host.minikube.internal test app images from minikube' + minikube ssh "curl http://host.minikube.internal:5001/v2/testapp/tags/list" + # Deploys application based on manifest files from previous step + - name: Deploy application + uses: Azure/k8s-deploy@v4.0 + continue-on-error: true + id: deploy + with: + action: deploy + manifests: ${{ steps.bake.outputs.manifestsBundle }} + images: | + host.minikube.internal:5001/testapp + - name: Wait for rollout + continue-on-error: true + id: rollout + run: | + kubectl rollout status deployment/testapp --timeout=2m + - name: Print K8s Objects + run: | + kubectl get po -o json + kubectl get svc -o json + kubectl get deploy -o json + - name: Curl Endpoint + run: | + kubectl get svc + echo 'Starting minikube tunnel' + minikube tunnel > /dev/null 2>&1 & tunnelPID=$! + sleep 120 + kubectl get svc + SERVICEIP=$(kubectl get svc -o jsonpath={'.items[1].status.loadBalancer.ingress[0].ip'}) + echo "SERVICEIP: $SERVICEIP" + echo 'Curling service IP' + curl -m 3 $SERVICEIP:80 + kill $tunnelPID + - run: ./draft -v generate-workflow -d ./langtest/ --deploy-type kustomize --variable WORKFLOWNAME=someWorkflow --variable BRANCHNAME=main --variable ACRRESOURCEGROUP=someAcrResourceGroup --variable AZURECONTAINERREGISTRY=someRegistry --variable CONTAINERNAME=someContainer --variable CLUSTERRESOURCEGROUP=someClusterResourceGroup --variable CLUSTERNAME=someAksCluster --variable DOCKERFILE=./Dockerfile --variable BUILDCONTEXTPATH=. --variable NAMESPACE=default + # Validate generated workflow yaml + - name: Install action-validator with asdf + uses: asdf-vm/actions/install@v1 + with: + tool_versions: | + action-validator 0.1.2 + - name: Lint Actions + run: | + find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) | xargs -I {} action-validator --verbose {} + - name: Execute dry run for update command + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/update_dry_run_schema.json -d test/temp/update_dry_run.json + - run: ./draft -v update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Check default namespace + if: steps.deploy.outcome != 'success' + run: kubectl get po + - name: Fail if any error + if: steps.deploy.outcome != 'success' + run: exit 6 + + swift-manifest-dry-run: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: OliverMKing/swift-hello-world + path: ./langtest + - name: Execute Dry Run with config file + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -c ./test/integration/swift/manifest.yaml -d ./langtest/ --skip-file-detection + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + - name: Execute Dry Run with variables passed through flag + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -d ./langtest/ -l swift --skip-file-detection --deploy-type manifests --variable PORT=8080 --variable APPNAME=testingCreateCommand --variable VERSION=1.11 --variable BUILDERVERSION=1.11 --variable SERVICEPORT=8080 --variable NAMESPACE=testNamespace --variable IMAGENAME=testImage --variable IMAGETAG=latest + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + swift-manifests-create: + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5001:5000 + needs: swift-manifest-dry-run + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: OliverMKing/swift-hello-world + path: ./langtest + - run: rm -rf ./langtest/manifests && rm -f ./langtest/Dockerfile ./langtest/.dockerignore + - run: ./draft -v create -c ./test/integration/swift/manifest.yaml -d ./langtest/ + - name: print manifests + run: cat ./langtest/manifests/* + - name: Add docker.local host to /etc/hosts + run: | + sudo echo "127.0.0.1 docker.local" | sudo tee -a /etc/hosts + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + with: + insecure-registry: 'host.minikube.internal:5001,10.0.0.0/24' + - name: Build and Push Image + continue-on-error: true + run: | + eval $(minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + docker tag testapp host.minikube.internal:5001/testapp + echo -n "verifying images:" + docker images + docker push host.minikube.internal:5001/testapp + echo 'Curling host.minikube.internal test app images from minikube' + minikube ssh "curl http://host.minikube.internal:5001/v2/testapp/tags/list" + # Deploys application based on manifest files from previous step + - name: Deploy application + run: kubectl apply -f ./langtest/manifests/ + continue-on-error: true + id: deploy + - name: Wait for rollout + continue-on-error: true + id: rollout + run: | + kubectl rollout status deployment/testapp --timeout=2m + - name: Print K8s Objects + run: | + kubectl get po -o json + kubectl get svc -o json + kubectl get deploy -o json + - name: Curl Endpoint + run: | + kubectl get svc + echo 'Starting minikube tunnel' + minikube tunnel > /dev/null 2>&1 & tunnelPID=$! + sleep 120 + kubectl get svc + SERVICEIP=$(kubectl get svc -o jsonpath={'.items[1].status.loadBalancer.ingress[0].ip'}) + echo "SERVICEIP: $SERVICEIP" + echo 'Curling service IP' + curl -m 3 $SERVICEIP:80 + kill $tunnelPID + - run: ./draft -v generate-workflow -d ./langtest/ --deploy-type manifests --variable WORKFLOWNAME=someWorkflow --variable BRANCHNAME=main --variable ACRRESOURCEGROUP=someAcrResourceGroup --variable AZURECONTAINERREGISTRY=someRegistry --variable CONTAINERNAME=someContainer --variable CLUSTERRESOURCEGROUP=someClusterResourceGroup --variable CLUSTERNAME=someAksCluster --variable DOCKERFILE=./Dockerfile --variable BUILDCONTEXTPATH=. --variable NAMESPACE=default + # Validate generated workflow yaml + - name: Install action-validator with asdf + uses: asdf-vm/actions/install@v1 + with: + tool_versions: | + action-validator 0.1.2 + - name: Lint Actions + run: | + find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) | xargs -I {} action-validator --verbose {} + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + with: + name: swift-manifests-create + path: | + ./langtest + !./langtest/**/.git/* + - name: Fail if any error + if: steps.deploy.outcome != 'success' || steps.rollout.outcome != 'success' + run: exit 6 + swift-manifest-update: + needs: swift-manifests-create + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5000:5000 + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: swift-manifests-create + path: ./langtest/ + - name: Execute dry run for update command + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/update_dry_run_schema.json -d test/temp/update_dry_run.json + - run: ./draft -v update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + - name: Build image + run: | + export SHELL=/bin/bash + eval $(minikube -p minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + echo -n verifying images: + docker images + # Deploys application based on manifest files from previous step + - name: Deploy application + run: kubectl apply -f ./langtest/manifests/ + continue-on-error: true + id: deploy + - name: Check default namespace + if: steps.deploy.outcome != 'success' + run: kubectl get po + - name: Fail if any error + if: steps.deploy.outcome != 'success' + run: exit 6 + + erlang-helm-dry-run: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: bfoley13/ErlangExample + path: ./langtest + - name: Execute Dry Run with config file + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -c ./test/integration/erlang/helm.yaml -d ./langtest/ --skip-file-detection + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + - name: Execute Dry Run with variables passed through flag + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -d ./langtest/ -l erlang --skip-file-detection --deploy-type helm --variable PORT=8080 --variable APPNAME=testingCreateCommand --variable VERSION=1.11 --variable BUILDERVERSION=1.11 --variable SERVICEPORT=8080 --variable NAMESPACE=testNamespace --variable IMAGENAME=testImage --variable IMAGETAG=latest + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + erlang-helm-create-update: + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5001:5000 + needs: erlang-helm-dry-run + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: bfoley13/ErlangExample + path: ./langtest + - run: rm -rf ./langtest/manifests && rm -f ./langtest/Dockerfile ./langtest/.dockerignore + - run: ./draft -v create -c ./test/integration/erlang/helm.yaml -d ./langtest/ + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + with: + insecure-registry: 'host.minikube.internal:5001,10.0.0.0/24' + # Runs Helm to create manifest files + - name: Bake deployment + uses: azure/k8s-bake@v2.2 + with: + renderEngine: 'helm' + helmChart: ./langtest/charts + overrideFiles: ./langtest/charts/values.yaml + overrides: | + replicas:2 + helm-version: 'latest' + releaseName: 'test-release' + id: bake + - name: Build and Push image + continue-on-error: true + run: | + export SHELL=/bin/bash + eval $(minikube -p minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + docker tag testapp host.minikube.internal:5001/testapp + echo -n "verifying images:" + docker images + docker push host.minikube.internal:5001/testapp + echo 'Curling host.minikube.internal test app images from minikube' + minikube ssh "curl http://host.minikube.internal:5001/v2/testapp/tags/list" + # Deploys application based on manifest files from previous step + - name: Deploy application + uses: Azure/k8s-deploy@v4.0 + continue-on-error: true + id: deploy + with: + action: deploy + manifests: ${{ steps.bake.outputs.manifestsBundle }} + images: | + host.minikube.internal:5001/testapp + - name: Wait for rollout + continue-on-error: true + id: rollout + run: | + kubectl rollout status deployment/test-release-testapp --timeout=2m + - name: Print K8s Objects + run: | + kubectl get po -o json + kubectl get svc -o json + kubectl get deploy -o json + - name: Curl Endpoint + run: | + kubectl get svc + echo 'Starting minikube tunnel' + minikube tunnel > /dev/null 2>&1 & tunnelPID=$! + sleep 120 + kubectl get svc + SERVICEIP=$(kubectl get svc -o jsonpath={'.items[1].status.loadBalancer.ingress[0].ip'}) + echo "SERVICEIP: $SERVICEIP" + echo 'Curling service IP' + curl -m 3 $SERVICEIP:80 + kill $tunnelPID + - run: | + ./draft -v generate-workflow -d ./langtest/ --deploy-type helm --variable WORKFLOWNAME=someWorkflow --variable BRANCHNAME=main --variable ACRRESOURCEGROUP=someAcrResourceGroup --variable AZURECONTAINERREGISTRY=someRegistry --variable CONTAINERNAME=someContainer --variable CLUSTERRESOURCEGROUP=someClusterResourceGroup --variable CLUSTERNAME=someAksCluster --variable DOCKERFILE=./Dockerfile --variable BUILDCONTEXTPATH=. --variable NAMESPACE=default + pwd + # Validate generated workflow yaml + - name: Install action-validator with asdf + uses: asdf-vm/actions/install@v1 + with: + tool_versions: | + action-validator 0.1.2 + - name: Lint Actions + run: | + find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) | xargs -I {} action-validator --verbose {} + - name: Execute dry run for update command + run: | + mkdir -p test/temp + pwd + ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/update_dry_run_schema.json -d test/temp/update_dry_run.json + - run: ./draft -v update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Check default namespace + if: steps.deploy.outcome != 'success' + run: kubectl get po + - name: Fail if any error + if: steps.deploy.outcome != 'success' + run: exit 6 + + erlang-kustomize-dry-run: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: bfoley13/ErlangExample + path: ./langtest + - name: Execute Dry Run with config file + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -c ./test/integration/erlang/kustomize.yaml -d ./langtest/ --skip-file-detection + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + - name: Execute Dry Run with variables passed through flag + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -d ./langtest/ -l erlang --skip-file-detection --deploy-type kustomize --variable PORT=8080 --variable APPNAME=testingCreateCommand --variable VERSION=1.11 --variable BUILDERVERSION=1.11 --variable SERVICEPORT=8080 --variable NAMESPACE=testNamespace --variable IMAGENAME=testImage --variable IMAGETAG=latest + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + erlang-kustomize-create-update: + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5001:5000 + needs: erlang-kustomize-dry-run + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: bfoley13/ErlangExample + path: ./langtest + - run: rm -rf ./langtest/manifests && rm -f ./langtest/Dockerfile ./langtest/.dockerignore + - run: ./draft -v create -c ./test/integration/erlang/kustomize.yaml -d ./langtest/ + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + with: + insecure-registry: 'host.minikube.internal:5001,10.0.0.0/24' + - name: Bake deployment + uses: azure/k8s-bake@v2.4 + id: bake + with: + renderEngine: 'kustomize' + kustomizationPath: ./langtest/base + kubectl-version: 'latest' + - name: Build and Push Image + continue-on-error: true + run: | + eval $(minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + docker tag testapp host.minikube.internal:5001/testapp + echo -n "verifying images:" + docker images + docker push host.minikube.internal:5001/testapp + echo 'Curling host.minikube.internal test app images from minikube' + minikube ssh "curl http://host.minikube.internal:5001/v2/testapp/tags/list" + # Deploys application based on manifest files from previous step + - name: Deploy application + uses: Azure/k8s-deploy@v4.0 + continue-on-error: true + id: deploy + with: + action: deploy + manifests: ${{ steps.bake.outputs.manifestsBundle }} + images: | + host.minikube.internal:5001/testapp + - name: Wait for rollout + continue-on-error: true + id: rollout + run: | + kubectl rollout status deployment/testapp --timeout=2m + - name: Print K8s Objects + run: | + kubectl get po -o json + kubectl get svc -o json + kubectl get deploy -o json + - name: Curl Endpoint + run: | + kubectl get svc + echo 'Starting minikube tunnel' + minikube tunnel > /dev/null 2>&1 & tunnelPID=$! + sleep 120 + kubectl get svc + SERVICEIP=$(kubectl get svc -o jsonpath={'.items[1].status.loadBalancer.ingress[0].ip'}) + echo "SERVICEIP: $SERVICEIP" + echo 'Curling service IP' + curl -m 3 $SERVICEIP:80 + kill $tunnelPID + - run: ./draft -v generate-workflow -d ./langtest/ --deploy-type kustomize --variable WORKFLOWNAME=someWorkflow --variable BRANCHNAME=main --variable ACRRESOURCEGROUP=someAcrResourceGroup --variable AZURECONTAINERREGISTRY=someRegistry --variable CONTAINERNAME=someContainer --variable CLUSTERRESOURCEGROUP=someClusterResourceGroup --variable CLUSTERNAME=someAksCluster --variable DOCKERFILE=./Dockerfile --variable BUILDCONTEXTPATH=. --variable NAMESPACE=default + # Validate generated workflow yaml + - name: Install action-validator with asdf + uses: asdf-vm/actions/install@v1 + with: + tool_versions: | + action-validator 0.1.2 + - name: Lint Actions + run: | + find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) | xargs -I {} action-validator --verbose {} + - name: Execute dry run for update command + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/update_dry_run_schema.json -d test/temp/update_dry_run.json + - run: ./draft -v update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Check default namespace + if: steps.deploy.outcome != 'success' + run: kubectl get po + - name: Fail if any error + if: steps.deploy.outcome != 'success' + run: exit 6 + + erlang-manifest-dry-run: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: bfoley13/ErlangExample + path: ./langtest + - name: Execute Dry Run with config file + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -c ./test/integration/erlang/manifest.yaml -d ./langtest/ --skip-file-detection + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + - name: Execute Dry Run with variables passed through flag + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -d ./langtest/ -l erlang --skip-file-detection --deploy-type manifests --variable PORT=8080 --variable APPNAME=testingCreateCommand --variable VERSION=1.11 --variable BUILDERVERSION=1.11 --variable SERVICEPORT=8080 --variable NAMESPACE=testNamespace --variable IMAGENAME=testImage --variable IMAGETAG=latest + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + erlang-manifests-create: + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5001:5000 + needs: erlang-manifest-dry-run + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: bfoley13/ErlangExample + path: ./langtest + - run: rm -rf ./langtest/manifests && rm -f ./langtest/Dockerfile ./langtest/.dockerignore + - run: ./draft -v create -c ./test/integration/erlang/manifest.yaml -d ./langtest/ + - name: print manifests + run: cat ./langtest/manifests/* + - name: Add docker.local host to /etc/hosts + run: | + sudo echo "127.0.0.1 docker.local" | sudo tee -a /etc/hosts + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + with: + insecure-registry: 'host.minikube.internal:5001,10.0.0.0/24' + - name: Build and Push Image + continue-on-error: true + run: | + eval $(minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + docker tag testapp host.minikube.internal:5001/testapp + echo -n "verifying images:" + docker images + docker push host.minikube.internal:5001/testapp + echo 'Curling host.minikube.internal test app images from minikube' + minikube ssh "curl http://host.minikube.internal:5001/v2/testapp/tags/list" + # Deploys application based on manifest files from previous step + - name: Deploy application + run: kubectl apply -f ./langtest/manifests/ + continue-on-error: true + id: deploy + - name: Wait for rollout + continue-on-error: true + id: rollout + run: | + kubectl rollout status deployment/testapp --timeout=2m + - name: Print K8s Objects + run: | + kubectl get po -o json + kubectl get svc -o json + kubectl get deploy -o json + - name: Curl Endpoint + run: | + kubectl get svc + echo 'Starting minikube tunnel' + minikube tunnel > /dev/null 2>&1 & tunnelPID=$! + sleep 120 + kubectl get svc + SERVICEIP=$(kubectl get svc -o jsonpath={'.items[1].status.loadBalancer.ingress[0].ip'}) + echo "SERVICEIP: $SERVICEIP" + echo 'Curling service IP' + curl -m 3 $SERVICEIP:80 + kill $tunnelPID + - run: ./draft -v generate-workflow -d ./langtest/ --deploy-type manifests --variable WORKFLOWNAME=someWorkflow --variable BRANCHNAME=main --variable ACRRESOURCEGROUP=someAcrResourceGroup --variable AZURECONTAINERREGISTRY=someRegistry --variable CONTAINERNAME=someContainer --variable CLUSTERRESOURCEGROUP=someClusterResourceGroup --variable CLUSTERNAME=someAksCluster --variable DOCKERFILE=./Dockerfile --variable BUILDCONTEXTPATH=. --variable NAMESPACE=default + # Validate generated workflow yaml + - name: Install action-validator with asdf + uses: asdf-vm/actions/install@v1 + with: + tool_versions: | + action-validator 0.1.2 + - name: Lint Actions + run: | + find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) | xargs -I {} action-validator --verbose {} + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + with: + name: erlang-manifests-create + path: | + ./langtest + !./langtest/**/.git/* + - name: Fail if any error + if: steps.deploy.outcome != 'success' || steps.rollout.outcome != 'success' + run: exit 6 + erlang-manifest-update: + needs: erlang-manifests-create + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5000:5000 + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: erlang-manifests-create + path: ./langtest/ + - name: Execute dry run for update command + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/update_dry_run_schema.json -d test/temp/update_dry_run.json + - run: ./draft -v update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + - name: Build image + run: | + export SHELL=/bin/bash + eval $(minikube -p minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + echo -n verifying images: + docker images + # Deploys application based on manifest files from previous step + - name: Deploy application + run: kubectl apply -f ./langtest/manifests/ + continue-on-error: true + id: deploy + - name: Check default namespace + if: steps.deploy.outcome != 'success' + run: kubectl get po + - name: Fail if any error + if: steps.deploy.outcome != 'success' + run: exit 6 + + clojure-helm-dry-run: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: imiller31/clojure-simple-http + path: ./langtest + - name: Execute Dry Run with config file + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -c ./test/integration/clojure/helm.yaml -d ./langtest/ --skip-file-detection + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + - name: Execute Dry Run with variables passed through flag + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -d ./langtest/ -l clojure --skip-file-detection --deploy-type helm --variable PORT=8080 --variable APPNAME=testingCreateCommand --variable VERSION=1.11 --variable BUILDERVERSION=1.11 --variable SERVICEPORT=8080 --variable NAMESPACE=testNamespace --variable IMAGENAME=testImage --variable IMAGETAG=latest + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + clojure-helm-create-update: + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5001:5000 + needs: clojure-helm-dry-run + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: imiller31/clojure-simple-http + path: ./langtest + - run: rm -rf ./langtest/manifests && rm -f ./langtest/Dockerfile ./langtest/.dockerignore + - run: ./draft -v create -c ./test/integration/clojure/helm.yaml -d ./langtest/ + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + with: + insecure-registry: 'host.minikube.internal:5001,10.0.0.0/24' + # Runs Helm to create manifest files + - name: Bake deployment + uses: azure/k8s-bake@v2.2 + with: + renderEngine: 'helm' + helmChart: ./langtest/charts + overrideFiles: ./langtest/charts/values.yaml + overrides: | + replicas:2 + helm-version: 'latest' + releaseName: 'test-release' + id: bake + - name: Build and Push image + continue-on-error: true + run: | + export SHELL=/bin/bash + eval $(minikube -p minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + docker tag testapp host.minikube.internal:5001/testapp + echo -n "verifying images:" + docker images + docker push host.minikube.internal:5001/testapp + echo 'Curling host.minikube.internal test app images from minikube' + minikube ssh "curl http://host.minikube.internal:5001/v2/testapp/tags/list" + # Deploys application based on manifest files from previous step + - name: Deploy application + uses: Azure/k8s-deploy@v4.0 + continue-on-error: true + id: deploy + with: + action: deploy + manifests: ${{ steps.bake.outputs.manifestsBundle }} + images: | + host.minikube.internal:5001/testapp + - name: Wait for rollout + continue-on-error: true + id: rollout + run: | + kubectl rollout status deployment/test-release-testapp --timeout=2m + - name: Print K8s Objects + run: | + kubectl get po -o json + kubectl get svc -o json + kubectl get deploy -o json + - name: Curl Endpoint + run: | + kubectl get svc + echo 'Starting minikube tunnel' + minikube tunnel > /dev/null 2>&1 & tunnelPID=$! + sleep 120 + kubectl get svc + SERVICEIP=$(kubectl get svc -o jsonpath={'.items[1].status.loadBalancer.ingress[0].ip'}) + echo "SERVICEIP: $SERVICEIP" + echo 'Curling service IP' + curl -m 3 $SERVICEIP:80 + kill $tunnelPID + - run: | + ./draft -v generate-workflow -d ./langtest/ --deploy-type helm --variable WORKFLOWNAME=someWorkflow --variable BRANCHNAME=main --variable ACRRESOURCEGROUP=someAcrResourceGroup --variable AZURECONTAINERREGISTRY=someRegistry --variable CONTAINERNAME=someContainer --variable CLUSTERRESOURCEGROUP=someClusterResourceGroup --variable CLUSTERNAME=someAksCluster --variable DOCKERFILE=./Dockerfile --variable BUILDCONTEXTPATH=. --variable NAMESPACE=default + pwd + # Validate generated workflow yaml + - name: Install action-validator with asdf + uses: asdf-vm/actions/install@v1 + with: + tool_versions: | + action-validator 0.1.2 + - name: Lint Actions + run: | + find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) | xargs -I {} action-validator --verbose {} + - name: Execute dry run for update command + run: | + mkdir -p test/temp + pwd + ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/update_dry_run_schema.json -d test/temp/update_dry_run.json + - run: ./draft -v update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Check default namespace + if: steps.deploy.outcome != 'success' + run: kubectl get po + - name: Fail if any error + if: steps.deploy.outcome != 'success' + run: exit 6 + + clojure-kustomize-dry-run: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: imiller31/clojure-simple-http + path: ./langtest + - name: Execute Dry Run with config file + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -c ./test/integration/clojure/kustomize.yaml -d ./langtest/ --skip-file-detection + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + - name: Execute Dry Run with variables passed through flag + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -d ./langtest/ -l clojure --skip-file-detection --deploy-type kustomize --variable PORT=8080 --variable APPNAME=testingCreateCommand --variable VERSION=1.11 --variable BUILDERVERSION=1.11 --variable SERVICEPORT=8080 --variable NAMESPACE=testNamespace --variable IMAGENAME=testImage --variable IMAGETAG=latest + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + clojure-kustomize-create-update: + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5001:5000 + needs: clojure-kustomize-dry-run + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: imiller31/clojure-simple-http + path: ./langtest + - run: rm -rf ./langtest/manifests && rm -f ./langtest/Dockerfile ./langtest/.dockerignore + - run: ./draft -v create -c ./test/integration/clojure/kustomize.yaml -d ./langtest/ + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + with: + insecure-registry: 'host.minikube.internal:5001,10.0.0.0/24' + - name: Bake deployment + uses: azure/k8s-bake@v2.4 + id: bake + with: + renderEngine: 'kustomize' + kustomizationPath: ./langtest/base + kubectl-version: 'latest' + - name: Build and Push Image + continue-on-error: true + run: | + eval $(minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + docker tag testapp host.minikube.internal:5001/testapp + echo -n "verifying images:" + docker images + docker push host.minikube.internal:5001/testapp + echo 'Curling host.minikube.internal test app images from minikube' + minikube ssh "curl http://host.minikube.internal:5001/v2/testapp/tags/list" + # Deploys application based on manifest files from previous step + - name: Deploy application + uses: Azure/k8s-deploy@v4.0 + continue-on-error: true + id: deploy + with: + action: deploy + manifests: ${{ steps.bake.outputs.manifestsBundle }} + images: | + host.minikube.internal:5001/testapp + - name: Wait for rollout + continue-on-error: true + id: rollout + run: | + kubectl rollout status deployment/testapp --timeout=2m + - name: Print K8s Objects + run: | + kubectl get po -o json + kubectl get svc -o json + kubectl get deploy -o json + - name: Curl Endpoint + run: | + kubectl get svc + echo 'Starting minikube tunnel' + minikube tunnel > /dev/null 2>&1 & tunnelPID=$! + sleep 120 + kubectl get svc + SERVICEIP=$(kubectl get svc -o jsonpath={'.items[1].status.loadBalancer.ingress[0].ip'}) + echo "SERVICEIP: $SERVICEIP" + echo 'Curling service IP' + curl -m 3 $SERVICEIP:80 + kill $tunnelPID + - run: ./draft -v generate-workflow -d ./langtest/ --deploy-type kustomize --variable WORKFLOWNAME=someWorkflow --variable BRANCHNAME=main --variable ACRRESOURCEGROUP=someAcrResourceGroup --variable AZURECONTAINERREGISTRY=someRegistry --variable CONTAINERNAME=someContainer --variable CLUSTERRESOURCEGROUP=someClusterResourceGroup --variable CLUSTERNAME=someAksCluster --variable DOCKERFILE=./Dockerfile --variable BUILDCONTEXTPATH=. --variable NAMESPACE=default + # Validate generated workflow yaml + - name: Install action-validator with asdf + uses: asdf-vm/actions/install@v1 + with: + tool_versions: | + action-validator 0.1.2 + - name: Lint Actions + run: | + find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) | xargs -I {} action-validator --verbose {} + - name: Execute dry run for update command + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/update_dry_run_schema.json -d test/temp/update_dry_run.json + - run: ./draft -v update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Check default namespace + if: steps.deploy.outcome != 'success' + run: kubectl get po + - name: Fail if any error + if: steps.deploy.outcome != 'success' + run: exit 6 + + clojure-manifest-dry-run: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: imiller31/clojure-simple-http + path: ./langtest + - name: Execute Dry Run with config file + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -c ./test/integration/clojure/manifest.yaml -d ./langtest/ --skip-file-detection + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + - name: Execute Dry Run with variables passed through flag + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/dry-run.json create -d ./langtest/ -l clojure --skip-file-detection --deploy-type manifests --variable PORT=8080 --variable APPNAME=testingCreateCommand --variable VERSION=1.11 --variable BUILDERVERSION=1.11 --variable SERVICEPORT=8080 --variable NAMESPACE=testNamespace --variable IMAGENAME=testImage --variable IMAGETAG=latest + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/dry_run_schema.json -d test/temp/dry-run.json + clojure-manifests-create: + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5001:5000 + needs: clojure-manifest-dry-run + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - run: mkdir ./langtest + - uses: actions/checkout@v3 + with: + repository: imiller31/clojure-simple-http + path: ./langtest + - run: rm -rf ./langtest/manifests && rm -f ./langtest/Dockerfile ./langtest/.dockerignore + - run: ./draft -v create -c ./test/integration/clojure/manifest.yaml -d ./langtest/ + - name: print manifests + run: cat ./langtest/manifests/* + - name: Add docker.local host to /etc/hosts + run: | + sudo echo "127.0.0.1 docker.local" | sudo tee -a /etc/hosts + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + with: + insecure-registry: 'host.minikube.internal:5001,10.0.0.0/24' + - name: Build and Push Image + continue-on-error: true + run: | + eval $(minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + docker tag testapp host.minikube.internal:5001/testapp + echo -n "verifying images:" + docker images + docker push host.minikube.internal:5001/testapp + echo 'Curling host.minikube.internal test app images from minikube' + minikube ssh "curl http://host.minikube.internal:5001/v2/testapp/tags/list" + # Deploys application based on manifest files from previous step + - name: Deploy application + run: kubectl apply -f ./langtest/manifests/ + continue-on-error: true + id: deploy + - name: Wait for rollout + continue-on-error: true + id: rollout + run: | + kubectl rollout status deployment/testapp --timeout=2m + - name: Print K8s Objects + run: | + kubectl get po -o json + kubectl get svc -o json + kubectl get deploy -o json + - name: Curl Endpoint + run: | + kubectl get svc + echo 'Starting minikube tunnel' + minikube tunnel > /dev/null 2>&1 & tunnelPID=$! + sleep 120 + kubectl get svc + SERVICEIP=$(kubectl get svc -o jsonpath={'.items[1].status.loadBalancer.ingress[0].ip'}) + echo "SERVICEIP: $SERVICEIP" + echo 'Curling service IP' + curl -m 3 $SERVICEIP:80 + kill $tunnelPID + - run: ./draft -v generate-workflow -d ./langtest/ --deploy-type manifests --variable WORKFLOWNAME=someWorkflow --variable BRANCHNAME=main --variable ACRRESOURCEGROUP=someAcrResourceGroup --variable AZURECONTAINERREGISTRY=someRegistry --variable CONTAINERNAME=someContainer --variable CLUSTERRESOURCEGROUP=someClusterResourceGroup --variable CLUSTERNAME=someAksCluster --variable DOCKERFILE=./Dockerfile --variable BUILDCONTEXTPATH=. --variable NAMESPACE=default + # Validate generated workflow yaml + - name: Install action-validator with asdf + uses: asdf-vm/actions/install@v1 + with: + tool_versions: | + action-validator 0.1.2 + - name: Lint Actions + run: | + find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) | xargs -I {} action-validator --verbose {} + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + with: + name: clojure-manifests-create + path: | + ./langtest + !./langtest/**/.git/* + - name: Fail if any error + if: steps.deploy.outcome != 'success' || steps.rollout.outcome != 'success' + run: exit 6 + clojure-manifest-update: + needs: clojure-manifests-create + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5000:5000 + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: draft-binary + - run: chmod +x ./draft + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: clojure-manifests-create + path: ./langtest/ + - name: Execute dry run for update command + run: | + mkdir -p test/temp + ./draft --dry-run --dry-run-file test/temp/update_dry_run.json update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: Validate JSON + run: | + npm install -g ajv-cli@5.0.0 + ajv validate -s test/update_dry_run_schema.json -d test/temp/update_dry_run.json + - run: ./draft -v update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1 + - name: start minikube + id: minikube + uses: medyagh/setup-minikube@master + - name: Build image + run: | + export SHELL=/bin/bash + eval $(minikube -p minikube docker-env) + docker build -f ./langtest/Dockerfile -t testapp ./langtest/ + echo -n verifying images: + docker images + # Deploys application based on manifest files from previous step + - name: Deploy application + run: kubectl apply -f ./langtest/manifests/ + continue-on-error: true + id: deploy + - name: Check default namespace + if: steps.deploy.outcome != 'success' + run: kubectl get po + - name: Fail if any error + if: steps.deploy.outcome != 'success' + run: exit 6 + + helm-integrations-summary: + runs-on: ubuntu-latest + needs: [ gomodule-helm-create-update,go-helm-create-update,python-helm-create-update,rust-helm-create-update,javascript-helm-create-update,ruby-helm-create-update,csharp-helm-create-update,java-helm-create-update,gradle-helm-create-update,swift-helm-create-update,erlang-helm-create-update,clojure-helm-create-update ] + steps: + - run: echo helm integrations passed + + + kustomize-integrations-summary: + runs-on: ubuntu-latest + needs: [ gomodule-kustomize-create-update,go-kustomize-create-update,python-kustomize-create-update,rust-kustomize-create-update,javascript-kustomize-create-update,ruby-kustomize-create-update,csharp-kustomize-create-update,java-kustomize-create-update,gradle-kustomize-create-update,swift-kustomize-create-update,erlang-kustomize-create-update,clojure-kustomize-create-update ] + steps: + - run: echo kustomize integrations passed + + + manifest-integrations-summary: + runs-on: ubuntu-latest + needs: [ gomodule-manifest-update,go-manifest-update,python-manifest-update,rust-manifest-update,javascript-manifest-update,ruby-manifest-update,csharp-manifest-update,java-manifest-update,gradle-manifest-update,swift-manifest-update,erlang-manifest-update,clojure-manifest-update ] + steps: + - run: echo manifest integrations passed + diff --git a/.github/workflows/integration-per-language.yml b/.github/workflows/integration-per-language.yml index 75da6c32..9ad746cb 100644 --- a/.github/workflows/integration-per-language.yml +++ b/.github/workflows/integration-per-language.yml @@ -390,7 +390,7 @@ jobs: -d ./langtest/ \ -l ${{inputs.language}} \ --skip-file-detection \ - --deploy-type manifests\ + --deploy-type manifests \ --variable PORT=8080 \ --variable APPNAME=testingCreateCommand \ --variable VERSION=1.11 \ diff --git a/.github/workflows/integration-windows.yml b/.github/workflows/integration-windows.yml index d13faa78..00193481 100644 --- a/.github/workflows/integration-windows.yml +++ b/.github/workflows/integration-windows.yml @@ -7,9 +7,9 @@ jobs: build: runs-on: windows-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - name: Set up Go - uses: actions/setup-go@v5 + uses: actions/setup-go@v2 with: go-version: 1.22 - name: make @@ -44,12 +44,12 @@ jobs: runs-on: windows-latest needs: build steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: draft-binary - run: mkdir ./langtest - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 with: repository: gambtho/go_echo path: ./langtest @@ -73,7 +73,7 @@ jobs: needs: gomodule-helm-create runs-on: windows-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: draft-binary @@ -94,12 +94,12 @@ jobs: runs-on: windows-latest needs: build steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: draft-binary - run: mkdir ./langtest - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 with: repository: gambtho/go_echo path: ./langtest @@ -144,12 +144,12 @@ jobs: runs-on: windows-latest needs: build steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: draft-binary - run: mkdir ./langtest - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 with: repository: davidgamero/go-echo-no-mod path: ./langtest @@ -173,7 +173,7 @@ jobs: needs: go-helm-create runs-on: windows-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: draft-binary @@ -194,12 +194,12 @@ jobs: runs-on: windows-latest needs: build steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: draft-binary - run: mkdir ./langtest - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 with: repository: davidgamero/go-echo-no-mod path: ./langtest @@ -244,12 +244,12 @@ jobs: runs-on: windows-latest needs: build steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: draft-binary - run: mkdir ./langtest - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 with: repository: OliverMKing/flask-hello-world path: ./langtest @@ -273,7 +273,7 @@ jobs: needs: python-helm-create runs-on: windows-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: draft-binary @@ -294,12 +294,12 @@ jobs: runs-on: windows-latest needs: build steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: draft-binary - run: mkdir ./langtest - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 with: repository: OliverMKing/flask-hello-world path: ./langtest @@ -344,12 +344,12 @@ jobs: runs-on: windows-latest needs: build steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: draft-binary - run: mkdir ./langtest - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 with: repository: OliverMKing/tiny-http-hello-world path: ./langtest @@ -373,7 +373,7 @@ jobs: needs: rust-helm-create runs-on: windows-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: draft-binary @@ -394,12 +394,12 @@ jobs: runs-on: windows-latest needs: build steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: draft-binary - run: mkdir ./langtest - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 with: repository: OliverMKing/tiny-http-hello-world path: ./langtest @@ -444,12 +444,12 @@ jobs: runs-on: windows-latest needs: build steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: draft-binary - run: mkdir ./langtest - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 with: repository: davidgamero/express-hello-world path: ./langtest @@ -473,7 +473,7 @@ jobs: needs: javascript-helm-create runs-on: windows-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: draft-binary @@ -494,12 +494,12 @@ jobs: runs-on: windows-latest needs: build steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: draft-binary - run: mkdir ./langtest - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 with: repository: davidgamero/express-hello-world path: ./langtest @@ -544,12 +544,12 @@ jobs: runs-on: windows-latest needs: build steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: draft-binary - run: mkdir ./langtest - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 with: repository: davidgamero/sinatra-hello-world path: ./langtest @@ -573,7 +573,7 @@ jobs: needs: ruby-helm-create runs-on: windows-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: draft-binary @@ -594,12 +594,12 @@ jobs: runs-on: windows-latest needs: build steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: draft-binary - run: mkdir ./langtest - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 with: repository: davidgamero/sinatra-hello-world path: ./langtest @@ -644,12 +644,12 @@ jobs: runs-on: windows-latest needs: build steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: draft-binary - run: mkdir ./langtest - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 with: repository: imiller31/csharp-simple-web-app path: ./langtest @@ -673,7 +673,7 @@ jobs: needs: csharp-helm-create runs-on: windows-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: draft-binary @@ -694,12 +694,12 @@ jobs: runs-on: windows-latest needs: build steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: draft-binary - run: mkdir ./langtest - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 with: repository: imiller31/csharp-simple-web-app path: ./langtest @@ -744,12 +744,12 @@ jobs: runs-on: windows-latest needs: build steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: draft-binary - run: mkdir ./langtest - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 with: repository: imiller31/simple-java-server path: ./langtest @@ -773,7 +773,7 @@ jobs: needs: java-helm-create runs-on: windows-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: draft-binary @@ -794,12 +794,12 @@ jobs: runs-on: windows-latest needs: build steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: draft-binary - run: mkdir ./langtest - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 with: repository: imiller31/simple-java-server path: ./langtest @@ -844,12 +844,12 @@ jobs: runs-on: windows-latest needs: build steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: draft-binary - run: mkdir ./langtest - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 with: repository: imiller31/simple-gradle-server path: ./langtest @@ -873,7 +873,7 @@ jobs: needs: gradle-helm-create runs-on: windows-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: draft-binary @@ -894,12 +894,12 @@ jobs: runs-on: windows-latest needs: build steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: draft-binary - run: mkdir ./langtest - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 with: repository: imiller31/simple-gradle-server path: ./langtest @@ -944,12 +944,12 @@ jobs: runs-on: windows-latest needs: build steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: draft-binary - run: mkdir ./langtest - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 with: repository: OliverMKing/swift-hello-world path: ./langtest @@ -973,7 +973,7 @@ jobs: needs: swift-helm-create runs-on: windows-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: draft-binary @@ -994,12 +994,12 @@ jobs: runs-on: windows-latest needs: build steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: draft-binary - run: mkdir ./langtest - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 with: repository: OliverMKing/swift-hello-world path: ./langtest @@ -1044,12 +1044,12 @@ jobs: runs-on: windows-latest needs: build steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: draft-binary - run: mkdir ./langtest - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 with: repository: bfoley13/ErlangExample path: ./langtest @@ -1073,7 +1073,7 @@ jobs: needs: erlang-helm-create runs-on: windows-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: draft-binary @@ -1094,12 +1094,12 @@ jobs: runs-on: windows-latest needs: build steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: draft-binary - run: mkdir ./langtest - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 with: repository: bfoley13/ErlangExample path: ./langtest @@ -1144,12 +1144,12 @@ jobs: runs-on: windows-latest needs: build steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: draft-binary - run: mkdir ./langtest - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 with: repository: imiller31/clojure-simple-http path: ./langtest @@ -1173,7 +1173,7 @@ jobs: needs: clojure-helm-create runs-on: windows-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: draft-binary @@ -1194,12 +1194,12 @@ jobs: runs-on: windows-latest needs: build steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: draft-binary - run: mkdir ./langtest - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 with: repository: imiller31/clojure-simple-http path: ./langtest diff --git a/test/integration/go/helm.yaml b/test/integration/go/helm.yaml index bee83908..6fad23ec 100644 --- a/test/integration/go/helm.yaml +++ b/test/integration/go/helm.yaml @@ -5,7 +5,7 @@ deployVariables: - name: "PORT" value: "8080" - name: "SERVICEPORT" - value: "80" + value: "8080" - name: "APPNAME" value: "testapp" - name: "IMAGENAME" diff --git a/test/integration/go/kustomize.yaml b/test/integration/go/kustomize.yaml index 9f1eb38f..96d99bfe 100644 --- a/test/integration/go/kustomize.yaml +++ b/test/integration/go/kustomize.yaml @@ -5,7 +5,7 @@ deployVariables: - name: "PORT" value: "8080" - name: "SERVICEPORT" - value: "80" + value: "8080" - name: "APPNAME" value: "testapp" - name: "IMAGENAME" diff --git a/test/integration/go/manifest.yaml b/test/integration/go/manifest.yaml index 719fd6f9..fa4e13aa 100644 --- a/test/integration/go/manifest.yaml +++ b/test/integration/go/manifest.yaml @@ -5,7 +5,7 @@ deployVariables: - name: "PORT" value: "8080" - name: "SERVICEPORT" - value: "80" + value: "8080" - name: "APPNAME" value: "testapp" - name: "IMAGENAME" diff --git a/test/integration/swift/helm.yaml b/test/integration/swift/helm.yaml index 843ce49d..dfef6fdd 100644 --- a/test/integration/swift/helm.yaml +++ b/test/integration/swift/helm.yaml @@ -10,10 +10,6 @@ deployVariables: value: "testapp" - name: "IMAGENAME" value: "host.minikube.internal:5001/testapp" - - name: "CPULIMIT" - value: "3" - - name: "MEMLIMIT" - value: "2Gi" - name: "STARTUPINITIALDELAY" value: 30 languageVariables: diff --git a/test/integration/swift/kustomize.yaml b/test/integration/swift/kustomize.yaml index 45985c01..012bf436 100644 --- a/test/integration/swift/kustomize.yaml +++ b/test/integration/swift/kustomize.yaml @@ -10,10 +10,6 @@ deployVariables: value: "testapp" - name: "IMAGENAME" value: "host.minikube.internal:5001/testapp" - - name: "CPULIMIT" - value: "3" - - name: "MEMLIMIT" - value: "2Gi" - name: "STARTUPINITIALDELAY" value: 30 languageVariables: diff --git a/test/integration/swift/manifest.yaml b/test/integration/swift/manifest.yaml index 300b59ba..c88c344e 100644 --- a/test/integration/swift/manifest.yaml +++ b/test/integration/swift/manifest.yaml @@ -10,10 +10,6 @@ deployVariables: value: "testapp" - name: "IMAGENAME" value: "host.minikube.internal:5001/testapp" - - name: "CPULIMIT" - value: "3" - - name: "MEMLIMIT" - value: "2Gi" - name: "STARTUPINITIALDELAY" value: 30 languageVariables: