From f9cbfd9613fe51a08471e0a242a81f9bff47958b Mon Sep 17 00:00:00 2001 From: Satish Kumar Date: Wed, 31 Jul 2024 18:32:47 +0530 Subject: [PATCH 1/5] chore: update git url before cloning enrichment plugin --- .github/workflows/pr-onto-dev.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-onto-dev.yaml b/.github/workflows/pr-onto-dev.yaml index 934030714..02d717919 100644 --- a/.github/workflows/pr-onto-dev.yaml +++ b/.github/workflows/pr-onto-dev.yaml @@ -24,7 +24,8 @@ jobs: docker login --username rudderlabs --password '${{ secrets.DOCKER_HUB_PASSWORD }}' export VERSION=${{ steps.branch-name.outputs.current_branch }} rm -rf rudder-alerta-enrichment-plugin - git clone -b "$(cat RUDDER_ENRICH_PLUGIN_BRANCH_NAME)" https://${{ secrets.PAT_USERNAME }}:${{ secrets.PAT }}@github.com/rudderlabs/rudder-alerta-enrichment-plugin.git + git config --global url."https://${{secrets.PAT}}:x-oauth-basic@github.com/rudderlabs".insteadOf "https://github.com/rudderlabs" + git clone -b "$(cat RUDDER_ENRICH_PLUGIN_BRANCH_NAME)" git clone https://github.com/rudderlabs/rudder-alerta-enrichment-plugin.git docker build --no-cache --build-arg=COMMIT_ID_VALUE="$(git log --format="%H" -n 1)" -t rudderlabs/alerta:$VERSION . docker push rudderlabs/alerta:$VERSION rm -rf rudder-alerta-enrichment-plugin From 010f1f5b01377919be2b857fbe7a40ccb7fcbad1 Mon Sep 17 00:00:00 2001 From: Satish Kumar Date: Wed, 31 Jul 2024 18:36:28 +0530 Subject: [PATCH 2/5] fix typo --- .github/workflows/pr-onto-dev.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-onto-dev.yaml b/.github/workflows/pr-onto-dev.yaml index 02d717919..fa36003e1 100644 --- a/.github/workflows/pr-onto-dev.yaml +++ b/.github/workflows/pr-onto-dev.yaml @@ -25,7 +25,7 @@ jobs: export VERSION=${{ steps.branch-name.outputs.current_branch }} rm -rf rudder-alerta-enrichment-plugin git config --global url."https://${{secrets.PAT}}:x-oauth-basic@github.com/rudderlabs".insteadOf "https://github.com/rudderlabs" - git clone -b "$(cat RUDDER_ENRICH_PLUGIN_BRANCH_NAME)" git clone https://github.com/rudderlabs/rudder-alerta-enrichment-plugin.git + git clone -b "$(cat RUDDER_ENRICH_PLUGIN_BRANCH_NAME)" https://github.com/rudderlabs/rudder-alerta-enrichment-plugin.git docker build --no-cache --build-arg=COMMIT_ID_VALUE="$(git log --format="%H" -n 1)" -t rudderlabs/alerta:$VERSION . docker push rudderlabs/alerta:$VERSION rm -rf rudder-alerta-enrichment-plugin From 00b2840e418bac24d3da18572a330d24964dc330 Mon Sep 17 00:00:00 2001 From: Satish Kumar Date: Wed, 31 Jul 2024 18:46:41 +0530 Subject: [PATCH 3/5] add .git to docker ignore --- .dockerignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.dockerignore b/.dockerignore index af09f1641..8f748352e 100644 --- a/.dockerignore +++ b/.dockerignore @@ -8,3 +8,4 @@ venv .coverage *.swp *.log +.git \ No newline at end of file From c0e5444215c65bd55bb4c0b2ec1d8ca54d07a28c Mon Sep 17 00:00:00 2001 From: Satish Kumar Date: Wed, 31 Jul 2024 18:52:53 +0530 Subject: [PATCH 4/5] update other workflow --- .github/workflows/push-onto-master.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/push-onto-master.yaml b/.github/workflows/push-onto-master.yaml index 2b8d2136c..df7ec3232 100644 --- a/.github/workflows/push-onto-master.yaml +++ b/.github/workflows/push-onto-master.yaml @@ -29,7 +29,8 @@ jobs: docker login --username rudderlabs --password '${{ secrets.DOCKER_HUB_PASSWORD }}' export VERSION=${{steps.version_check_staging.outputs.releaseVersion}} rm -rf rudder-alerta-enrichment-plugin - git clone -b "$(cat RUDDER_ENRICH_PLUGIN_BRANCH_NAME)" https://${{ secrets.PAT_USERNAME }}:${{ secrets.PAT }}@github.com/rudderlabs/rudder-alerta-enrichment-plugin.git + git config --global url."https://${{secrets.PAT}}:x-oauth-basic@github.com/rudderlabs".insteadOf "https://github.com/rudderlabs" + git clone -b "$(cat RUDDER_ENRICH_PLUGIN_BRANCH_NAME)" https://github.com/rudderlabs/rudder-alerta-enrichment-plugin.git docker build --no-cache --build-arg=COMMIT_ID_VALUE="$(git log --format="%H" -n 1)" -t rudderlabs/alerta:$VERSION . docker push rudderlabs/alerta:$VERSION rm -rf rudder-alerta-enrichment-plugin From 721238ef701e6b7c7ccd0bcbb6e11a0331bc3c54 Mon Sep 17 00:00:00 2001 From: Satish Kumar Date: Wed, 31 Jul 2024 19:37:06 +0530 Subject: [PATCH 5/5] ignore .git at all levels --- .dockerignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.dockerignore b/.dockerignore index 8f748352e..baf33970c 100644 --- a/.dockerignore +++ b/.dockerignore @@ -8,4 +8,4 @@ venv .coverage *.swp *.log -.git \ No newline at end of file +**/.git \ No newline at end of file