diff options
author | David Williams | 2016-04-03 06:34:17 +0000 |
---|---|---|
committer | David Williams | 2016-04-03 06:34:17 +0000 |
commit | 82fb5f06ec7261fcc5de9e99e5660e25c9b105b6 (patch) | |
tree | 542e187c7b218e90dd2f087be4e1a78cfa2cef95 /production | |
parent | 0d2c3352fc74508eefbcda02659ed9120cf9558e (diff) | |
download | eclipse.platform.releng.aggregator-82fb5f06ec7261fcc5de9e99e5660e25c9b105b6.tar.gz eclipse.platform.releng.aggregator-82fb5f06ec7261fcc5de9e99e5660e25c9b105b6.tar.xz eclipse.platform.releng.aggregator-82fb5f06ec7261fcc5de9e99e5660e25c9b105b6.zip |
[releng] add error chedking to create report invocation
Diffstat (limited to 'production')
-rwxr-xr-x | production/createReports.sh | 124 |
1 files changed, 67 insertions, 57 deletions
diff --git a/production/createReports.sh b/production/createReports.sh index 8e208a508..538a14736 100755 --- a/production/createReports.sh +++ b/production/createReports.sh @@ -13,75 +13,85 @@ build_type=${buildIdToTest:0:1} build_dir_root="${BUILD_HOME}/4${build_type}/siteDir/eclipse/downloads/drops4" build_update_root="${BUILD_HOME}/4${build_type}/siteDir/updates" dl_dir_root="/home/data/httpd/download.eclipse.org/eclipse/downloads/drops4" -if [[ ${build_type} == "M" ]] +if [[ ${build_type} == "N" ]] then - update_dir_segment="4.5-M-builds" + update_dir_segment="4.6-N-builds" +elif [[ ${build_type} == "M" ]] +then + update_dir_segment="4.5-M-builds" elif [[ ${build_type} == "I" ]] then - update_dir_segment="4.6-I-builds" + update_dir_segment="4.6-I-builds" +elif [[ ${build_type} == "Y" ]] +then + update_dir_segment="4.6-Y-builds" +else + echo -e "\nERROR: Unhandled build type: ${build_type} so update_dir_segment undefined: $update_dir_segment" fi -buildToTest="${build_update_root}/${update_dir_segment}/${buildIdToTest}" - -buildToCompare="/home/data/httpd/download.eclipse.org/eclipse/updates/${buildIdToCompare}" - - -app_area="${build_dir_root}/${buildIdToTest}" - -output_dir="${build_dir_root}/${buildIdToTest}/buildlogs" -#remove and re-create in case 'reports' exists from a previous run (eventually will not be needed) -if [[ -e ${output_dir}/reporeports ]] +if [[ -n "$update_dir_segment" ]] then - rm -rf ${output_dir}/reporeports -fi -# just in case does not exist yet -mkdir -p ${output_dir} + buildToTest="${build_update_root}/${update_dir_segment}/${buildIdToTest}" -tar_name=org.eclipse.cbi.p2repo.analyzers.product-linux.gtk.x86_64.tar.gz + buildToCompare="/home/data/httpd/download.eclipse.org/eclipse/updates/${buildIdToCompare}" -report_app_area="${app_area}/reportApplication" -if [[ -z "${TMP_DIR}" ]] -then - echo -e "\n\t"ERROR: TMP_DIR surprisingly not defined.\n" - echo -e "\n\t\tThus stopping create report, but exiting with 0\n" - exit 0 -fi -if [[ ! -d "${TMP_DIR}" ]] -then - echo -e "\n\t"ERROR: TMP_DIR surprisingly did not exist at ${TMP_DIR}.\n" - echo -e "\n\t\tSo, creating ${TMP_DIR}\n" - mkdir -p ${TMP_DIR} -fi + app_area="${build_dir_root}/${buildIdToTest}" -# Let's always refetch for now -# TODO: turned off proxy for now. Ideally would set proper environment variables! -# --no-verbose -quiet -#if [[ ! -F ${TMP_DIR}/${tar_name} ]] -#then - wget --no-proxy --no-cache -O "${TMP_DIR}/${tar_name}" https://hudson.eclipse.org/cbi/job/cbi.p2repo.analyzers.build/lastSuccessfulBuild/artifact/output/products/${tar_name} 2>&1 -#else -# echo "${TMP_DIR}/${tar_name} already existed, not re-fetched" -#fi -# always extract anew each time. -if [[ -e ${report_app_area} ]] -then + output_dir="${build_dir_root}/${buildIdToTest}/buildlogs" + #remove and re-create in case 'reports' exists from a previous run (eventually will not be needed) + if [[ -e ${output_dir}/reporeports ]] + then + rm -rf ${output_dir}/reporeports + fi + # just in case does not exist yet + mkdir -p ${output_dir} + + tar_name=org.eclipse.cbi.p2repo.analyzers.product-linux.gtk.x86_64.tar.gz + + report_app_area="${app_area}/reportApplication" + + if [[ -z "${TMP_DIR}" ]] + then + echo -e "\n\tERROR: TMP_DIR surprisingly not defined.\n" + echo -e "\n\t\tThus stopping create report, but exiting with 0\n" + exit 0 + fi + if [[ ! -d "${TMP_DIR}" ]] + then + echo -e "\n\tERROR: TMP_DIR surprisingly did not exist at ${TMP_DIR}.\n" + echo -e "\n\t\tSo, creating ${TMP_DIR}\n" + mkdir -p ${TMP_DIR} + fi + + # Let's always refetch for now + # TODO: turned off proxy for now. Ideally would set proper environment variables! + # --no-verbose -quiet + #if [[ ! -F ${TMP_DIR}/${tar_name} ]] + #then + wget --no-proxy --no-cache -O "${TMP_DIR}/${tar_name}" https://hudson.eclipse.org/cbi/job/cbi.p2repo.analyzers.build/lastSuccessfulBuild/artifact/output/products/${tar_name} 2>&1 + #else + # echo "${TMP_DIR}/${tar_name} already existed, not re-fetched" + #fi + # always extract anew each time. + if [[ -e ${report_app_area} ]] + then rm -fr ${report_app_area} -fi -mkdir -p ${report_app_area} + fi + mkdir -p ${report_app_area} -echo -e "\n\tExtracting: ${TMP_DIR}/${tar_name}" + echo -e "\n\tExtracting: ${TMP_DIR}/${tar_name}" -tar -xf "${TMP_DIR}/${tar_name}" -C ${report_app_area} + tar -xf "${TMP_DIR}/${tar_name}" -C ${report_app_area} -${report_app_area}/p2analyze -data ${output_dir}/workspace-report -vm ${JAVA_8_HOME}/bin -vmargs -Xmx1g \ --DreportRepoDir=${buildToTest} \ --DreportOutputDir=${output_dir} \ --DreferenceRepo=${buildToCompare} - -${report_app_area}/p2analyze -data ${output_dir}/workspace-report -vm ${JAVA_8_HOME}/bin -vmargs -Xmx2g \ --DuseNewApi=true \ --DreportRepoDir=${buildToTest} \ --DreportOutputDir=${output_dir} \ --DreferenceRepo=${buildToCompare} + ${report_app_area}/p2analyze -data ${output_dir}/workspace-report -vm ${JAVA_8_HOME}/bin -vmargs -Xmx1g \ + -DreportRepoDir=${buildToTest} \ + -DreportOutputDir=${output_dir} \ + -DreferenceRepo=${buildToCompare} + ${report_app_area}/p2analyze -data ${output_dir}/workspace-report -vm ${JAVA_8_HOME}/bin -vmargs -Xmx2g \ + -DuseNewApi=true \ + -DreportRepoDir=${buildToTest} \ + -DreportOutputDir=${output_dir} \ + -DreferenceRepo=${buildToCompare} +fi |