diff --git a/.github/workflows/push-vmss-prototype-image.yml b/.github/workflows/push-vmss-prototype-image.yml index bf52ac2..9acfe1d 100644 --- a/.github/workflows/push-vmss-prototype-image.yml +++ b/.github/workflows/push-vmss-prototype-image.yml @@ -5,14 +5,26 @@ on: image_tag: description: 'Identify image by this tag' required: true + pull_request: + paths: + - vmss-prototype/vmss-prototype + - Dockerfile + branches: + - main jobs: image: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: set env + - uses: azure/login@v1 + with: + creds: ${{ secrets.AZURE_CREDENTIALS }} + - name: assign tag based on manual input run: echo "RELEASE_VERSION=${{github.event.inputs.image_tag}}-canary" >> $GITHUB_ENV if: ${{github.event.inputs.image_tag != ''}} + - name: assign tag automatically based on current commit sha + run: echo "RELEASE_VERSION=$(git rev-parse --short "$GITHUB_SHA")-canary" >> $GITHUB_ENV + if: ${{github.event.inputs.image_tag == ''}} - name: setup buildx uses: docker/setup-buildx-action@v1 - name: login to GitHub container registry @@ -28,3 +40,46 @@ jobs: file: vmss-prototype/Dockerfile tags: | ghcr.io/jackfrancis/kamino/vmss-prototype:${{ env.RELEASE_VERSION }} + - name: install go + uses: actions/setup-go@v2 + with: + go-version: '^1.15' + - name: install ginkgo + run: go get -u github.com/onsi/ginkgo/ginkgo + - name: install helm + run: | + curl https://baltocdn.com/helm/signing.asc | sudo apt-key add - + sudo apt-get install apt-transport-https --yes + echo "deb https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list + sudo apt-get update + sudo apt-get install helm + - name: install k + run: | + sudo curl -o /usr/local/bin/k https://raw.githubusercontent.com/jakepearson/k/master/k + sudo chmod +x /usr/local/bin/k + - name: checkout aks-engine + uses: actions/checkout@v2 + with: + repository: Azure/aks-engine + path: aks-engine + ref: master # TODO change to a strongly-versioned ref once the kamino E2E integrations are in a released version + - name: build aks-engine binary + run: make build-binary + working-directory: aks-engine + - name: run aks-engine E2E + env: + ORCHESTRATOR_RELEASE: "1.19" + CLUSTER_DEFINITION: "examples/kubernetes.json" + SUBSCRIPTION_ID: ${{ secrets.TEST_AZURE_SUB_ID }} + CLIENT_ID: ${{ secrets.TEST_AZURE_SP_ID }} + CLIENT_SECRET: ${{ secrets.TEST_AZURE_SP_PW }} + LOCATION: "westus2" + TENANT_ID: ${{ secrets.TEST_AZURE_TENANT_ID }} + SKIP_LOGS_COLLECTION: true + CLEANUP_ON_EXIT: true + CLEANUP_IF_FAIL: false + GINKGO_FOCUS: "should be able to install vmss node prototype" + RUN_VMSS_NODE_PROTOTYPE: true + KAMINO_VMSS_PROTOTYPE_IMAGE_TAG: ${{ env.RELEASE_VERSION }} + run: make test-kubernetes + working-directory: aks-engine