Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
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
73 changes: 73 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
pool:
vmImage: ubuntu-latest

jobs:
- job: build
displayName: 'Build'
steps:
- task: Maven@3
inputs:
mavenPomFile: 'pom.xml'
publishJUnitResults: true
testResultsFiles: '**/TEST-*.xml'
javaHomeOption: 'JDKVersion'
sonarQubeRunAnalysis: false
- task: CopyFiles@2
inputs:
sourceFolder: '$(Build.SourcesDirectory)'
contents: |
**/target/*.jar
targetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
inputs:
pathToPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: appJar
publishLocation: 'Container'

- job: sonar
workspace:
clean: all
displayName: Code Review
steps:
- task: SonarCloudPrepare@1
inputs:
SonarCloud: 'Lab-SAST-DevSecOps'
organization: 'devsecopslab1'
projectKey: 'julianks_spring-boot-kubernetes'
projectName: 'spring-boot-kubernetes'
displayName: 'Preparing Sonarqube Environment'
- task: Maven@3
inputs:
mavenPomFile: 'pom.xml'
publishJUnitResults: true
testResultsFiles: '**/surefire-reports/TEST-*.xml'
javaHomeOption: 'JDKVersion'
mavenVersionOption: 'Default'
mavenAuthenticateFeed: false
effectivePomSkip: false
sonarQubeRunAnalysis: true
sqMavenPluginVersionChoice: 'latest'
- task: SonarCloudPublish@1
inputs:
pollingTimeoutSec: '300'
displayName: 'Publish Analysis Results'

#- task: sonarcloud-buildbreaker@2
# inputs:
# SonarCloud: 'Sonarcloud'
# organization: 'devsecops-usach'

- job: SCA
dependsOn: build
steps:
- task: DownloadBuildArtifacts@0
inputs:
buildType: 'current'
downloadType: 'single'
artifactName: 'appJar'
downloadPath: '$(System.ArtifactsDirectory)'
- task: dependency-check-build-task@6
inputs:
projectName: 'spring-boot'
scanPath: '$(System.ArtifactsDirectory)'
format: 'HTML'
1 change: 0 additions & 1 deletion src/main/java/org/soyphea/k8s/K8SApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
@Slf4j
public class K8SApplication implements CommandLineRunner {


@Autowired
UserConfig userConfig;

Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/soyphea/k8s/config/UserConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ public class UserConfig {

String name;
String blog;

}