File tree Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Original file line number Diff line number Diff line change 18
18
fail-fast : false
19
19
20
20
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;
21
29
- uses : actions/checkout@v3
22
30
- name : Set up Python
23
31
uses : actions/setup-python@v4
@@ -35,19 +43,16 @@ jobs:
35
43
- name : Check tests and generate coverage
36
44
run : |
37
45
hatch run test:cov_xml
46
+ env :
47
+ ARTIFACTORY_ACCESS_TOKEN : ${{ fromJSON(steps.secrets.outputs.vault).ARTIFACTORY_PASSWORD }}
38
48
- name : Check formatting
39
49
run : |
40
50
hatch run tool:format
41
51
- name : Check licensing
42
52
run : |
43
53
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;
49
54
- name : SonarCloud Scan
50
55
uses : SonarSource/sonarcloud-github-action@master
51
56
env :
52
57
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 }}
Original file line number Diff line number Diff line change @@ -32,7 +32,11 @@ dependencies = [
32
32
"py-sonar-scanner" = " py_sonar_scanner.__main__:scan"
33
33
34
34
[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/"
36
40
37
41
[tool .hatch .version ]
38
42
path = " src/py_sonar_scanner/__about__.py"
You can’t perform that action at this time.
0 commit comments