Restore initialize stage.
This commit is contained in:
parent
315626848f
commit
1de672a7c5
|
@ -124,25 +124,32 @@ pipeline {
|
|||
stage('initialize') {
|
||||
steps {
|
||||
sh '''
|
||||
echo "REMOVE_LOCAL_REPO: ${REMOVE_LOCAL_REPO}"
|
||||
echo "CLEANUP_GCUBE_REPO: ${CLEANUP_GCUBE_REPO}"
|
||||
if [ "$CLEANUP_GCUBE_REPO" = "true" ]; then
|
||||
echo "Remove gCube artifacts from local repository"
|
||||
rm -rf $MAVEN_LOCAL_REPO/org/gcube
|
||||
fi
|
||||
if [ "$REMOVE_LOCAL_REPO" = "true" ]; then
|
||||
echo "Create a fresh local repository"
|
||||
rm -rf $MAVEN_LOCAL_REPO
|
||||
mkdir -p $MAVEN_LOCAL_REPO
|
||||
fi
|
||||
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"
|
||||
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
|
||||
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
|
||||
echo "REMOVE_LOCAL_REPO: ${REMOVE_LOCAL_REPO}"
|
||||
echo "CLEANUP_GCUBE_REPO: ${CLEANUP_GCUBE_REPO}"
|
||||
if [ "$CLEANUP_GCUBE_REPO" = "true" ]; then
|
||||
echo "Remove gCube artifacts from local repository"
|
||||
rm -rf $MAVEN_LOCAL_REPO/org/gcube
|
||||
fi
|
||||
if [ "$REMOVE_LOCAL_REPO" = "true" ]; then
|
||||
echo "Create a fresh local repository"
|
||||
rm -rf $MAVEN_LOCAL_REPO
|
||||
mkdir -p $MAVEN_LOCAL_REPO
|
||||
fi
|
||||
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"
|
||||
echo "Done with local repository and settings"
|
||||
|
||||
#build report
|
||||
echo "#Build ${PIPELINE_BUILD_NUMBER}" > ${AGENT_ROOT_FOLDER}/build_commits.csv
|
||||
echo "#Release ${GCUBE_RELEASE_NUMBER}" >> ${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