...
|
...
|
@@ -31,7 +31,7 @@ pipeline { |
|
|
stage('Define para && clean workdir'){
|
|
|
steps{
|
|
|
script {
|
|
|
def PROJECT_WORK_DIR="${env.WORKSPACE}"/"${params.projectName}"
|
|
|
def PROJECT_WORK_DIR="${env.WORKSPACE}/${params.projectName}"
|
|
|
echo "print the para projectName is : ${params.projectName}......"
|
|
|
echo "print the para workdir is : ${PROJECT_WORK_DIR}......"
|
|
|
echo "print the para projectGitGroup is : ${params.projectGitGroup}......"
|
...
|
...
|
@@ -51,7 +51,7 @@ pipeline { |
|
|
stage('git clone project'){
|
|
|
steps{
|
|
|
script {
|
|
|
def PROJECT_WORK_DIR="${env.WORKSPACE}"/"${params.projectName}"
|
|
|
def PROJECT_WORK_DIR="${env.WORKSPACE}/${params.projectName}"
|
|
|
sh "git clone -b ${params.projectBranch} git@git.yoho.cn:${params.projectGitGroup}/${params.projectName}.git ${PROJECT_WORK_DIR}"
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -61,7 +61,7 @@ pipeline { |
|
|
stage('build project'){
|
|
|
steps{
|
|
|
script {
|
|
|
def PROJECT_WORK_DIR="${env.WORKSPACE}"/"${params.projectName}"
|
|
|
def PROJECT_WORK_DIR="${env.WORKSPACE}/${params.projectName}"
|
|
|
sh "cd ${PROJECT_WORK_DIR} && sh ${PROJECT_WORK_DIR}/docker.sh ${params.isNeedCdn} ${PROJECT_WORK_DIR}"
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -71,7 +71,7 @@ pipeline { |
|
|
stage('upload to CDN and nfs'){
|
|
|
steps{
|
|
|
script {
|
|
|
def PROJECT_WORK_DIR="${env.WORKSPACE}"/"${params.projectName}"
|
|
|
def PROJECT_WORK_DIR="${env.WORKSPACE}/${params.projectName}"
|
|
|
println "begin upload to cdn"
|
|
|
if(params.isNeedCdn=='YES'){
|
|
|
def olddir = "this_is_replace_for_qshell_upload_to_cdn"
|
...
|
...
|
@@ -90,7 +90,7 @@ pipeline { |
|
|
stage('build and push images to qcloud') {
|
|
|
steps {
|
|
|
script {
|
|
|
def PROJECT_WORK_DIR="${env.WORKSPACE}"/"${params.projectName}"
|
|
|
def PROJECT_WORK_DIR="${env.WORKSPACE}/${params.projectName}"
|
|
|
echo "begin bake image......"
|
|
|
def qcloudimage = "${env.QCLOUD_IMAGE}/${params.imageSource}/${params.deployName}:${params.imageVersion}"
|
|
|
sh "docker build -t ${qcloudimage} ${PROJECT_WORK_DIR}/dist/node"
|
...
|
...
|
|