Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Mickael Istria <mistria@redhat.com>
- Loading branch information
1 parent
b7990a4
commit f27ee87
Showing
1 changed file
with
50 additions
and
0 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,50 @@ | ||
pipeline { | ||
options { | ||
buildDiscarder(logRotator(numToKeepStr:'10')) | ||
} | ||
agent { | ||
kubernetes { | ||
label 'wildwebdeveloper-buildtest-sonar-pod' | ||
defaultContainer 'container' | ||
yaml """ | ||
apiVersion: v1 | ||
kind: Pod | ||
spec: | ||
containers: | ||
- name: container | ||
image: mickaelistria/wildwebdeveloper-build-test-dependencies@sha256:953ba8b8850ca81a4fe465a8f9f5e5d3b18985b75ecc0ba44d7d2178a232fa9c | ||
tty: true | ||
command: [ "uid_entrypoint", "cat" ] | ||
""" | ||
} | ||
} | ||
environment { | ||
NPM_CONFIG_USERCONFIG = "$WORKSPACE/.npmrc" | ||
} | ||
stages { | ||
stage('Prepare-environment') { | ||
steps { | ||
sh 'npm config set cache="$WORKSPACE/npm-cache"' | ||
sh 'mkdir -p ${HOME}/.vnc && echo "123456" | vncpasswd -f > ${HOME}/.vnc/passwd && chmod 600 ${HOME}/.vnc/passwd' | ||
} | ||
} | ||
stage('Build') { | ||
steps { | ||
wrap([$class: 'Xvnc', useXauthority: true]) { | ||
sh 'mvn clean verify -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true -Dmaven.repo.local=$WORKSPACE/.m2/repository' | ||
} | ||
} | ||
post { | ||
always { | ||
junit '*/target/surefire-reports/TEST-*.xml' | ||
archiveArtifacts artifacts: 'repository/target/repository/**' | ||
} | ||
} | ||
} | ||
stage('Sonar analysis') { | ||
steps { | ||
sh 'mvn sonar:sonar -Dsonar.projectKey=eclipse-wildwebdeveloper -Dsonar.organization=eclipse-wildwebdeveloper -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=fc2945356a47f2f45dfc4f27c49936b054e0bf7a' | ||
} | ||
} | ||
} | ||
} |