From be557b5ce3db0e4dc9dd3c9bed0ad196101dc6de Mon Sep 17 00:00:00 2001 From: mkolasinski-splunk <105011638+mkolasinski-splunk@users.noreply.github.com> Date: Thu, 11 Jan 2024 13:08:39 +0100 Subject: [PATCH] fix: ADDON-67588 internal repo installation (#215) Fix for reported [ADDON-67588](https://splunk.atlassian.net/browse/ADDON-67588) problem with installation of internal repositories. In `reusable-build-test-release.yml` GH_TOKEN_ADMIN is used for authentication against https://github.com In `test-addon.sh` GITHUB_USERNAME and GITHUB_PASSWORD are used for authentication against https://github.com Related PR: https://github.com/splunk/ta-automation-k8s-manifests/pull/75 Tested on: https://github.com/splunk/splunk-add-on-for-microsoft-cloud-services/actions/runs/7468842506/job/20340167700 --- .github/workflows/reusable-build-test-release.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 237c5295e..a9994eb13 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -443,6 +443,7 @@ jobs: poetry export --without-hashes --dev -o requirements_dev.txt fi if [ ! -f requirements_dev.txt ]; then echo no requirements;exit 0 ;fi + git config --global url."https://${{ secrets.GH_TOKEN_ADMIN }}@github.com".insteadOf https://github.com pip install -r requirements_dev.txt - name: Create directories run: | @@ -491,6 +492,7 @@ jobs: poetry export --without-hashes --dev -o requirements_dev.txt fi if [ ! -f requirements_dev.txt ]; then echo no requirements;exit 0 ;fi + git config --global url."https://${{ secrets.GH_TOKEN_ADMIN }}@github.com".insteadOf https://github.com pip install -r requirements_dev.txt - name: Create directories run: | @@ -571,7 +573,9 @@ jobs: ${{ runner.os }}-pip- - name: Install deps if: ${{ steps.checklibs.outputs.ENABLED == 'true' }} - run: pip install -r requirements_dev.txt + run: | + git config --global url."https://${{ secrets.GH_TOKEN_ADMIN }}@github.com".insteadOf https://github.com + pip install -r requirements_dev.txt - name: Semantic Release Get Next id: semantic if: github.event_name != 'pull_request' @@ -701,7 +705,9 @@ jobs: key: ${{ runner.os }}-pip-python3_9-${{ hashFiles('requirements_dev.txt') }} restore-keys: | ${{ runner.os }}-pip-python3_9 - - run: pip install -r requirements_dev.txt + - run: | + git config --global url."https://${{ secrets.GH_TOKEN_ADMIN }}@github.com".insteadOf https://github.com + pip install -r requirements_dev.txt - id: semantic if: github.event_name != 'pull_request' uses: splunk/semantic-release-action@v1.3