From bdcf631892801e40d834bdf2abeb06ab8b0a60e2 Mon Sep 17 00:00:00 2001 From: aleksandarpan <75281813+aleksandarpan@users.noreply.github.com> Date: Tue, 13 Sep 2022 14:31:35 +0200 Subject: [PATCH 01/14] Update App.js --- src/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index 4bb3e33..3d1ca22 100644 --- a/src/App.js +++ b/src/App.js @@ -7,7 +7,7 @@ function App() {
logo -

Bye there!

+

Bye there! by Aleksandar Panchevski

Date: Tue, 13 Sep 2022 14:33:48 +0200 Subject: [PATCH 02/14] Update App.js dodadeno tekst --- src/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index 3d1ca22..a94b133 100644 --- a/src/App.js +++ b/src/App.js @@ -7,7 +7,7 @@ function App() {
logo -

Bye there! by Aleksandar Panchevski

+

Bye there! by Aleksandar Panchevski

Date: Wed, 14 Sep 2022 10:43:29 +0200 Subject: [PATCH 03/14] Update App.js --- src/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index a94b133..2ac0c1c 100644 --- a/src/App.js +++ b/src/App.js @@ -14,7 +14,7 @@ function App() { target="_blank" rel="noopener noreferrer" > - Learn React + Learn React so Aleksandar Panchevski
From 2f99dc5450c34ccbc6e7742738ab78bea996ee54 Mon Sep 17 00:00:00 2001 From: aleksandarpan <75281813+aleksandarpan@users.noreply.github.com> Date: Wed, 14 Sep 2022 15:22:52 +0200 Subject: [PATCH 04/14] Update App.js --- src/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index 2ac0c1c..a94b133 100644 --- a/src/App.js +++ b/src/App.js @@ -14,7 +14,7 @@ function App() { target="_blank" rel="noopener noreferrer" > - Learn React so Aleksandar Panchevski + Learn React
From bcab674c0adf3b370c63e2d96494de290bcce512 Mon Sep 17 00:00:00 2001 From: aleksandarpan <75281813+aleksandarpan@users.noreply.github.com> Date: Fri, 16 Sep 2022 15:17:07 +0200 Subject: [PATCH 05/14] Add workflow to deploy to AKS --- .github/workflows/ReactAppWorkflow.yaml | 58 +++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/ReactAppWorkflow.yaml diff --git a/.github/workflows/ReactAppWorkflow.yaml b/.github/workflows/ReactAppWorkflow.yaml new file mode 100644 index 0000000..fab09b7 --- /dev/null +++ b/.github/workflows/ReactAppWorkflow.yaml @@ -0,0 +1,58 @@ +name: ReactAppWorkflow +"on": + push: + branches: + - master + workflow_dispatch: {} +env: + ACR_RESOURCE_GROUP: AKSrg + AZURE_CONTAINER_REGISTRY: AKSregistar + CLUSTER_NAME: AKSclusterCICD + CLUSTER_RESOURCE_GROUP: AKSrg + CONTAINER_NAME: mypdfsample + DEPLOYMENT_MANIFEST_PATH: | + ./docker-compose.yml +jobs: + buildImage: + permissions: + contents: read + id-token: write + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: azure/login@v1.4.3 + name: Azure login + with: + client-id: ${{ secrets.AZURE_CLIENT_ID }} + subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} + tenant-id: ${{ secrets.AZURE_TENANT_ID }} + - name: Build and push image to ACR + run: az acr build --image ${{ env.CONTAINER_NAME }}:${{ github.sha }} --registry ${{ env.AZURE_CONTAINER_REGISTRY }} -g ${{ env.ACR_RESOURCE_GROUP }} -f ./Dockerfile ./ + deploy: + permissions: + actions: read + contents: read + id-token: write + runs-on: ubuntu-latest + needs: + - buildImage + steps: + - uses: actions/checkout@v3 + - uses: azure/login@v1.4.3 + name: Azure login + with: + client-id: ${{ secrets.AZURE_CLIENT_ID }} + subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} + tenant-id: ${{ secrets.AZURE_TENANT_ID }} + - uses: azure/aks-set-context@v3 + name: Get K8s context + with: + cluster-name: ${{ env.CLUSTER_NAME }} + resource-group: ${{ env.CLUSTER_RESOURCE_GROUP }} + - uses: Azure/k8s-deploy@v4 + name: Deploys application + with: + action: deploy + images: ${{ env.AZURE_CONTAINER_REGISTRY }}.azurecr.io/${{ env.CONTAINER_NAME }}:${{ github.sha }} + manifests: ${{ env.DEPLOYMENT_MANIFEST_PATH }} + namespace: namespace-workflow-1663333883688 From ca3593af9cd4768042b6b2fccfdabaad0d27b89c Mon Sep 17 00:00:00 2001 From: aleksandarpan <75281813+aleksandarpan@users.noreply.github.com> Date: Thu, 29 Sep 2022 14:46:23 +0200 Subject: [PATCH 06/14] ke uspeam --- src/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index a94b133..4cf8853 100644 --- a/src/App.js +++ b/src/App.js @@ -7,7 +7,7 @@ function App() {
logo -

Bye there! by Aleksandar Panchevski

+

Bye there! by Aleksandar Panchevski ke uspeam

Date: Thu, 29 Sep 2022 15:03:28 +0200 Subject: [PATCH 07/14] Update App.js --- src/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index 4cf8853..3e6e20e 100644 --- a/src/App.js +++ b/src/App.js @@ -7,7 +7,7 @@ function App() {
logo -

Bye there! by Aleksandar Panchevski ke uspeam

+

Bye there! by Aleksandar Panchevski ke uspeam.

Date: Thu, 29 Sep 2022 15:20:02 +0200 Subject: [PATCH 08/14] ke uspeam. --- src/App.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index 3e6e20e..f4c2bf0 100644 --- a/src/App.js +++ b/src/App.js @@ -7,7 +7,8 @@ function App() {
logo -

Bye there! by Aleksandar Panchevski ke uspeam.

+

Bye there! by Aleksandar Panchevski ke uspeam. +

Date: Thu, 29 Sep 2022 16:37:33 +0200 Subject: [PATCH 09/14] Update App.js --- src/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index f4c2bf0..99effd9 100644 --- a/src/App.js +++ b/src/App.js @@ -7,7 +7,7 @@ function App() {
logo -

Bye there! by Aleksandar Panchevski ke uspeam. +

Bye there! by AleksandarPanchevski ke uspeam.

Date: Thu, 29 Sep 2022 16:47:43 +0200 Subject: [PATCH 10/14] Update App.js --- src/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index 99effd9..9676716 100644 --- a/src/App.js +++ b/src/App.js @@ -7,7 +7,7 @@ function App() {
logo -

Bye there! by AleksandarPanchevski ke uspeam. +

Bye there! by AleksandarPanchevski ke uspeam

Date: Thu, 29 Sep 2022 16:49:04 +0200 Subject: [PATCH 11/14] Update App.js --- src/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index 9676716..cd534c3 100644 --- a/src/App.js +++ b/src/App.js @@ -7,7 +7,7 @@ function App() {
logo -

Bye there! by AleksandarPanchevski ke uspeam +

Bye there! by AleksandarPanchevski ke uspeam.

Date: Thu, 29 Sep 2022 17:49:01 +0200 Subject: [PATCH 12/14] Add or update the App Service deployment workflow configuration from Azure Portal. --- .github/workflows/master_reactaplikacija.yml | 51 ++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/master_reactaplikacija.yml diff --git a/.github/workflows/master_reactaplikacija.yml b/.github/workflows/master_reactaplikacija.yml new file mode 100644 index 0000000..38ca169 --- /dev/null +++ b/.github/workflows/master_reactaplikacija.yml @@ -0,0 +1,51 @@ +# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy +# More GitHub Actions for Azure: https://github.com/Azure/actions + +name: Build and deploy container app to Azure Web App - reactaplikacija + +on: + push: + branches: + - master + workflow_dispatch: + +jobs: + build: + runs-on: 'ubuntu-latest' + + steps: + - uses: actions/checkout@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Log in to registry + uses: docker/login-action@v1 + with: + registry: https://acrreactapp.azurecr.io/ + username: ${{ secrets.AzureAppService_ContainerUsername_79a092e655204a13bed2db21a644bb06 }} + password: ${{ secrets.AzureAppService_ContainerPassword_aa90a770b7be408eb64e80791df62749 }} + + - name: Build and push container image to registry + uses: docker/build-push-action@v2 + with: + push: true + tags: acrreactapp.azurecr.io/${{ secrets.AzureAppService_ContainerUsername_79a092e655204a13bed2db21a644bb06 }}/reactwebapp:${{ github.sha }} + file: ./Dockerfile + + deploy: + runs-on: ubuntu-latest + needs: build + environment: + name: 'production' + url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} + + steps: + - name: Deploy to Azure Web App + id: deploy-to-webapp + uses: azure/webapps-deploy@v2 + with: + app-name: 'reactaplikacija' + slot-name: 'production' + publish-profile: ${{ secrets.AzureAppService_PublishProfile_62132923a03c4bd78e08b92317fcea26 }} + images: 'acrreactapp.azurecr.io/${{ secrets.AzureAppService_ContainerUsername_79a092e655204a13bed2db21a644bb06 }}/reactwebapp:${{ github.sha }}' \ No newline at end of file From 140a17864b2b7cdbe67f510f8b35ecc9e0c11bf2 Mon Sep 17 00:00:00 2001 From: aleksandarpan <75281813+aleksandarpan@users.noreply.github.com> Date: Thu, 29 Sep 2022 17:55:20 +0200 Subject: [PATCH 13/14] Update App.js --- src/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index cd534c3..b28c6cf 100644 --- a/src/App.js +++ b/src/App.js @@ -7,7 +7,7 @@ function App() {