Well it's simply not finished yet ... I intentionally didn't add the push part 
yet as I wanted the generation part to work first.
And there were infra issues this morning that prevented me from proceeding 
faster (git-websites nodes were all offline)
I'm still working on it and will inform you as soon as I'm done.

Chris

Am 20.12.18, 12:55 schrieb "徐毅" <[email protected]>:

    Hi,
    
    I notice that jenkins pipeline file has been added into 
incubator-iotdb-website project on master branch. I have two questions about 
this file. 
    First, I do not see codes like "asf-site", so how can this script push 
static files(html/css/js) to asf-site branch to release new changes?
    Second, i check the pipeline result at 
https://builds.apache.org/job/IoTDB%20Website/, it seems that build stage and 
deploy stage are skipped, so should i add some commands to this script to test 
and build our project?
    
    Thanks,
    Yi Xu
    
    
    > -----原始邮件-----
    > 发件人: [email protected]
    > 发送时间: 2018-12-20 17:47:24 (星期四)
    > 收件人: "[email protected]" <[email protected]>
    > 抄送: 
    > 主题: [incubator-iotdb-website] branch master updated: Added a first 
version of a Jenkinsfile for build on Apache Infra
    > 
    > This is an automated email from the ASF dual-hosted git repository.
    > 
    > cdutz pushed a commit to branch master
    > in repository 
https://gitbox.apache.org/repos/asf/incubator-iotdb-website.git
    > 
    > 
    > The following commit(s) were added to refs/heads/master by this push:
    >      new 393087d  Added a first version of a Jenkinsfile for build on 
Apache Infra
    > 393087d is described below
    > 
    > commit 393087d7bdc9afa51dfb40bb251d1e00ffa51226
    > Author: Christofer Dutz <[email protected]>
    > AuthorDate: Thu Dec 20 10:47:15 2018 +0100
    > 
    >     Added a first version of a Jenkinsfile for build on Apache Infra
    > ---
    >  Jenkinsfile | 118 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    >  1 file changed, 118 insertions(+)
    > 
    > diff --git a/Jenkinsfile b/Jenkinsfile
    > new file mode 100644
    > index 0000000..91affc7
    > --- /dev/null
    > +++ b/Jenkinsfile
    > @@ -0,0 +1,118 @@
    > +#!groovy
    > +
    > +/*
    > + *
    > + *  Licensed to the Apache Software Foundation (ASF) under one or more
    > + *  contributor license agreements.  See the NOTICE file distributed with
    > + *  this work for additional information regarding copyright ownership.
    > + *  The ASF licenses this file to You under the Apache License, Version 
2.0
    > + *  (the "License"); you may not use this file except in compliance with
    > + *  the License.  You may obtain a copy of the License at
    > + *
    > + *      http://www.apache.org/licenses/LICENSE-2.0
    > + *
    > + *  Unless required by applicable law or agreed to in writing, software
    > + *  distributed under the License is distributed on an "AS IS" BASIS,
    > + *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
    > + *  See the License for the specific language governing permissions and
    > + *  limitations under the License.
    > + *
    > + */
    > +pipeline {
    > +
    > +    agent {
    > +        node {
    > +            // Only "git-websites" nodes have the credentials to push to 
an "asf-site" branch of an ASF git repo.
    > +            label 'git-websites'
    > +        }
    > +    }
    > +
    > +    stages {
    > +        stage('Checkout') {
    > +            steps {
    > +                echo 'Checking out branch ' + env.BRANCH_NAME
    > +                checkout scm
    > +            }
    > +        }
    > +
    > +        stage('Build') {
    > +            when {
    > +              branch 'master'
    > +            }
    > +            steps {
    > +                echo 'Building'
    > +                sh 'npm run build'
    > +            }
    > +        }
    > +
    > +        stage('Deploy') {
    > +            when {
    > +              branch 'master'
    > +            }
    > +            steps {
    > +                echo 'Deploying'
    > +                // Deploy the artifacts using the wagon-maven-plugin.
    > +                //Commented out for now ...
    > +                //sh ''
    > +            }
    > +        }
    > +    }
    > +
    > +    // Send out notifications on unsuccessful builds.
    > +    post {
    > +        // If this build failed, send an email to the list.
    > +        failure {
    > +            script {
    > +                if(env.BRANCH_NAME == "master") {
    > +                    emailext(
    > +                        subject: "[BUILD-FAILURE]: Job '${env.JOB_NAME} 
[${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]'",
    > +                        body: """
    > +BUILD-FAILURE: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] 
[${env.BUILD_NUMBER}]':
    > +
    > +Check console output at "<a href="${env.BUILD_URL}">${env.JOB_NAME} 
[${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]</a>"
    > +""",
    > +                        to: "[email protected]",
    > +                        recipientProviders: [[$class: 
'DevelopersRecipientProvider']]
    > +                    )
    > +                }
    > +            }
    > +        }
    > +
    > +        // If this build didn't fail, but there were failing tests, send 
an email to the list.
    > +        unstable {
    > +            script {
    > +                if(env.BRANCH_NAME == "master") {
    > +                    emailext(
    > +                        subject: "[BUILD-UNSTABLE]: Job '${env.JOB_NAME} 
[${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]'",
    > +                        body: """
    > +BUILD-UNSTABLE: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] 
[${env.BUILD_NUMBER}]':
    > +
    > +Check console output at "<a href="${env.BUILD_URL}">${env.JOB_NAME} 
[${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]</a>"
    > +""",
    > +                        to: "[email protected]",
    > +                        recipientProviders: [[$class: 
'DevelopersRecipientProvider']]
    > +                    )
    > +                }
    > +            }
    > +        }
    > +
    > +        // Send an email, if the last build was not successful and this 
one is.
    > +        success {
    > +            script {
    > +                if ((env.BRANCH_NAME == "master") && 
(currentBuild.previousBuild != null) && (currentBuild.previousBuild.result != 
'SUCCESS')) {
    > +                    emailext (
    > +                        subject: "[BUILD-STABLE]: Job '${env.JOB_NAME} 
[${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]'",
    > +                        body: """
    > +BUILD-STABLE: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] 
[${env.BUILD_NUMBER}]':
    > +
    > +Is back to normal.
    > +""",
    > +                        to: "[email protected]",
    > +                        recipientProviders: [[$class: 
'DevelopersRecipientProvider']]
    > +                    )
    > +                }
    > +            }
    > +        }
    > +    }
    > +
    > +}
    

Reply via email to