JK
This commit is contained in:
parent
66afb7174c
commit
d408523931
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
@ -18,7 +18,7 @@ pipeline {
|
|||||||
parameters {
|
parameters {
|
||||||
string(name: 'GIT_URL', defaultValue: 'file:///repos/AS400API.git', description: 'Git repository URL to clone')
|
string(name: 'GIT_URL', defaultValue: 'file:///repos/AS400API.git', description: 'Git repository URL to clone')
|
||||||
string(name: 'GIT_BRANCH', defaultValue: 'main', description: 'Branch or ref to build')
|
string(name: 'GIT_BRANCH', defaultValue: 'main', description: 'Branch or ref to build')
|
||||||
string(name: 'AGENT_LABEL', defaultValue: 'docker', description: 'Label of the Jenkins agent that has Docker CLI access')
|
string(name: 'AGENT_LABEL', defaultValue: '', description: 'Optional Jenkins agent label with Docker CLI access (leave blank for default node)')
|
||||||
}
|
}
|
||||||
|
|
||||||
environment {
|
environment {
|
||||||
|
|||||||
@ -40,7 +40,7 @@ docker compose up --build
|
|||||||
|
|
||||||
## Jenkins CI notes
|
## Jenkins CI notes
|
||||||
- The repo includes a declarative Jenkinsfile that builds on the `mcr.microsoft.com/dotnet/sdk:9.0` container image and expects Jenkins parameters for `GIT_REPO_URL`, `GIT_CREDENTIALS_ID`, `SONARQUBE_SERVER`, and `SONAR_TOKEN_ID`. Create the credentials in **Manage Jenkins › Credentials** before running the job.
|
- The repo includes a declarative Jenkinsfile that builds on the `mcr.microsoft.com/dotnet/sdk:9.0` container image and expects Jenkins parameters for `GIT_REPO_URL`, `GIT_CREDENTIALS_ID`, `SONARQUBE_SERVER`, and `SONAR_TOKEN_ID`. Create the credentials in **Manage Jenkins › Credentials** before running the job.
|
||||||
- Set `AGENT_LABEL` (default `docker`) to a Jenkins agent that has the Docker CLI available so the pipeline can launch containers.
|
- Set `AGENT_LABEL` (optional) to a Jenkins agent that has the Docker CLI available so the pipeline can launch containers; leave it blank only if the default node already provides Docker.
|
||||||
- Update the Sonar project key or organization by editing `SONAR_PROJECT_KEY` / `SONAR_ORG` in the Jenkins parameter defaults or overriding them per-run; the pipeline passes these values to `dotnet-sonarscanner`.
|
- Update the Sonar project key or organization by editing `SONAR_PROJECT_KEY` / `SONAR_ORG` in the Jenkins parameter defaults or overriding them per-run; the pipeline passes these values to `dotnet-sonarscanner`.
|
||||||
- The pipeline publishes unit-test results, OpenCover XML, and HTML coverage reports; open the “Code Coverage” HTML report in the Jenkins build sidebar or download the archived artifacts `artifacts/AS400API-<build>-<commit>/reports/coverage-html/index.html`.
|
- The pipeline publishes unit-test results, OpenCover XML, and HTML coverage reports; open the “Code Coverage” HTML report in the Jenkins build sidebar or download the archived artifacts `artifacts/AS400API-<build>-<commit>/reports/coverage-html/index.html`.
|
||||||
- SCA results (`security-reports/nuget-vulnerabilities.txt` and optional Dependency-Check HTML) and application logs from `Logs/` are archived automatically so you can review findings without re-running the build.
|
- SCA results (`security-reports/nuget-vulnerabilities.txt` and optional Dependency-Check HTML) and application logs from `Logs/` are archived automatically so you can review findings without re-running the build.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user