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

Snehpar/test OIDC #77

Closed
wants to merge 65 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
1c6a07a
Convert composite action to typescript (#61)
snehapar9 Oct 17, 2023
43f6f95
Migrate latest changes from v1 to v2 (#68)
cormacpayne Nov 7, 2023
4e84426
Support private registry scenario (#69)
snehapar9 Nov 7, 2023
0742a90
Remove env as a required arg (#72)
snehapar9 Nov 7, 2023
f41e2a3
Update targeted builders to 20231107.2
daniv-msft Nov 9, 2023
ce214ee
Merge pull request #74 from Azure/daniv/updateBuilderV2Main
daniv-msft Nov 9, 2023
be9f91d
Build and push non cloud scenarios from GHA (#75)
snehapar9 Nov 9, 2023
6d61150
Test oidc
snehapar9 Nov 9, 2023
821a725
Add --debug
snehapar9 Nov 9, 2023
572e093
Target `update` flow
snehapar9 Nov 9, 2023
c92c9fe
Hard code location to westus2
snehapar9 Nov 10, 2023
d7e5618
Target `up` flow
snehapar9 Nov 10, 2023
969843d
Change location eastus
snehapar9 Nov 10, 2023
bb9db59
hardcode eastus location
snehapar9 Nov 10, 2023
7612b85
Remove location
snehapar9 Nov 10, 2023
e322827
Remove location from up
snehapar9 Nov 10, 2023
a3b28dd
Hard code west us for testing
snehapar9 Nov 11, 2023
4bae842
Set location dynamically
snehapar9 Nov 11, 2023
5b3fb36
Modify location
snehapar9 Nov 11, 2023
1cb0ece
Comment default location
snehapar9 Nov 11, 2023
c4e2d3f
Set location if resource group was provided
snehapar9 Nov 11, 2023
8cf51c5
Fix rg failure
snehapar9 Nov 11, 2023
a0cf129
Fix env show command
snehapar9 Nov 11, 2023
72b2602
Fix command to get location
snehapar9 Nov 11, 2023
fe7201b
Trigger pipeline and test
snehapar9 Nov 11, 2023
3d412d9
Fix command to get location
snehapar9 Nov 11, 2023
53e3633
Fix command to get location
snehapar9 Nov 11, 2023
a2b4294
Trigger pipeline and fix location
snehapar9 Nov 11, 2023
10bb007
Fix location and trigger pipeline
snehapar9 Nov 11, 2023
487a275
Remove location from up
snehapar9 Nov 11, 2023
c2a692c
Hardcode westus
snehapar9 Nov 11, 2023
64c84c1
Remove west us from being hardcoded
snehapar9 Nov 11, 2023
e95c19a
Add param for location
snehapar9 Nov 11, 2023
3d42700
Fix location bug
snehapar9 Nov 11, 2023
145abc7
Fix location
snehapar9 Nov 11, 2023
24b2289
Set location
snehapar9 Nov 12, 2023
20deea6
Change logic to set location
snehapar9 Nov 12, 2023
f233369
Set location
snehapar9 Nov 12, 2023
d48d1a5
Add check to see if env is null
snehapar9 Nov 12, 2023
dafec68
Check if env is provided
snehapar9 Nov 12, 2023
620b95f
Fix logic to set location
snehapar9 Nov 12, 2023
e700193
Merge branch 'snehapar/Remove-hardcoded-location' into snehpar/test-oidc
snehapar9 Nov 12, 2023
a1f0c01
Update logic to set location
snehapar9 Nov 12, 2023
765a9e9
Re-trigger pipeline
snehapar9 Nov 12, 2023
545e142
Trigger pipeline
snehapar9 Nov 12, 2023
446328f
Add comments
snehapar9 Nov 12, 2023
ce62175
Remove space
snehapar9 Nov 12, 2023
d2cf879
Remove location param
snehapar9 Nov 12, 2023
6803538
Remove location
snehapar9 Nov 12, 2023
65c009f
Merge branch 'snehapar/Remove-hardcoded-location' into snehpar/test-oidc
snehapar9 Nov 12, 2023
e3831ca
Refactor
snehapar9 Nov 12, 2023
ecc3356
Reorder arguments
snehapar9 Nov 12, 2023
601c03d
Address PR comments
snehapar9 Nov 13, 2023
a27cb86
Merge branch 'snehapar/Remove-hardcoded-location' into snehpar/test-oidc
snehapar9 Nov 13, 2023
078fab1
Fix typo
snehapar9 Nov 13, 2023
9149993
Fix typo
snehapar9 Nov 13, 2023
cfd414e
Fix PR comments
snehapar9 Nov 14, 2023
4faa464
Address PR comments
snehapar9 Nov 14, 2023
2d3f30a
Revert change to set this.containerrAppExists
snehapar9 Nov 14, 2023
d2d7d4a
Refactor
snehapar9 Nov 14, 2023
0a40db5
Add comment
snehapar9 Nov 14, 2023
01a9bf5
Merge branch 'snehapar/Remove-hardcoded-location' into snehpar/test-oidc
snehapar9 Nov 14, 2023
7f93845
Change validation pipeline name
snehapar9 Nov 14, 2023
fda46d7
Merge branch 'snehapar/Remove-hardcoded-location' into snehpar/test-oidc
snehapar9 Nov 14, 2023
e4738a8
Install latest version of cli
snehapar9 Nov 14, 2023
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.

87 changes: 87 additions & 0 deletions .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_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 @@ -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_EXISTING_CONTAINER_APP }}
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_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