Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE] Trigger Validation for V2 Changes #83

Closed
wants to merge 15 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
679 changes: 679 additions & 0 deletions .github/workflows/run-validation-oidc.yml

Large diffs are not rendered by default.

89 changes: 88 additions & 1 deletion .github/workflows/run-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ env:

jobs:
create-using-builder:

name: 'Create app using builder'
runs-on: ubuntu-latest
timeout-minutes: 10
Expand Down Expand Up @@ -64,7 +65,48 @@ jobs:
shell: bash
run: az acr repository delete -n ${{ vars.TEST_ACR_NAME }} -t ${{ env.TEST_IMAGE_REPOSITORY }}:${{ env.TEST_IMAGE_TAG }} -y


create-using-builder-and-internal-registry:

name: 'Create app using builder and push to internal registry'
runs-on: ubuntu-latest
timeout-minutes: 10

env:
TEST_IMAGE_TAG: 'bs-${{ github.run_id }}'
TEST_CONTAINER_APP_NAME: 'gh-ca-bs-${{ github.run_id }}'

steps:
- name: Checkout action repository
uses: actions/checkout@v3

- name: Clone Oryx repository
uses: actions/checkout@v3
with:
repository: microsoft/Oryx
path: oryx

- name: Log in to Azure
uses: azure/login@v1
with:
creds: ${{ secrets.TEST_AZURE_CREDENTIALS }}

- name: Execute Azure Container Apps Build and Deploy Action
uses: ./
with:
appSourcePath: '${{ github.workspace }}/oryx/tests/SampleApps/DotNetCore/NetCore6PreviewWebApp'
containerAppName: ${{ env.TEST_CONTAINER_APP_NAME }}
resourceGroup: ${{ vars.TEST_RESOURCE_GROUP_NO_ACR_NAME }}
disableTelemetry: ${{ vars.TEST_DISABLE_TELEMETRY }}

- name: Delete created Azure Container App
if: ${{ always() }}
shell: bash
run: az containerapp delete -n ${{ env.TEST_CONTAINER_APP_NAME }} -g ${{ vars.TEST_RESOURCE_GROUP_NO_ACR_NAME }} -y


create-using-found-dockerfile:

name: 'Create app using found Dockerfile'
runs-on: ubuntu-latest
timeout-minutes: 10
Expand Down Expand Up @@ -112,6 +154,7 @@ jobs:
run: az acr repository delete -n ${{ vars.TEST_ACR_NAME }} -t ${{ env.TEST_IMAGE_REPOSITORY }}:${{ env.TEST_IMAGE_TAG }} -y

create-using-provided-dockerfile:

name: 'Create app using provided Dockerfile'
runs-on: ubuntu-latest
timeout-minutes: 10
Expand Down Expand Up @@ -159,6 +202,7 @@ jobs:
shell: bash
run: az acr repository delete -n ${{ vars.TEST_ACR_NAME }} -t ${{ env.TEST_IMAGE_REPOSITORY }}:${{ env.TEST_IMAGE_TAG }} -y


create-using-image-linux:

name: 'Create app using image on Linux runner'
Expand Down Expand Up @@ -227,7 +271,7 @@ jobs:

name: 'Create app using image with new environment'
runs-on: ubuntu-latest
timeout-minutes: 15
timeout-minutes: 25

env:
TEST_CONTAINER_APP_NAME: 'gh-ca-is-ne-${{ github.run_id }}'
Expand Down Expand Up @@ -280,7 +324,9 @@ jobs:
shell: bash
run: az monitor log-analytics workspace delete -g ${{ vars.TEST_RESOURCE_GROUP_NAME }} -n ${{ env.WORKSPACE_NAME }} -y


create-using-builder-yaml:

name: 'Create app using builder with YAML configuration'
runs-on: ubuntu-latest
timeout-minutes: 10
Expand Down Expand Up @@ -341,6 +387,7 @@ jobs:
run: az acr repository delete -n ${{ vars.TEST_ACR_NAME }} -t ${{ env.TEST_IMAGE_REPOSITORY }}:${{ env.TEST_IMAGE_TAG }} -y

create-using-image-yaml-linux:

name: 'Create app using image with YAML configuration on Linux runner'
runs-on: ubuntu-latest
timeout-minutes: 10
Expand Down Expand Up @@ -385,6 +432,7 @@ jobs:
run: az containerapp delete -n ${{ env.TEST_CONTAINER_APP_NAME }} -g ${{ vars.TEST_RESOURCE_GROUP_NAME }} -y

create-using-image-yaml-windows:

name: 'Create app using image with YAML configuration on Windows runner'
runs-on: windows-latest
timeout-minutes: 10
Expand Down Expand Up @@ -429,6 +477,7 @@ jobs:
run: az containerapp delete -n ${{ env.TEST_CONTAINER_APP_NAME }} -g ${{ vars.TEST_RESOURCE_GROUP_NAME }} -y

update-using-builder:

name: 'Update existing app using builder'
runs-on: ubuntu-latest
timeout-minutes: 10
Expand Down Expand Up @@ -475,6 +524,44 @@ jobs:
shell: bash
run: az containerapp update -n ${{ env.TEST_CONTAINER_APP_NAME }} -g ${{ vars.TEST_RESOURCE_GROUP_NAME }} -i mcr.microsoft.com/azuredocs/containerapps-helloworld:latest

update-using-builder-and-internal-registry:

name: 'Update existing app using builder and push to internal registry'
runs-on: ubuntu-latest
timeout-minutes: 10

env:
TEST_IMAGE_TAG: 'bs-up-${{ github.run_id }}'
TEST_CONTAINER_APP_NAME: 'update-using-builder-app'

steps:
- name: Checkout action repository
uses: actions/checkout@v3

- name: Clone Oryx repository
uses: actions/checkout@v3
with:
repository: microsoft/Oryx
path: oryx

- name: Log in to Azure
uses: azure/login@v1
with:
creds: ${{ secrets.TEST_AZURE_CREDENTIALS }}

- name: Execute Azure Container Apps Build and Deploy Action
uses: ./
with:
appSourcePath: '${{ github.workspace }}/oryx/tests/SampleApps/DotNetCore/NetCore6PreviewWebApp'
containerAppName: ${{ env.TEST_CONTAINER_APP_NAME }}
resourceGroup: ${{ vars.TEST_RESOURCE_GROUP_NO_ACR_NAME }}
disableTelemetry: ${{ vars.TEST_DISABLE_TELEMETRY }}

- name: Update Container App with existing image
if: ${{ always() }}
shell: bash
run: az containerapp update -n ${{ env.TEST_CONTAINER_APP_NAME }} -g ${{ vars.TEST_RESOURCE_GROUP_NO_ACR_NAME }} -i mcr.microsoft.com/azuredocs/containerapps-helloworld:latest

update-using-image:

name: 'Update app using image'
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# .gitignore
node_modules/
*.js
!dist/index.js
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ For more information on the structure of the YAML configuration file, please vis
| `resourceGroup` | No | The existing resource group that the Azure Container App will be created in. If not provided, this value will be `<container-app-name>-rg` and its existence will first be checked before attempting to create it. |
| `containerAppEnvironment` | No | The name of the Container App environment to use with the application. If not provided, an existing environment in the resource group of the Container App will be used, otherwise, an environment will be created in the formation `<container-app-name>-env`. |
| `runtimeStack` | No | The platform version stack used in the final runnable application image that is deployed to the Container App. The value should be provided in the formation `<platform>:<version>`. If not provided, this value is determined by Oryx based on the contents of the provided application. Please refer to [this document](https://github.com/microsoft/Oryx/blob/main/doc/supportedRuntimeVersions.md) for more information on supported runtime stacks for Oryx. |
| `builderStack` | No | The stack (OS) that should be used to build the provided application source and produce the runnable application image. You can provide a specific image tag for the stack, such as "debian-bookworm-20231004.1", or you can provide a supported stack name, such as "debian-bookworm" or "debian-bullseye", and the latest supported image tag for that stack will be used. If no stack is provided, this action will attempt to build the provided application source with each supported stack until there's a successful build. |
| `builderStack` | No | The stack (OS) that should be used to build the provided application source and produce the runnable application image. You can provide a specific image tag for the stack, such as "debian-bookworm-20231107.2", or you can provide a supported stack name, such as "debian-bookworm" or "debian-bullseye", and the latest supported image tag for that stack will be used. If no stack is provided, this action will attempt to build the provided application source with each supported stack until there's a successful build. |
| `targetPort` | No | The designated port for the application to run on. If no value is provided and the builder is used to build the runnable application image, the target port will be set to 80 for Python applications and 8080 for all other platform applications. If no value is provided when creating a Container App, the target port will default to 80. Note: when using this action to update a Container App, the target port may be updated if not provided based on changes to the ingress property. |
| `location` | No | The location that the Container App (and other created resources) will be deployed to. To view locations suitable for creating the Container App in, please run the following: `az provider show -n Microsoft.App --query "resourceTypes[?resourceType=='containerApps'].locations"` |
| `environmentVariables` | No | A list of environment variable(s) for the container. Space-separated values in 'key=value' format. Empty string to clear existing values. Prefix value with 'secretref:' to reference a secret. |
Expand Down
Loading
Loading