From commits-return-65479-archive-asf-public=cust-asf.ponee.io@camel.apache.org Wed Sep 26 20:04:39 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 55CE4180675 for ; Wed, 26 Sep 2018 20:04:39 +0200 (CEST) Received: (qmail 50768 invoked by uid 500); 26 Sep 2018 18:04:38 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 50757 invoked by uid 99); 26 Sep 2018 18:04:38 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Sep 2018 18:04:38 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id BAE4382D96; Wed, 26 Sep 2018 18:04:37 +0000 (UTC) Date: Wed, 26 Sep 2018 18:04:38 +0000 To: "commits@camel.apache.org" Subject: [camel] 01/01: CAMEL-11492 Test website Jenkinsfile MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit From: zregvart@apache.org In-Reply-To: <153798507725.27468.3377504295027946603@gitbox.apache.org> References: <153798507725.27468.3377504295027946603@gitbox.apache.org> X-Git-Host: gitbox.apache.org X-Git-Repo: camel X-Git-Refname: refs/heads/website X-Git-Reftype: branch X-Git-Rev: a37c479f2e4a5a664971205bd1f75ba303534d9d X-Git-NotificationType: diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated Message-Id: <20180926180437.BAE4382D96@gitbox.apache.org> This is an automated email from the ASF dual-hosted git repository. zregvart pushed a commit to branch website in repository https://gitbox.apache.org/repos/asf/camel.git commit a37c479f2e4a5a664971205bd1f75ba303534d9d Author: Zoran Regvart AuthorDate: Tue Jul 17 12:01:34 2018 +0200 CAMEL-11492 Test website Jenkinsfile --- Jenkinsfile | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 81 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index a34301d..e6a3c40 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,8 +17,10 @@ * under the License. */ +def BUILD_WEBSITE = !'false'.equalsIgnoreCase(env.BUILD_WEBSITE) def LOCAL_REPOSITORY = env.LOCAL_REPOSITORY ?: '/home/jenkins/jenkins-slave/maven-repositories/0' def AGENT_LABEL = env.AGENT_LABEL ?: 'ubuntu' +def WEBSITE_AGENT_LABEL = env.WEBSITE_AGENT_LABEL ?: 'git-websites' def JDK_NAME = env.JDK_NAME ?: 'JDK 1.8 (latest)' def MAVEN_PARAMS = "-U -B -e -fae -V -Dmaven.repo.local=${LOCAL_REPOSITORY} -Dnoassembly -Dmaven.compiler.fork=true -Dsurefire.rerunFailingTestsCount=2" @@ -42,10 +44,57 @@ pipeline { stages { + stage('Website') { + when { + beforeAgent true + expression { BUILD_WEBSITE } + anyOf { + changeset '**/*.adoc' + changeset 'camel-website/**' + changeset 'docs/**' + } + } + + agent { + node { + label WEBSITE_AGENT_LABEL + } + } + + options { + skipDefaultCheckout() + } + + steps { + dir('camel') { + checkout scm + sh "./mvnw -U -B -V -f camel-website" + } + + dir('site') { + checkout [ branches: [name: 'asf-site'] ] + sh 'cp -R ../camel/camel-website/public/* .' + sh 'git add .' + sh 'git commit -m "Website updated to $(git rev-parse --short HEAD)"' + sh 'git push origin asf-site' + } + } + } + stage('Build & Deploy') { + when { + beforeAgent true branch 'master' + not { + anyOf { + changeset '**/*.adoc' + changeset 'camel-website/**' + changeset 'docs/**' + } + } } + steps { sh "./mvnw $MAVEN_PARAMS -Dmaven.test.skip.exec=true clean deploy" } @@ -53,16 +102,36 @@ pipeline { stage('Build') { when { + beforeAgent true not { - branch 'master' + allOf { + branch 'master' + anyOf { + changeset '**/*.adoc' + changeset 'camel-website/**' + changeset 'docs/**' + } + } } } + steps { sh "./mvnw $MAVEN_PARAMS -Dmaven.test.skip.exec=true clean install" } } stage('Checks') { + when { + beforeAgent true + not { + anyOf { + changeset '**/*.adoc' + changeset 'camel-website/**' + changeset 'docs/**' + } + } + } + steps { sh "./mvnw $MAVEN_PARAMS -Psourcecheck -Dcheckstyle.failOnViolation=false checkstyle:check" } @@ -74,6 +143,17 @@ pipeline { } stage('Test') { + when { + beforeAgent true + not { + anyOf { + changeset '**/*.adoc' + changeset 'camel-website/**' + changeset 'docs/**' + } + } + } + steps { sh "./mvnw $MAVEN_PARAMS -Dmaven.test.failure.ignore=true test" }