Restore initialize stage.
This commit is contained in:
parent
315626848f
commit
1de672a7c5
|
@ -124,25 +124,32 @@ pipeline {
|
||||||
stage('initialize') {
|
stage('initialize') {
|
||||||
steps {
|
steps {
|
||||||
sh '''
|
sh '''
|
||||||
echo "REMOVE_LOCAL_REPO: ${REMOVE_LOCAL_REPO}"
|
echo "REMOVE_LOCAL_REPO: ${REMOVE_LOCAL_REPO}"
|
||||||
echo "CLEANUP_GCUBE_REPO: ${CLEANUP_GCUBE_REPO}"
|
echo "CLEANUP_GCUBE_REPO: ${CLEANUP_GCUBE_REPO}"
|
||||||
if [ "$CLEANUP_GCUBE_REPO" = "true" ]; then
|
if [ "$CLEANUP_GCUBE_REPO" = "true" ]; then
|
||||||
echo "Remove gCube artifacts from local repository"
|
echo "Remove gCube artifacts from local repository"
|
||||||
rm -rf $MAVEN_LOCAL_REPO/org/gcube
|
rm -rf $MAVEN_LOCAL_REPO/org/gcube
|
||||||
fi
|
fi
|
||||||
if [ "$REMOVE_LOCAL_REPO" = "true" ]; then
|
if [ "$REMOVE_LOCAL_REPO" = "true" ]; then
|
||||||
echo "Create a fresh local repository"
|
echo "Create a fresh local repository"
|
||||||
rm -rf $MAVEN_LOCAL_REPO
|
rm -rf $MAVEN_LOCAL_REPO
|
||||||
mkdir -p $MAVEN_LOCAL_REPO
|
mkdir -p $MAVEN_LOCAL_REPO
|
||||||
fi
|
fi
|
||||||
mv "${AGENT_ROOT_FOLDER}/settings.xml" "${AGENT_ROOT_FOLDER}/settings.${PIPELINE_BUILD_NUMBER}"
|
mv "${AGENT_ROOT_FOLDER}/settings.xml" "${AGENT_ROOT_FOLDER}/settings.${PIPELINE_BUILD_NUMBER}"
|
||||||
cp "${AGENT_ROOT_FOLDER}/${MAVEN_SETTINGS_FILE}" "${AGENT_ROOT_FOLDER}/settings.xml"
|
cp "${AGENT_ROOT_FOLDER}/${MAVEN_SETTINGS_FILE}" "${AGENT_ROOT_FOLDER}/settings.xml"
|
||||||
echo "Done with local repository and settings"
|
echo "Done with local repository and settings"
|
||||||
echo "#Build ${PIPELINE_BUILD_NUMBER}" > ${AGENT_ROOT_FOLDER}/build_commits.csv
|
|
||||||
echo "#Release ${GCUBE_RELEASE_NUMBER}" >> ${AGENT_ROOT_FOLDER}/build_commits.csv
|
#build report
|
||||||
date=`date`
|
echo "#Build ${PIPELINE_BUILD_NUMBER}" > ${AGENT_ROOT_FOLDER}/build_commits.csv
|
||||||
echo "#StartTime ${date}" >> ${AGENT_ROOT_FOLDER}/build_commits.csv
|
echo "#Release ${GCUBE_RELEASE_NUMBER}" >> ${AGENT_ROOT_FOLDER}/build_commits.csv
|
||||||
echo -e "GroupID,ArtifactID,Version,SCM URL,Build Number,Distribution URL,Filename,Packaging" >> ${AGENT_ROOT_FOLDER}/build_commits.csv
|
date=`date`
|
||||||
|
echo "#StartTime ${date}" >> ${AGENT_ROOT_FOLDER}/build_commits.csv
|
||||||
|
echo -e "GroupID,ArtifactID,Version,SCM URL,Build Number,Distribution URL,Filename,Packaging" >> ${AGENT_ROOT_FOLDER}/build_commits.csv
|
||||||
|
|
||||||
|
#job report
|
||||||
|
echo "#Build ${PIPELINE_BUILD_NUMBER}" > $JOB_REPORT
|
||||||
|
echo "#StartTime ${date}" >> $JOB_REPORT
|
||||||
|
echo -e "JobName,Status" >> $JOB_REPORT
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue