You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hop.apache.org by ha...@apache.org on 2020/12/06 15:24:53 UTC
[incubator-hop] 11/22: HOP-2122
This is an automated email from the ASF dual-hosted git repository.
hansva pushed a commit to branch integration-tests
in repository https://gitbox.apache.org/repos/asf/incubator-hop.git
commit 8fa7ddda699d4f0e0c3a29a918d9ff218da7b1f2
Author: Hans Van Akelyen <ha...@gmail.com>
AuthorDate: Sun Dec 6 00:38:59 2020 +0100
HOP-2122
---
Jenkinsfile | 8 --------
Jenkinsfile.daily | 33 +++++++++++++++++++++++----------
2 files changed, 23 insertions(+), 18 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index 9067b1c..5bf2ce5 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -98,14 +98,6 @@ pipeline {
}
}
}
- stage('Code Quality') {
- steps {
- echo 'Checking Code Quality on SonarCloud'
- withCredentials([string(credentialsId: 'sonarcloud-key-apache-hop', variable: 'SONAR_TOKEN')]) {
- sh 'mvn sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=apache -Dsonar.projectKey=apache_incubator-hop -Dsonar.branch.name=${BRANCH_NAME} -Dsonar.login=${SONAR_TOKEN}'
- }
- }
- }
stage('Deploy'){
when {
branch 'master'
diff --git a/Jenkinsfile.daily b/Jenkinsfile.daily
index 5aac61c..b7460ce 100644
--- a/Jenkinsfile.daily
+++ b/Jenkinsfile.daily
@@ -29,6 +29,10 @@ pipeline {
label AGENT_LABEL
}
+ triggers {
+ cron('H H(2-7) * * *')
+ }
+
tools {
jdk JDK_NAME
maven MAVEN_NAME
@@ -76,22 +80,28 @@ pipeline {
}
steps {
echo 'Build & Test'
- sh "mvn $MAVEN_PARAMS clean install -DskipTests=true"
+ sh "mvn $MAVEN_PARAMS clean install"
+ }
+ }
+ stage('Code Quality') {
+ when {
+ branch 'integration-tests'
+ }
+ steps {
+ echo 'Checking Code Quality on SonarCloud'
+ withCredentials([string(credentialsId: 'sonarcloud-key-apache-hop', variable: 'SONAR_TOKEN')]) {
+ sh 'mvn sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=apache -Dsonar.projectKey=apache_incubator-hop -Dsonar.branch.name=${BRANCH_NAME} -Dsonar.login=${SONAR_TOKEN}'
+ }
}
}
- // stage('Code Quality') {
- // steps {
- // echo 'Checking Code Quality on SonarCloud'
- // withCredentials([string(credentialsId: 'sonarcloud-key-apache-hop', variable: 'SONAR_TOKEN')]) {
- // sh 'mvn sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=apache -Dsonar.projectKey=apache_incubator-hop -Dsonar.branch.name=${BRANCH_NAME} -Dsonar.login=${SONAR_TOKEN}'
- // }
- // }
- // }
stage('Create Docker image & Run Tests'){
+ when {
+ branch 'integration-tests'
+ }
steps {
script {
dockerImage = docker.build(imagename, "-f Dockerfile.unit-tests .")
- dockerImage.inside("-v $WORKSPACE/integration-tests:/files"){
+ dockerImage.inside("-v $WORKSPACE/integration-tests:/files -u hop:hop"){
echo 'Run tests'
sh 'ls /files'
sh 'cd /files/scripts && ./run-tests.sh'
@@ -105,6 +115,9 @@ pipeline {
}
}
stage('Remove docker image'){
+ when {
+ branch 'integration-tests'
+ }
steps {
sh "docker rmi $imagename:latest"
}