@@ -29,39 +29,13 @@ steps:
2929 - authenticate_with_oidc :
3030 service_account : <<parameters.service_account>>
3131 - run :
32- name : Cloudsmith - Check dist_dir exists
32+ name : Cloudsmith - Configure repository and dist_dir
3333 command : |
34- if [ -d "<<parameters.dist_dir>>" ]; then
35- echo "<<parameters.dist_dir>> is a valid directory"
36- else
37- echo "<<parameters.dist_dir>> is not a directory"
38- exit 1
39- fi
40- - run :
41- name : Cloudsmith - Upload source distribution(s)
42- command : |
43- for filename in <<parameters.dist_dir>>/*.tar.gz
44- do
45- [ -f "$filename" ] || continue
46-
47- echo "Uploading source distribution $filename to Cloudsmith repository $CLOUDSMITH_ORGANISATION/<<parameters.repository>> ..."
48-
49- cloudsmith push python --verbose --api-key "$CLOUDSMITH_OIDC_TOKEN" "$CLOUDSMITH_ORGANISATION/<<parameters.repository>>" "$filename"
34+ echo "export CLOUDSMITH_REPOSITORY=\"<<parameters.repository>>\"" >> $BASH_ENV
35+ echo "CLOUDSMITH_REPOSITORY=<<parameters.repository>>"
5036
51- echo ""
52- echo "Package upload and synchronisation completed OK."
53- done
37+ echo "export DIST_DIR=\"<<parameters.dist_dir>>\"" >> $BASH_ENV
38+ echo "DIST_DIR=<<parameters.dist_dir>>"
5439 - run :
55- name : Cloudsmith - Upload wheel distribution(s)
56- command : |
57- for filename in <<parameters.dist_dir>>/*.whl
58- do
59- [ -f "$filename" ] || continue
60-
61- echo "Uploading wheel $filename to Cloudsmith repository $CLOUDSMITH_ORGANISATION/<<parameters.repository>> ..."
62-
63- cloudsmith push python --verbose --api-key "$CLOUDSMITH_OIDC_TOKEN" "$CLOUDSMITH_ORGANISATION/<<parameters.repository>>" "$filename"
64-
65- echo ""
66- echo "Package upload and synchronisation completed OK."
67- done
40+ name : Cloudsmith - Upload python package file(s)
41+ command : <<include(scripts/upload_python_package.sh)>>
0 commit comments