generated from pagopa/pagopa-quarkus-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from pagopa/implementing
feat: Implementing
- Loading branch information
Showing
106 changed files
with
6,682 additions
and
668 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
# Maven | ||
# Build your Java project and run tests with Apache Maven. | ||
# Add steps that analyze code, save build artifacts, deploy, and more: | ||
# https://docs.microsoft.com/azure/devops/pipelines/languages/java | ||
|
||
# Automatically triggered on PR | ||
# https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema%2Cparameter-schema#pr-trigger | ||
trigger: none | ||
|
||
pool: | ||
vmImage: 'ubuntu-22.04' | ||
|
||
variables: | ||
MAVEN_CACHE_FOLDER: $(Pipeline.Workspace)/.m2/repository | ||
MAVEN_OPTS: '-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)' | ||
GRAALVM_VERSION: '22.3.1' | ||
|
||
stages: | ||
- stage: Test | ||
jobs: | ||
- job: unit_test | ||
steps: | ||
- checkout: self | ||
persistCredentials: true | ||
|
||
- task: Cache@2 | ||
inputs: | ||
key: 'maven | "$(Agent.OS)" | pom.xml' | ||
restoreKeys: | | ||
maven | "$(Agent.OS)" | ||
maven | ||
path: $(MAVEN_CACHE_FOLDER) | ||
displayName: Cache Maven local repo | ||
|
||
- script: | | ||
echo "Install GraalVM $(GRAALVM_VERSION) - JAVA 17" | ||
cd /tmp | ||
curl -o GraalVM.tar.gz -L https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-$(GRAALVM_VERSION)/graalvm-ce-java17-linux-amd64-$(GRAALVM_VERSION).tar.gz | ||
tar -xzf GraalVM.tar.gz | ||
GRAALVM_HOME=/tmp/graalvm-ce-java17-$(GRAALVM_VERSION) | ||
sudo apt-get install build-essential libz-dev zlib1g-dev | ||
${GRAALVM_HOME}/bin/gu install native-image | ||
#set for next step | ||
echo "##vso[task.setvariable variable=GRAALVM_HOME]${GRAALVM_HOME}" | ||
echo "##vso[task.setvariable variable=JAVA_HOME]${GRAALVM_HOME}" | ||
echo "##vso[task.setvariable variable=PATH]${GRAALVM_HOME}/bin;$(PATH)" | ||
#set fot this step | ||
export GRAALVM_HOME=${GRAALVM_HOME} | ||
export JAVA_HOME=${GRAALVM_HOME} | ||
export PATH=${GRAALVM_HOME}/bin:$PATH | ||
java -version | ||
displayName: Install GraalVM $(GRAALVM_VERSION) - JAVA 17 | ||
- task: SonarCloudPrepare@1 | ||
displayName: 'Prepare SonarCloud analysis configuration' | ||
inputs: | ||
SonarCloud: '$(SONARCLOUD_SERVICE_CONN)' | ||
organization: '$(SONARCLOUD_ORG)' | ||
scannerMode: Other | ||
extraProperties: | | ||
sonar.projectKey=$(SONARCLOUD_PROJECT_KEY) | ||
sonar.projectName=$(SONARCLOUD_PROJECT_NAME) | ||
sonar.exclusions=src/main/java/it/gov/pagopa/fdr/**/*Entity.java,src/main/java/it/gov/pagopa/fdr/util/App*.java,src/main/java/it/gov/pagopa/fdr/**/model/*.java,src/main/java/it/gov/pagopa/fdr/**/projection/*.java | ||
- task: Maven@3 | ||
displayName: 'Run Junit Test' | ||
inputs: | ||
mavenPomFile: 'pom.xml' | ||
goals: 'clean verify' | ||
publishJUnitResults: true | ||
testResultsFiles: '**/surefire-reports/TEST-*.xml' | ||
codeCoverageToolOption: 'JaCoCo' | ||
javaHomeOption: '/tmp/graalvm-ce-java17-$(GRAALVM_VERSION)' | ||
jdkDirectory: '/tmp/graalvm-ce-java17-$(GRAALVM_VERSION)' | ||
mavenVersionOption: 'Default' | ||
mavenOptions: '-Xmx3072m $(MAVEN_OPTS)' | ||
mavenAuthenticateFeed: false | ||
effectivePomSkip: false | ||
sonarQubeRunAnalysis: true | ||
isJacocoCoverageReportXML: true | ||
sqMavenPluginVersionChoice: 'latest' | ||
|
||
- task: SonarCloudPublish@1 | ||
displayName: 'Publish SonarCloud results on build summary' | ||
inputs: | ||
pollingTimeoutSec: '300' |
Oops, something went wrong.