Skip to content

Commit 2ae24e4

Browse files
joke1196Seppli11
authored andcommitted
SCANPY-219 Migrate shadow scan and iris tasks to github actions
1 parent e1ca571 commit 2ae24e4

3 files changed

Lines changed: 75 additions & 65 deletions

File tree

.cirrus.yml

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ env:
66
ARTIFACTORY_DEPLOY_ACCESS_TOKEN: VAULT[development/artifactory/token/${CIRRUS_REPO_OWNER}-${CIRRUS_REPO_NAME}-qa-deployer access_token]
77
ARTIFACTORY_DEPLOY_REPO: sonarsource-pypi-public-qa
88
GITHUB_TOKEN: VAULT[development/github/token/licenses-ro token]
9-
DEPLOY_PULL_REQUEST: 'true'
9+
DEPLOY_PULL_REQUEST: "true"
1010
POETRY_VIRTUALENVS_PATH: "~/.cache/poetry/venvs"
1111
POETRY_CACHE_DIR: "~/.cache/poetry/pypoetry"
1212
SONARQUBE_VERSION: 25.3.0.104237
@@ -103,21 +103,3 @@ its_macos_task:
103103
fingerprint_script: echo "sonarqube-$SONARQUBE_VERSION"
104104
its_script:
105105
- .cirrus/run_its.sh
106-
107-
run_iris_task:
108-
<<: *LINUX_CONTAINER_DEFINITION
109-
# only executed in CRON job AND on master branch
110-
only_if: $CIRRUS_CRON == $CRON_NIGHTLY_JOB_NAME && $CIRRUS_BRANCH == "master"
111-
env:
112-
SONAR_SOURCE_IRIS_TOKEN: VAULT[development/kv/data/iris data.next]
113-
matrix:
114-
- name: "IRIS SQ NEXT -> Sonarcloud.io"
115-
env:
116-
SONAR_TARGET_URL: https://sonarcloud.io
117-
SONAR_TARGET_IRIS_TOKEN: VAULT[development/kv/data/iris data.sqc-eu]
118-
- name: "IRIS SQ NEXT -> SonarQube.us"
119-
env:
120-
SONAR_TARGET_URL: https://sonarqube.us
121-
SONAR_TARGET_IRIS_TOKEN: VAULT[development/kv/data/iris data.sqc-us]
122-
script:
123-
- .cirrus/run_iris.sh

.cirrus/run_iris.sh

Lines changed: 0 additions & 46 deletions
This file was deleted.

.github/workflows/Iris.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Iris sync
2+
on:
3+
schedule:
4+
- cron: "0 2 * * *"
5+
workflow_dispatch:
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
coverage:
13+
name: "Coverage report generation"
14+
runs-on: github-ubuntu-latest-s
15+
permissions:
16+
id-token: write
17+
contents: write
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
21+
- name: Configure poetry
22+
uses: ./.github/actions/config-poetry
23+
- run: |
24+
poetry run pytest --cov-report=xml:coverage.xml --cov-config=pyproject.toml --cov=src --cov-branch tests
25+
poetry run mypy src/ > mypy-report.txt || true
26+
- name: Upload coverage artifacts
27+
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
28+
with:
29+
name: coverage-reports
30+
path: |
31+
coverage.xml
32+
mypy-report.txt
33+
34+
shadow-scans:
35+
name: Shadow Scans
36+
needs: coverage
37+
runs-on: github-ubuntu-latest-s
38+
permissions:
39+
id-token: write
40+
contents: write
41+
steps:
42+
- name: Checkout code
43+
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
44+
45+
- name: Download coverage artifacts
46+
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
47+
with:
48+
name: coverage-reports
49+
50+
- name: Build and run shadow scan
51+
uses: SonarSource/ci-github-actions/build-poetry@v1
52+
with:
53+
sonar-platform: next
54+
run-shadow-scans: true
55+
artifactory-reader-role: private-reader
56+
artifactory-deployer-role: qa-deployer
57+
58+
iris:
59+
name: IRIS Sync
60+
needs: shadow-scans
61+
runs-on: github-ubuntu-latest-s
62+
permissions:
63+
id-token: write
64+
contents: write
65+
steps:
66+
- name: Run IRIS Analysis
67+
uses: SonarSource/unified-dogfooding-actions/run-iris@v1
68+
with:
69+
primary_project_key: "SonarSource_sonar-scanner-python"
70+
primary_platform: "Next"
71+
shadow1_project_key: "SonarSource_sonar-scanner-python"
72+
shadow1_platform: "SQC-EU"
73+
shadow2_project_key: "SonarSource_sonar-scanner-python"
74+
shadow2_platform: "SQC-US"

0 commit comments

Comments
 (0)