diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f41d2072d71..a7f9d855edc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -109,6 +109,10 @@ jobs: needs: build if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/containerapp-preview' }} runs-on: ubuntu-latest + env: + RESOURCE_GROUP: containerapp-preview-ci + ENVIRONMENT_NAME: containerapppreviewci + TAG: main steps: - name: Checkout examples repo uses: actions/checkout@v3 @@ -122,32 +126,43 @@ jobs: - uses: azure/login@v1 with: creds: ${{ secrets.AZURE_CREDENTIALS }} - - run: | + - name: Add extension + run: | az extension add --source ./*.whl --yes - - run: | + - name: Extension Help + run: | az containerapp compose --help az containerapp compose create --help - - run: | + - name: Create resource group + run: | + az group create --name $RESOURCE_GROUP --location eastus + + - name: Simple Example + run: | cd examples/simple - compose_hash=$(md5sum docker-compose.yml) - resource_group_name="simple-${compose_hash:27:4}" - environment_name="simple-${compose_hash:0:4}" + URL=$(az containerapp compose create \ + --environment $ENVIRONMENT_NAME \ + --resource-group $RESOURCE_GROUP \ + --query '[].properties.configuration.ingress.fqdn' \ + --only-show-errors \ + -o tsv) - az group create --name $resource_group_name --location eastus - az containerapp compose create --environment $environment_name --resource-group $resource_group_name - URL=$(az containerapp show --resource-group $resource_group_name --name helloworld --query 'configuration.ingress.fqdn' -o tsv) curl https://$URL - az group delete --name $resource_group_name --yes - - run: | - cd examples/grpc - compose_hash=$(md5sum docker-compose.yml) - resource_group_name="grpc-${compose_hash:27:4}" - environment_name="grpc-${compose_hash:0:4}" + - name: GRPC Example + run: | + cd examples/grpc - az group create --name $resource_group_name --location eastus - az containerapp compose create --environment $environment_name --resource-group $resource_group_name - URL=$(az containerapp show --resource-group $resource_group_name --name frontend --query 'configuration.ingress.fqdn' -o tsv) + URL=$(az containerapp compose create \ + --environment $ENVIRONMENT_NAME \ + --resource-group $RESOURCE_GROUP \ + --transport backend=http2 \ + --query '[?name==`frontend`].properties.configuration.ingress.fqdn' \ + --only-show-errors \ + -o tsv) curl https://$URL/hello - az group delete --name $resource_group_name --yes \ No newline at end of file + + - name: Cleanup Resource Group + run: | + az group delete --name $RESOURCE_GROUP --yes diff --git a/src/containerapp-preview/azext_containerapp_preview/vendored_sdks/azext_containerapp/_clients.py b/src/containerapp-preview/azext_containerapp_preview/vendored_sdks/azext_containerapp/_clients.py index 4362e1d51aa..6ad9ae78581 100644 --- a/src/containerapp-preview/azext_containerapp_preview/vendored_sdks/azext_containerapp/_clients.py +++ b/src/containerapp-preview/azext_containerapp_preview/vendored_sdks/azext_containerapp/_clients.py @@ -27,16 +27,17 @@ def __init__(self): self.currTicker = 0 def tick(self): - sys.stdout.write('\r') - sys.stdout.write(self.tickers[self.currTicker] + " Running ..") - sys.stdout.flush() + # sys.stdout.write('\r') + # sys.stdout.write(self.tickers[self.currTicker] + " Running ..") + # sys.stdout.flush() self.currTicker += 1 self.currTicker = self.currTicker % len(self.tickers) def flush(self): - sys.stdout.flush() - sys.stdout.write('\r') - sys.stdout.write("\033[K") + pass + # sys.stdout.flush() + # sys.stdout.write('\r') + # sys.stdout.write("\033[K") def poll(cmd, request_url, poll_if_status): # pylint: disable=inconsistent-return-statements