File tree Expand file tree Collapse file tree 4 files changed +89
-4
lines changed
Expand file tree Collapse file tree 4 files changed +89
-4
lines changed Original file line number Diff line number Diff line change 1+ name : PR build and merge
2+
3+ on :
4+ pull_request :
5+ types : [ opened, synchronize, reopened ]
6+ push :
7+ branches :
8+ - main
9+ - " release/**"
10+
11+ permissions :
12+ contents : read
13+
14+ jobs :
15+ build :
16+
17+ runs-on : ubuntu-latest
18+ timeout-minutes : 10
19+
20+ steps :
21+ - name : Checkout
22+ uses : actions/checkout@v4
23+ with :
24+ fetch-depth : 0
25+
26+ - name : ' Create environment file'
27+ run : touch .env
28+
29+ - name : ' Build test containers'
30+ run : docker compose build app_test
31+
32+ - name : ' Run validation & test'
33+ run : docker compose run --service-ports app_test
34+
35+ - name : ' Run SonarCloud Scan'
36+ uses : SonarSource/sonarcloud-github-action@master
37+ env :
38+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
39+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
40+
41+ - name : ' Run SonarQube Quality Gate check'
42+ uses : sonarsource/sonarqube-quality-gate-action@master
43+ timeout-minutes : 5
44+ env :
45+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
46+
47+ - name : ' Stop containers'
48+ if : always()
49+ run : docker compose down
Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ permissions :
8+ contents : read
9+
10+ jobs :
11+ build :
12+
13+ runs-on : ubuntu-latest
14+ timeout-minutes : 10
15+
16+ steps :
17+ - name : Checkout
18+ uses : actions/checkout@v4
19+ with :
20+ fetch-depth : 0
21+
22+ - name : ' Get the version'
23+ id : get_version
24+ run : echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_OUTPUT"
25+
26+ - name : ' Build and push image'
27+ uses : azure/docker-login@v1
28+ with :
29+ login-server : ${{ vars.EXTENSION_REGISTRY_LOGIN_SERVER }}
30+ username : ${{ vars.EXTENSION_REGISTRY_USERNAME }}
31+ password : ${{ secrets.EXTENSION_REGISTRY_PASSWORD }}
32+ - run : |
33+ docker build -f prod.Dockerfile -t ${{ vars.EXTENSION_REGISTRY_LOGIN_SERVER }}/mpt-finops-extension:${{ steps.get_version.outputs.VERSION }} .
34+ docker push ${{ vars.EXTENSION_REGISTRY_LOGIN_SERVER }}/mpt-finops-extension:${{ steps.get_version.outputs.VERSION }}
Original file line number Diff line number Diff line change 1+ .DS_Store
2+
13# Byte-compiled / optimized / DLL files
24__pycache__ /
35* .py [cod ]
Original file line number Diff line number Diff line change 1- sonar.projectKey =softwareone-platform_swo-aws -extension
1+ sonar.projectKey =softwareone-platform_mpt-finops -extension
22sonar.organization =softwareone-mpt-github
33
44sonar.language =py
55
6- sonar.sources =aws_ext
6+ sonar.sources =ffc
77sonar.tests =tests
8- sonar.inclusions =aws_ext /**
9- sonar.exclusions =tests/**, aws_ext /templates/**
8+ sonar.inclusions =ffc /**
9+ sonar.exclusions =tests/**, ffc /templates/**
1010
1111sonar.python.coverage.reportPaths =coverage.xml
1212sonar.python.xunit.reportPath =coverage.xml
You can’t perform that action at this time.
0 commit comments