diff --git a/releng/download/releases/10.6/compositeArtifacts.xml b/releng/download/releases/10.6/compositeArtifacts.xml
new file mode 100644
index 00000000000..73eb331d4df
--- /dev/null
+++ b/releng/download/releases/10.6/compositeArtifacts.xml
@@ -0,0 +1,14 @@
+
+
+
"; + +function loadDirSimple($dir,$ext,$type) { // 1D array + $stuff = array(); + if (is_dir($dir) && is_readable($dir)) { + $handle=opendir($dir); + while (($file = readdir($handle))!==false) { + if ( ($ext=="" || preg_match("/".$ext."$/",$file)) && $file!=".." && $file!=".") { + if (($type=="f" && is_file($file)) || ($type=="d" && is_dir($file))) { + $stuff[] = "$file"; + } + } + } + closedir($handle); + } + return $stuff; +} + +function pretty_size($bytes) +{ + $sufs = array("B", "K", "M", "G", "T", "P"); //we shouldn't be larger than 999.9 petabytes any time soon, hopefully + $suf = 0; + + while($bytes >= 1000) + { + $bytes /= 1024; + $suf++; + } + + return sprintf("%3.1f%s", $bytes, $sufs[$suf]); +} +?> diff --git a/releng/scripts/promote-a-build.sh b/releng/scripts/promote-a-build.sh new file mode 100644 index 00000000000..7cb833c4d80 --- /dev/null +++ b/releng/scripts/promote-a-build.sh @@ -0,0 +1,74 @@ +#!/bin/bash + +set -u # run with unset flag error so that missing parameters cause build failure +set -e # error out on any failed commands +set -x # echo all commands used for debugging purposes + +SSHUSER="genie.cdt@projects-storage.eclipse.org" +SSH="ssh ${SSHUSER}" +SCP="scp" +DOWNLOAD=/home/data/httpd/download.eclipse.org/tools/cdt/$RELEASE_OR_BUILD/$MINOR_VERSION/$MILESTONE +ARTIFACTS=https://ci.eclipse.org/cdt/job/$CDT_JOB_NAME/$CDT_BUILD_NUMBER/artifact +INDEX_PHP_FOR_RCP=scripts/cdt-standalone-php-template +ARTIFACTS_REPO_TARGET=$ARTIFACTS/releng/org.eclipse.cdt.repo/target + +echo Using download location root of $DOWNLOAD +echo Using artifacts location root of $ARTIFACTS + + + +echo Testing to make sure artifacts location is sane +wget -q --output-document=/dev/null $ARTIFACTS + +ECHO=echo +if [ "$DRY_RUN" == "false" ]; then + ECHO="" +else + echo Dry run of build: +fi + + +# The STANDALONE_ONLY flag is used to publish the standalone debugger from a +# different job (e.g. cdt-9.9-standalone-debugger job) after the main +# build has been published +if [ "$STANDALONE_ONLY" == "false" ]; then + echo Testing to make sure we are publishing to a new directory + $SSH "test ! -e $DOWNLOAD" + $ECHO $SSH "mkdir -p $DOWNLOAD" + + $ECHO $SSH "cd $DOWNLOAD && \ + wget -q $ARTIFACTS_REPO_TARGET/repository/*zip*/repository.zip && \ + unzip -q repository.zip && \ + mv repository/* . && \ + rm -r repository repository.zip" + + $ECHO $SSH "cd $DOWNLOAD && \ + wget -q $ARTIFACTS_REPO_TARGET/org.eclipse.cdt.repo.zip && \ + mv org.eclipse.cdt.repo.zip $MILESTONE.zip" +fi + +# promote standalone debugger +if [ "$STANDALONE" == "true" ]; then + $ECHO $SSH "mkdir -p $DOWNLOAD/rcp" + + $ECHO $SSH "cd $DOWNLOAD/rcp && \ + wget -q $ARTIFACTS/debug/org.eclipse.cdt.debug.application.product/target/products/*zip*/products.zip && \ + unzip -q products.zip && \ + mv products/* ." + + if [ "$ECHO" == "echo" ]; then + # if there is a better way to handle echoing the pipeline, let me (Jonah) know + $ECHO Setting up index.php pipeline + else + cat $INDEX_PHP_FOR_RCP | sed "-es,CDT 9.4.0,$(echo $MILESTONE | sed '-es@cdt-@CDT @')," | $SSH "cat - > $DOWNLOAD/rcp/index.php" + fi + $ECHO $SSH "cd $DOWNLOAD/rcp && \ + rm -r products products.zip" + + $ECHO $SSH "mkdir $DOWNLOAD/rcp-repository" + $ECHO $SSH "cd $DOWNLOAD/rcp-repository && \ + wget -q $ARTIFACTS/debug/org.eclipse.cdt.debug.application.product/target/repository/*zip*/repository.zip && \ + unzip -q repository.zip && \ + mv repository/* . && \ + rm -r repository repository.zip" +fi diff --git a/releng/scripts/promote-files-to-download.sh b/releng/scripts/promote-files-to-download.sh new file mode 100644 index 00000000000..8929bffa73f --- /dev/null +++ b/releng/scripts/promote-files-to-download.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +set -u # run with unset flag error so that missing parameters cause build failure +set -e # error out on any failed commands +set -x # echo all commands used for debugging purposes + +SSHUSER="genie.cdt@projects-storage.eclipse.org" +SSH="ssh ${SSHUSER}" +SCP="scp" +DOWNLOAD=/home/data/httpd/download.eclipse.org/tools/cdt + +ECHO=echo +if [ "$DRY_RUN" == "false" ]; then + ECHO="" +else + echo Dry run of build: +fi + +# Rather than putting in infra/coding to make this a fully generic script with parameters, +# just list out what needs to be copied where +$ECHO $SSH mkdir -p "${DOWNLOAD}/releases/latest/" +$ECHO $SCP ./releng/download/releases/latest/* "${SSHUSER}:${DOWNLOAD}/releases/latest/" +$ECHO $SCP ./releng/download/releases/10.6/* "${SSHUSER}:${DOWNLOAD}/releases/10.6/" +$ECHO $SCP ./releng/download/releases/10.7/* "${SSHUSER}:${DOWNLOAD}/releases/10.7/"