| #!/bin/bash |
| |
| set -x |
| |
| DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) |
| |
| # The default seems to be 0022 |
| # We need user (genie.orbit) and group (tools.orbit) to match |
| umask 0002 |
| |
| contentFile=${repoDir}/content.xml |
| |
| # Ensure repository generated by maven has proper permissions |
| # Remove this line when Hudson has global umask of 0002 |
| chmod -R g+w ${repoDir} |
| |
| unzip -d ${repoDir} ${repoDir}/content.jar |
| |
| set -e |
| export BUILD_TIME=$(echo $(basename $(find releng/repository -name "orbit-*-repo.zip")) | grep -o "[0-9]*") |
| NEW_BUILD_LABEL=${BUILD_LABEL}${BUILD_TIME} |
| |
| # Promote orbit-recipes build to download location |
| ORBIT_DOWNLOAD_LOC=/home/data/httpd/download.eclipse.org/tools/orbit/downloads |
| echo "1" > files.count |
| ssh genie.orbit@projects-storage.eclipse.org mkdir -p ${ORBIT_DOWNLOAD_LOC}/drops/${NEW_BUILD_LABEL} |
| scp -r ${repoDir} files.count genie.orbit@projects-storage.eclipse.org:${ORBIT_DOWNLOAD_LOC}/drops/${NEW_BUILD_LABEL} |
| |
| # Copy the aggregated repository archive |
| buildRepoZipPath=`find releng/repository-all/target/ -name "orbit-buildrepo-*.zip"` |
| chmod g+w ${buildRepoZipPath} |
| buildRepoZipName=`basename ${buildRepoZipPath}` |
| buildRepoZipDir=`dirname ${buildRepoZipPath}` |
| zipFileSize='('`ls -sh ${buildRepoZipPath} | cut -d' ' -f1`')' |
| mkdir checksum |
| pushd releng/repository-all/target/ |
| md5sum ${buildRepoZipName} > ../../../checksum/${buildRepoZipName}.md5 |
| sha1sum ${buildRepoZipName} > ../../../checksum/${buildRepoZipName}.sha1 |
| popd |
| scp -r ${buildRepoZipPath} checksum genie.orbit@projects-storage.eclipse.org:${ORBIT_DOWNLOAD_LOC}/drops/${NEW_BUILD_LABEL} |
| |
| # Copy Repository Report |
| chmod -R g+w releng/repository-report/target/reporeports/ |
| scp -r releng/repository-report/target/reporeports/ genie.orbit@projects-storage.eclipse.org:${ORBIT_DOWNLOAD_LOC}/drops/${NEW_BUILD_LABEL} |
| |
| # Generate and copy index page |
| repoPath=https://download.eclipse.org/tools/orbit/downloads/drops/${NEW_BUILD_LABEL}/repository |
| ${DIR}/create-index.html.sh $contentFile $NEW_BUILD_LABEL $BUILD_URL $repoPath $zipFileSize > index.html |
| scp index.html genie.orbit@projects-storage.eclipse.org:${ORBIT_DOWNLOAD_LOC}/drops/${NEW_BUILD_LABEL}/ |
| |
| . ${DIR}/composite-functions.sh |
| |
| # Update latest-X repository with this build |
| if [ "${UPDATE_LATEST_X}" = "true" ]; then |
| upload_composite_repo_files ${NEW_BUILD_LABEL} ../drops/${NEW_BUILD_LABEL}/repository latest-${BUILD_LABEL} |
| fi |
| |
| # Update static release repo with this build (this is normally done on all non-I builds) |
| if [ -n "${SIMREL_NAME}" ]; then |
| upload_composite_repo_files ${NEW_BUILD_LABEL} ../drops/${NEW_BUILD_LABEL}/repository ${SIMREL_NAME} |
| fi |
| |
| if [ -n "${DESCRIPTION}" ]; then |
| scp genie.orbit@projects-storage.eclipse.org:${ORBIT_DOWNLOAD_LOC}/notes.php notes.php |
| sed -i '/Intentionally not php-closed, since included from PHP section/ i $notes["'${NEW_BUILD_LABEL}'"]="'"${DESCRIPTION}"'";' notes.php |
| scp notes.php genie.orbit@projects-storage.eclipse.org:${ORBIT_DOWNLOAD_LOC}/notes.php |
| fi |
| |
| |
| set +x |
| echo "####################################################################################################" |
| echo "####################################################################################################" |
| echo "####################################################################################################" |
| echo "### Build Page : https://download.eclipse.org/tools/orbit/downloads/drops/${NEW_BUILD_LABEL} ###" |
| echo "### p2 Repository : https://download.eclipse.org/tools/orbit/$downloads/drops/${NEW_BUILD_LABEL} ###" |
| echo "####################################################################################################" |
| echo "####################################################################################################" |
| echo "####################################################################################################" |
| set -x |