File tree Expand file tree Collapse file tree 1 file changed +37
-1
lines changed Expand file tree Collapse file tree 1 file changed +37
-1
lines changed Original file line number Diff line number Diff line change @@ -127,7 +127,9 @@ jobs:
127
127
with :
128
128
python-version : |
129
129
3.12
130
- cache : " poetry"
130
+ - name : Install Poetry
131
+ run : |
132
+ pipx install poetry
131
133
- name : Install its dependencies
132
134
working-directory : ./its
133
135
env :
@@ -142,3 +144,37 @@ jobs:
142
144
working-directory : ./its
143
145
run : |
144
146
poetry run pytest
147
+ publish :
148
+ runs-on : ubuntu-latest
149
+ permissions :
150
+ id-token : write # required by SonarSource/vault-action-wrapper
151
+ contents : read # required by actions/checkout
152
+ strategy :
153
+ fail-fast : false
154
+ steps :
155
+ - name : Get vault secrets
156
+ id : secrets
157
+ uses : SonarSource/vault-action-wrapper@v2
158
+ with :
159
+ secrets : |
160
+ development/artifactory/token/{REPO_OWNER_NAME_DASH}-qa-deployer access_token | ARTIFACTORY_PASSWORD_QA;
161
+ - uses : actions/checkout@v3
162
+ - name : Set up Python
163
+ uses : actions/setup-python@v4
164
+ with :
165
+ python-version : |
166
+ 3.12
167
+ - name : Install Poetry
168
+ run : |
169
+ pipx install poetry
170
+ - name : Configure pypi repo
171
+ run : poetry config repositories.sonarsource https://repox.jfrog.io/artifactory/api/pypi/sonarsource-pypi-builds
172
+ - name : Build and publish
173
+ env :
174
+ ARTIFACTORY_PYPI_DEPLOYER_USER : vault-SonarSource-sonar-scanner-python-qa-deployer
175
+ ARTIFACTORY_PYPI_DEPLOYER_API_KEY : ${{ fromJSON(steps.secrets.outputs.vault).ARTIFACTORY_PASSWORD_QA }}
176
+ run : |
177
+ poetry version patch
178
+ poetry version $(poetry version -s).dev${{ github.run_number }}
179
+ poetry build
180
+ poetry publish -r sonarsource --username $ARTIFACTORY_PYPI_DEPLOYER_USER --password $ARTIFACTORY_PYPI_DEPLOYER_API_KEY --verbose
You can’t perform that action at this time.
0 commit comments