Skip to content

Commit bfd4766

Browse files
PYSCAN-37 Setup Repox as default dependency repository (#18)
1 parent 2042771 commit bfd4766

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

.github/workflows/build-pr.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ jobs:
1818
fail-fast: false
1919

2020
steps:
21+
- name: Get vault secrets
22+
id: secrets
23+
uses: SonarSource/vault-action-wrapper@v2
24+
with:
25+
secrets: |
26+
development/artifactory/token/{REPO_OWNER_NAME_DASH}-private-reader access_token | ARTIFACTORY_PASSWORD;
27+
development/kv/data/repox url | REPOX_URL;
28+
development/kv/data/sonarcloud token | SONARCLOUD_TOKEN;
2129
- uses: actions/checkout@v3
2230
- name: Set up Python
2331
uses: actions/setup-python@v4
@@ -35,19 +43,16 @@ jobs:
3543
- name: Check tests and generate coverage
3644
run: |
3745
hatch run test:cov_xml
46+
env:
47+
ARTIFACTORY_ACCESS_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).ARTIFACTORY_PASSWORD }}
3848
- name: Check formatting
3949
run: |
4050
hatch run tool:format
4151
- name: Check licensing
4252
run: |
4353
hatch run tool:license_check
44-
- id: secrets
45-
uses: SonarSource/vault-action-wrapper@v2
46-
with:
47-
secrets: |
48-
development/kv/data/sonarcloud token | sonarcloud_token;
4954
- name: SonarCloud Scan
5055
uses: SonarSource/sonarcloud-github-action@master
5156
env:
5257
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53-
SONAR_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).sonarcloud_token }}
58+
SONAR_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).SONARCLOUD_TOKEN }}

pyproject.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ dependencies = [
3232
"py-sonar-scanner" = "py_sonar_scanner.__main__:scan"
3333

3434
[tool.hatch.envs.default]
35-
python="3.12"
35+
python="3.12"
36+
37+
[tool.hatch.envs.default.env-vars]
38+
PIP_INDEX_URL = "https://repox.jfrog.io/artifactory/api/pypi/sonarsource-pypi/simple/"
39+
PIP_EXTRA_INDEX_URL = "https://pypi.org/simple/"
3640

3741
[tool.hatch.version]
3842
path = "src/py_sonar_scanner/__about__.py"

0 commit comments

Comments
 (0)