Skip to content

Commit

Permalink
[CICD]update jenkinsfile add slack notice, add scriptfile execute mod (
Browse files Browse the repository at this point in the history
  • Loading branch information
danfu3000 authored and qdongxu committed Nov 29, 2019
1 parent 3b2ceb3 commit 23e6a3b
Show file tree
Hide file tree
Showing 20 changed files with 23 additions and 1 deletion.
Empty file modified scripts/autotest-adaptor.sh
100644 → 100755
Empty file.
Empty file modified scripts/autotest-backend.sh
100644 → 100755
Empty file.
Empty file modified scripts/autotest-bluegreen.sh
100644 → 100755
Empty file.
Empty file modified scripts/autotest-canary.sh
100644 → 100755
Empty file.
Empty file modified scripts/autotest-circuitbreaker.sh
100644 → 100755
Empty file.
Empty file modified scripts/autotest-cotest-adaptor.sh
100644 → 100755
Empty file.
Empty file modified scripts/autotest-cotest-backend.sh
100644 → 100755
Empty file.
Empty file modified scripts/autotest-cotest-bluegreen.sh
100644 → 100755
Empty file.
Empty file modified scripts/autotest-cotest-canary.sh
100644 → 100755
Empty file.
Empty file modified scripts/autotest-cotest-circuitbreaker.sh
100644 → 100755
Empty file.
Empty file modified scripts/autotest-cotest-graceupdate.sh
100644 → 100755
Empty file.
Empty file modified scripts/autotest-cotest-pipeline.sh
100644 → 100755
Empty file.
Empty file modified scripts/autotest-cotest-ratelimit.sh
100644 → 100755
Empty file.
Empty file modified scripts/autotest-cotest-urlratelimit.sh
100644 → 100755
Empty file.
Empty file modified scripts/autotest-cotest-validator.sh
100644 → 100755
Empty file.
Empty file modified scripts/autotest-graceupdate.sh
100644 → 100755
Empty file.
Empty file modified scripts/autotest-ratelimit.sh
100644 → 100755
Empty file.
Empty file modified scripts/autotest-urlratelimit.sh
100644 → 100755
Empty file.
Empty file modified scripts/autotest-validator.sh
100644 → 100755
Empty file.
24 changes: 23 additions & 1 deletion scripts/jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
@Library('JenkinsHelper') _
pipeline {
agent any
environment {
PROJECT_DIR = "${WORKSPACE}/"
USER_CREDENTIALS_ID = "jenkinsuser"
}
stages {
stage('Pull') {
steps {
Expand All @@ -8,7 +13,7 @@ pipeline {
}
stage('Pullconfig') {
steps {
sshPublisher failOnError: true, publishers: [sshPublisherDesc(configName: 'km05', transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: 'export BUILDDIR=${HOME}/backdemo/easegateway;export CONFIGDIR=${HOME}/backdemo/easegateway-configuration;if [ ! -d ${CONFIGDIR} ];then mkdir -p ${CONFIGDIR}; cd ${CONFIGDIR}; git init; git remote add origin ssh:https://[email protected]/danfu3000/easegateway-configuration.git; fi;cd ${CONFIGDIR};GIT_SSH_COMMAND="ssh -i ../../jenkins/keys/kmtest-configuration" git pull origin km; cp *.env ${BUILDDIR}/', execTimeout: 600000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: '${HOME}', remoteDirectorySDF: false, removePrefix: '', sourceFiles: '')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)]
sshPublisher failOnError: true, publishers: [sshPublisherDesc(configName: 'km05', transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: 'export BUILDDIR=${HOME}/backdemo/easegateway;export CONFIGDIR=${HOME}/backdemo/easegateway-configuration;if [ ! -d ${CONFIGDIR} ];then mkdir -p ${CONFIGDIR}; cd ${CONFIGDIR}; git init; git remote add origin ssh:https://[email protected]/danfu3000/easegateway-configuration.git; fi;cd ${CONFIGDIR};GIT_SSH_COMMAND="ssh -i ../../jenkins/keys/kmtest-configuration" git pull origin km; cp *.env ${BUILDDIR}/scripts/', execTimeout: 600000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: '${HOME}', remoteDirectorySDF: false, removePrefix: '', sourceFiles: '')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)]
}
}
stage('Buildtest') {
Expand All @@ -27,4 +32,21 @@ pipeline {
}
}
}
post {
success {
script {
def level = 'good'
def subject = "[TASK:${env.JOB_NAME} SUCCESS]Deploy megaease/easegateway in environment:km"
helper.notifySlack level, env, subject
}
}

failure {
script {
def level = 'danger'
def subject = "[TASK:${env.JOB_NAME} FAILED]Deploy megaease/easegateway in environment:km"
helper.notifySlack level, env, subject
}
}
}
}

0 comments on commit 23e6a3b

Please sign in to comment.