generated from gCubeCI/Pipeline-Docker-Template
add read/write from local file
This commit is contained in:
parent
588403dadf
commit
dfc70f9f65
|
@ -1,3 +1,6 @@
|
|||
#!groovy
|
||||
|
||||
|
||||
// related jenkins job: https://jenkins.d4science.org/job/gCubeDeployer/
|
||||
|
||||
pipeline {
|
||||
|
@ -13,7 +16,7 @@ pipeline {
|
|||
|
||||
environment {
|
||||
AGENT_ROOT_FOLDER = "${agent_root_folder}"
|
||||
AGENT_DEPLOY_FILE = "${agent_deploy_file}"
|
||||
DEPLOY_FILE = "${agent_deploy_file}/deploy.txt"
|
||||
}
|
||||
stages {
|
||||
stage('initialize environment') {
|
||||
|
@ -33,6 +36,14 @@ pipeline {
|
|||
}
|
||||
steps {
|
||||
echo 'Cron build enabled. Deploy from system ongoing'
|
||||
echo 'Components to deploy:'
|
||||
cat ${DEPLOY_FILE}
|
||||
script {
|
||||
def length=wc -l ${DEPLOY_FILE}
|
||||
for (int i = 0; i < length ; ++i) {
|
||||
echo "Component $i+1: " < $DEPLOY_FILE
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Nothing to do ') {
|
||||
|
@ -56,6 +67,7 @@ pipeline {
|
|||
}
|
||||
steps {
|
||||
echo "Cron build enabled. New deploy of ${params.TRIGGER_JOB} - ${params.TRIGGER_VERSION} appended to the deploy file"
|
||||
echo "${params.TRIGGER_JOB} - ${params.TRIGGER_VERSION}" >> $DEPLOY_FILE
|
||||
}
|
||||
}
|
||||
stage('Deploy from job ') {
|
||||
|
|
Loading…
Reference in New Issue