Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PYSCAN-37 Setup Repox as default dependency repository #18

Merged
merged 1 commit into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ jobs:
fail-fast: false

steps:
- name: Get vault secrets
id: secrets
uses: SonarSource/vault-action-wrapper@v2
with:
secrets: |
development/artifactory/token/{REPO_OWNER_NAME_DASH}-private-reader access_token | ARTIFACTORY_PASSWORD;
development/kv/data/repox url | REPOX_URL;
development/kv/data/sonarcloud token | SONARCLOUD_TOKEN;
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
Expand All @@ -35,19 +43,16 @@ jobs:
- name: Check tests and generate coverage
run: |
hatch run test:cov_xml
env:
ARTIFACTORY_ACCESS_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).ARTIFACTORY_PASSWORD }}
- name: Check formatting
run: |
hatch run tool:format
- name: Check licensing
run: |
hatch run tool:license_check
- id: secrets
uses: SonarSource/vault-action-wrapper@v2
with:
secrets: |
development/kv/data/sonarcloud token | sonarcloud_token;
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).sonarcloud_token }}
SONAR_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).SONARCLOUD_TOKEN }}
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ dependencies = [
"py-sonar-scanner" = "py_sonar_scanner.__main__:scan"

[tool.hatch.envs.default]
python="3.12"
python="3.12"

[tool.hatch.envs.default.env-vars]
PIP_INDEX_URL = "https://repox.jfrog.io/artifactory/api/pypi/sonarsource-pypi/simple/"
PIP_EXTRA_INDEX_URL = "https://pypi.org/simple/"

[tool.hatch.version]
path = "src/py_sonar_scanner/__about__.py"
Expand Down