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

Trigger pipeline for Snehapar/test private registry #70

Closed
wants to merge 106 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
1c6a07a
Convert composite action to typescript (#61)
snehapar9 Oct 17, 2023
0383b9f
Initial commit to support private registry scenario
snehapar9 Nov 1, 2023
ce4ac15
Add global var to delegate build to CLI
snehapar9 Nov 2, 2023
30fd911
Update condition to use CLI
snehapar9 Nov 2, 2023
4d3b82e
Fix formatting
snehapar9 Nov 2, 2023
88c1664
Update validation for internal registry scenario
snehapar9 Nov 2, 2023
14be3d1
Address PR comments
snehapar9 Nov 2, 2023
68c4f2b
Update condition to use internal registry
snehapar9 Nov 3, 2023
5202836
Test validation for internal registry scenario
snehapar9 Nov 3, 2023
2c44254
Get value of imageToBuild before build
snehapar9 Nov 3, 2023
d60d1ad
Fetch imageToBuild arg and test
snehapar9 Nov 3, 2023
82fc8a6
Move code to fetch imageToBuild in validation
snehapar9 Nov 3, 2023
7504bcc
Install extension
snehapar9 Nov 3, 2023
91c1220
Trigger pipeline
snehapar9 Nov 3, 2023
9d3dbbe
Re-trigger pipeline to install extensions
snehapar9 Nov 3, 2023
f8db478
Re-trigger pipeline to isntall extension
snehapar9 Nov 3, 2023
5e7f726
Install extension and re-trigger pipeline
snehapar9 Nov 3, 2023
66a9c87
Explicitly install extension
snehapar9 Nov 3, 2023
ac8d5e0
Trigger pipeline
snehapar9 Nov 3, 2023
e65fde1
Re-trigger pipeline
snehapar9 Nov 3, 2023
392e298
Change whl name
snehapar9 Nov 4, 2023
fe94eb9
Fix pipeline failure and re-trigger
snehapar9 Nov 4, 2023
7d001e7
Fix pipeline failures
snehapar9 Nov 6, 2023
e6fd4b0
Install extension explicitly
snehapar9 Nov 6, 2023
aaa10e0
Fix valiation failures
snehapar9 Nov 6, 2023
030ce76
Fix validation failures
snehapar9 Nov 6, 2023
e8a0560
Test validation failures
snehapar9 Nov 6, 2023
fb20d01
Test validation failures
snehapar9 Nov 6, 2023
565772d
Remove location
snehapar9 Nov 6, 2023
eae94cc
Test validation pipeline
snehapar9 Nov 6, 2023
b24e0bd
Test validation pipeline
snehapar9 Nov 6, 2023
53b5515
Test validation pipeline
snehapar9 Nov 6, 2023
f8cf64f
Test validation pipeline
snehapar9 Nov 6, 2023
ea2178d
Test validation pipeline
snehapar9 Nov 6, 2023
7044f5d
Trigger validation pipeline
snehapar9 Nov 6, 2023
0df8476
Test validation pipeline
snehapar9 Nov 6, 2023
e06372b
Address validation failures
snehapar9 Nov 6, 2023
751a10d
Address PR discussion comments
snehapar9 Nov 6, 2023
8aeb783
Made `imageToDeploy` optional
snehapar9 Nov 6, 2023
2bb7743
Remove step to install whl
snehapar9 Nov 6, 2023
fbd86a2
Address PR comments
snehapar9 Nov 6, 2023
6c4911f
Addressed PR comments
snehapar9 Nov 6, 2023
bbe7c90
Fix typo
snehapar9 Nov 6, 2023
a90481a
Remove space
snehapar9 Nov 6, 2023
8772387
Merge branch 'snehapar/Suppor-private-registry
snehapar9 Nov 6, 2023
3af7b4a
Fix merge failure
snehapar9 Nov 6, 2023
3157879
Remove --debug
snehapar9 Nov 6, 2023
6cb173e
Test registry scenario
snehapar9 Nov 7, 2023
fd223cc
Fix merge failures and re-trigger pipeline
snehapar9 Nov 7, 2023
023d186
Add --debug
snehapar9 Nov 7, 2023
2b1f195
Create containerapp with up
snehapar9 Nov 7, 2023
c82c5bb
Create container app with up
snehapar9 Nov 7, 2023
8f4224e
Trigger validation pipeline
snehapar9 Nov 7, 2023
4afc10e
Test container app creation with up
snehapar9 Nov 7, 2023
6865750
Add location to up command
snehapar9 Nov 7, 2023
2b40846
Use up for just private registry scenario
snehapar9 Nov 7, 2023
0911425
Change rg for update scenario
snehapar9 Nov 7, 2023
2591105
Remove step to delete pushed image
snehapar9 Nov 7, 2023
a881a4e
Test containerapp update with up
snehapar9 Nov 7, 2023
43f6f95
Migrate latest changes from v1 to v2 (#68)
cormacpayne Nov 7, 2023
f089aa7
Merge branch 'v2-main' of https://github.com/azure/container-apps-dep…
cormacpayne Nov 7, 2023
8478b47
Hard code location
snehapar9 Nov 7, 2023
4e84426
Support private registry scenario (#69)
snehapar9 Nov 7, 2023
6a94929
Test changes to remove env
snehapar9 Nov 7, 2023
c7a73b2
Update capp name and test
snehapar9 Nov 7, 2023
9f15b69
Test update scenarios
snehapar9 Nov 7, 2023
d39f746
Trigger pipeline
snehapar9 Nov 7, 2023
0742a90
Remove env as a required arg (#72)
snehapar9 Nov 7, 2023
a0cc18c
Add validation to update with dockerfile
snehapar9 Nov 7, 2023
4f9956a
Remove --debug
snehapar9 Nov 7, 2023
91785da
Remove env
snehapar9 Nov 7, 2023
e278e20
Trigger pipeline for eastus
snehapar9 Nov 8, 2023
39907e2
Snap to containerapp version 0.3.43
snehapar9 Nov 8, 2023
9511b8a
Modify update command
snehapar9 Nov 8, 2023
aa5b9ce
Comment out imageToDeploy
snehapar9 Nov 8, 2023
f8b23d9
Add --debug to the update command
snehapar9 Nov 8, 2023
8a70be2
Comment out `--source`
snehapar9 Nov 8, 2023
4e1a239
Enable build and push from ghs
snehapar9 Nov 8, 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
dd26931
Build and push from gha
snehapar9 Nov 9, 2023
a2bb8e1
Ensuer -i and --source are not used together
snehapar9 Nov 9, 2023
ab77c77
Fix typo
snehapar9 Nov 9, 2023
59f80db
Revert comment
snehapar9 Nov 9, 2023
7f11cb2
Merge branch 'snehapar/Fix-portal-failure' into snehapar/test-private…
snehapar9 Nov 9, 2023
74ddeef
Fix syntax error
snehapar9 Nov 9, 2023
5ebb653
Fix syntax error
snehapar9 Nov 9, 2023
fa81380
Fix syntax errors
snehapar9 Nov 9, 2023
1adcc28
Fix syntax errors
snehapar9 Nov 9, 2023
64289e5
Fix pipeline failures
snehapar9 Nov 9, 2023
67f2e61
Fix validation failures
snehapar9 Nov 9, 2023
3e721e5
Trigger pipeline
snehapar9 Nov 9, 2023
d7d06e6
Add global var to determine cloud build scenario
snehapar9 Nov 9, 2023
a1fd970
Merge branch 'snehapar/Fix-portal-failure' into snehapar/test-private…
snehapar9 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
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
e214177
Merge branch 'snehpar/test-oidc' into snehapar/test-private-registry
snehapar9 Nov 11, 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
678 changes: 678 additions & 0 deletions .github/workflows/run-validation-oidc.yml

Large diffs are not rendered by default.

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

jobs:
create-using-builder:


name: 'Create app using builder'
runs-on: ubuntu-latest
timeout-minutes: 10
Expand Down Expand Up @@ -64,7 +66,47 @@ 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 Expand Up @@ -534,4 +621,45 @@ jobs:
yamlConfigPath: ${{ env.TEST_YAML_FILE_PATH }}
containerAppName: ${{ env.TEST_CONTAINER_APP_NAME }}
resourceGroup: ${{ vars.TEST_RESOURCE_GROUP_NAME }}
disableTelemetry: ${{ vars.TEST_DISABLE_TELEMETRY }}
disableTelemetry: ${{ vars.TEST_DISABLE_TELEMETRY }}

update-using-found-dockerfile:
name: 'Update app using found Dockerfile'
runs-on: ubuntu-latest
timeout-minutes: 10

env:
TEST_IMAGE_TAG: 'fd-${{ github.run_id }}'
TEST_CONTAINER_APP_NAME: 'gh-ca-fd-${{ 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/Blazor_Function_Sample/blazor-sample-app'
acrName: ${{ vars.TEST_ACR_NAME }}
acrUsername: ${{ secrets.TEST_REGISTRY_USERNAME }}
acrPassword: ${{ secrets.TEST_REGISTRY_PASSWORD }}
containerAppName: ${{ vars.TEST_EXISTING_CONTAINER_APP_DOCKERFILE }}
resourceGroup: ${{ vars.TEST_RESOURCE_GROUP_NAME }}
imageToBuild: ${{ env.TEST_FULL_ACR_NAME }}/${{ env.TEST_IMAGE_REPOSITORY }}:${{ env.TEST_IMAGE_TAG }}
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
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