Skip to content

Commit deaf4f1

Browse files
fix: deps handling from gh runner to pod (#364)
### Description This PR is addressing issue with deps installation when multiple pods are trying to install deps in the same time: https://splunk.atlassian.net/browse/ADDON-78266 To be reviewed together with: splunk/ta-automation-k8s-manifests#116 virtual environment is first build on github runner filesystem, site-packages are passed to aws s3, and finally downloaded directly to the empty venv on pods filesystem. ### Checklist - [x] `README.md` has been updated or is not required - [ ] push trigger tests - [ ] manual release test - [ ] automated releases test - [x] pull request trigger tests - [ ] schedule trigger tests - [ ] workflow errors/warnings reviewed and addressed ### Testing done https://github.com/splunk/splunk-add-on-for-amazon-web-services/actions/runs/13140796010/job/36787923223 https://github.com/splunk/splunk-add-on-for-google-workspace/actions/runs/13153265349/job/36784656491 --------- Co-authored-by: kdoroszko-splunk <kdoroszko@splunk.com>
1 parent 91a40d2 commit deaf4f1

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

.github/workflows/reusable-build-test-release.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ on:
3939
required: false
4040
description: "branch for k8s manifests to run the tests on"
4141
type: string
42-
default: "v3.3.1"
42+
default: "v3.4"
4343
scripted-inputs-os-list:
4444
required: false
4545
description: "list of OS used for scripted input tests"
@@ -989,13 +989,17 @@ jobs:
989989
uses: actions/setup-python@v5
990990
with:
991991
python-version: 3.7
992+
- name: setup-poetry
993+
id: setup-poetry
994+
shell: bash
995+
run: |
996+
python3.7 -m pip install poetry==1.5.1
992997
- name: modinput-test-prerequisites
993998
if: steps.download-openapi.conclusion != 'skipped'
994999
shell: bash
9951000
env:
9961001
PYTHON_KEYRING_BACKEND: keyring.backends.null.Keyring
9971002
run: |
998-
python3.7 -m pip install poetry==1.5.1
9991003
export POETRY_REPOSITORIES_SPLUNK_ADD_ON_UCC_MODINPUT_TEST_URL=https://github.com/splunk/addonfactory-ucc-test.git
10001004
export POETRY_HTTP_BASIC_SPLUNK_ADD_ON_UCC_MODINPUT_TEST_USERNAME=${{ secrets.SA_GH_USER_NAME }}
10011005
export POETRY_HTTP_BASIC_SPLUNK_ADD_ON_UCC_MODINPUT_TEST_PASSWORD=${{ secrets.GH_TOKEN_ADMIN }}
@@ -1005,6 +1009,20 @@ jobs:
10051009
else
10061010
poetry run ucc-test-modinput -o ${{ steps.download-openapi.outputs.download-path }}/openapi.json -t ${{ steps.download-openapi.outputs.download-path }}/tmp/
10071011
fi
1012+
- name: upload-libs-to-s3
1013+
id: upload-libs-to-s3
1014+
env:
1015+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
1016+
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
1017+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
1018+
run: |
1019+
git config --global --add url."https://${{ secrets.GH_TOKEN_ADMIN }}@github.com".insteadOf https://github.com
1020+
git config --global --add url."https://${{ secrets.GH_TOKEN_ADMIN }}@github.com".insteadOf ssh://git@github.com
1021+
poetry install --with dev
1022+
libs_archive=libs_$(basename "$BUILD_NAME" .spl).tgz
1023+
cp -r "$(find "$(poetry env info --path)" -maxdepth 3 -type d -name "site-packages")" libs/
1024+
tar -czf "$libs_archive" libs
1025+
aws s3 cp "$libs_archive" "s3://${{ needs.setup-workflow.outputs.s3_bucket_k8s }}/ta-apps/$libs_archive" --only-show-errors
10081026
- name: upload-swagger-artifacts-to-s3
10091027
if: steps.download-openapi.conclusion != 'skipped'
10101028
id: swaggerupload

0 commit comments

Comments
 (0)