-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3ad4cb7
commit 17826ab
Showing
12 changed files
with
85 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,12 @@ on: | |
- 'src/AzureContainerApps/**' | ||
|
||
env: | ||
imageName: apim-car-app | ||
app_path: ./src/AzureContainerApps/DEPLOY.CarApp.API | ||
app_root: ./src/AzureContainerApps | ||
image_name: apim-car-api | ||
resource_group: rg-apim-canal-deploy-apps-lab | ||
app_name: ca-apim-car-app-lab | ||
aca_env: cae-apim-canal-deploy-apps-lab | ||
|
||
jobs: | ||
build: | ||
|
@@ -54,7 +59,7 @@ jobs: | |
run: dotnet --version | ||
|
||
- name: Install dependencies | ||
run: dotnet restore src/AzureContainerApps/DEPLOY.CarApp.API/DEPLOY.CarApp.API.csproj | ||
run: dotnet restore ${{ env.app_path }}/**.csproj | ||
|
||
- name: Build and push Docker image | ||
uses: docker/[email protected] | ||
|
@@ -72,10 +77,10 @@ jobs: | |
- name: Build and push Docker image | ||
run: | | ||
docker buildx build -f ./src/AzureContainerApps/DEPLOY.CarApp.API/Dockerfile -t ${{ github.actor }}/${{ env.imageName }}:${{ steps.get-version.outputs.tag }} ./src/AzureContainerApps | ||
docker tag ${{ github.actor }}/${{ env.imageName }}:${{ steps.get-version.outputs.tag }} ${{ github.actor }}/${{ env.imageName }}:latest | ||
docker push ${{ github.actor }}/${{ env.imageName }}:${{ steps.get-version.outputs.tag }} | ||
docker push ${{ github.actor }}/${{ env.imageName }}:latest | ||
docker buildx build -f ${{ env.app_path }}/Dockerfile -t ${{ github.actor }}/${{ env.image_name }}:${{ steps.get-version.outputs.tag }} ${{ env.app_root }} | ||
docker tag ${{ github.actor }}/${{ env.image_name }}:${{ steps.get-version.outputs.tag }} ${{ github.actor }}/${{ env.image_name }}:latest | ||
docker push ${{ github.actor }}/${{ env.image_name }}:${{ steps.get-version.outputs.tag }} | ||
docker push ${{ github.actor }}/${{ env.image_name }}:latest | ||
deploy: | ||
if: ${{ github.event_name != 'pull_request' }} | ||
|
@@ -91,12 +96,11 @@ jobs: | |
- name: Deploy to Azure Container App | ||
uses: azure/container-apps-deploy-action@v2 | ||
with: | ||
# appSourcePath: ${{ github.workspace }}/src/AzureContainerApps/ | ||
containerAppName: ca-apim-car-app-lab | ||
containerAppEnvironment: cae-apim-canal-deploy-apps-lab | ||
containerAppName: ${{ env.app_name }} | ||
containerAppEnvironment: ${{ env.aca_env }} | ||
registryUrl: docker.io | ||
imageToDeploy: docker.io/felipementel/${{ env.imageName }}:${{ needs.build.outputs.imageTag }} | ||
resourceGroup: rg-apim-canal-deploy-apps-lab | ||
imageToDeploy: docker.io/${{ github.actor }}/${{ env.imageName }}:${{ needs.build.outputs.imageTag }} | ||
resourceGroup: ${{ env.resourceGroup }} | ||
targetPort: 8080 | ||
location: brazilsouth | ||
environmentVariables: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,10 +28,11 @@ on: | |
|
||
env: | ||
AZURE_FUNCTIONAPP_PACKAGE_PATH: 'src/AzureFunction' | ||
app_name: func-apim-bike-api-lab | ||
|
||
jobs: | ||
build: | ||
environment: lab | ||
# environment: lab | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
|
@@ -93,7 +94,7 @@ jobs: | |
uses: Azure/[email protected] | ||
id: deploy-function-app | ||
with: | ||
app-name: 'func-apim-bike-app' # -lab | ||
app-name: ${{ env.APP_NAME }} | ||
slot-name: 'production' | ||
publish-profile: ${{ secrets.FUNCTION_PUBLISH_PROFILE }} | ||
package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}/output | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,11 +27,15 @@ on: | |
- 'src/AzureWebApp/**' | ||
|
||
env: | ||
imageName: apim-food-app | ||
app_path: ./src/AzureWebApp/DEPLOY.FoodApp.API | ||
app_root: ./src/AzureWebApp | ||
image_name: apim-food-api | ||
resource_group: rg-apim-canal-deploy-apps-lab | ||
app_name: app-apim-food-app-lab | ||
|
||
jobs: | ||
build: | ||
# environment: lab | ||
# environment: lab | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
|
@@ -55,7 +59,7 @@ jobs: | |
run: dotnet --version | ||
|
||
- name: Install dependencies | ||
run: dotnet restore src/AzureWebApp/DEPLOY.FoodApp.API/DEPLOY.FoodApp.API.csproj | ||
run: dotnet restore ${{ env.app_path }}/*.csproj | ||
|
||
- name: Build and push Docker image | ||
uses: docker/[email protected] | ||
|
@@ -68,15 +72,15 @@ jobs: | |
id: get-version | ||
shell: bash | ||
run: | | ||
version=$(sed -n 's/.*<Version>\(.*\)<\/Version>.*/\1/p' ./src/AzureWebApp/DEPLOY.FoodApp.API/DEPLOY.FoodApp.API.csproj) | ||
version=$(sed -n 's/.*<Version>\(.*\)<\/Version>.*/\1/p' ${{ env.app_path }}/*.csproj) | ||
echo "tag=$version" >> "$GITHUB_OUTPUT" | ||
- name: Build and push Docker image | ||
run: | | ||
docker buildx build -f ./src/AzureWebApp/DEPLOY.FoodApp.API/Dockerfile -t ${{ github.actor }}/${{ env.imageName }}:${{ steps.get-version.outputs.tag }} ./src/AzureWebApp | ||
docker tag ${{ github.actor }}/${{ env.imageName }}:${{ steps.get-version.outputs.tag }} ${{ github.actor }}/${{ env.imageName }}:latest | ||
docker push ${{ github.actor }}/${{ env.imageName }}:${{ steps.get-version.outputs.tag }} | ||
docker push ${{ github.actor }}/${{ env.imageName }}:latest | ||
docker buildx build -f ${{ env.app_path }}/Dockerfile -t ${{ github.actor }}/${{ env.image_name }}:${{ steps.get-version.outputs.tag }} ${{ env.app_root }} | ||
docker tag ${{ github.actor }}/${{ env.image_name }}:${{ steps.get-version.outputs.tag }} ${{ github.actor }}/${{ env.image_name }}:latest | ||
docker push ${{ github.actor }}/${{ env.image_name }}:${{ steps.get-version.outputs.tag }} | ||
docker push ${{ github.actor }}/${{ env.image_name }}:latest | ||
deploy: | ||
if: ${{ github.event_name != 'pull_request' }} | ||
|
@@ -92,15 +96,15 @@ jobs: | |
- name: Deploy to Azure Web App | ||
uses: azure/[email protected] | ||
with: | ||
app-name: app-apim-food-app-lab | ||
app-name: ${{ env.app_name }} | ||
slot-name: production | ||
publish-profile: ${{ secrets.WEBAPP_PUBLISH_PROFILE }} | ||
images: docker.io/${{ github.actor }}/${{ env.imageName }}:${{ needs.build.outputs.imageTag }} | ||
images: docker.io/${{ github.actor }}/${{ env.image_name }}:${{ needs.build.outputs.imageTag }} | ||
|
||
- name: Set Web App ACR authentication | ||
uses: Azure/appservice-settings@v1 | ||
with: | ||
app-name: app-apim-food-app-lab | ||
app-name: | ||
app-settings-json: | | ||
[ | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule k6-loadtesting
added at
e93a25