Skip to content

Commit

Permalink
Remove standalone publishing from promote-a-build
Browse files Browse the repository at this point in the history
The CDT project stopped publishing standalone separately
2 1/2 years ago:

https://github.com/eclipse-cdt/cdt/blob/main/NewAndNoteworthy/CDT-10.2.md#cdt-standalone-debugger-part-of-main-download

and as there has been no call for it since then this commit
removes the remnants of the publishing script.
  • Loading branch information
jonahgraham committed Sep 8, 2023
1 parent 54a7f61 commit 4588c76
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 47 deletions.
2 changes: 0 additions & 2 deletions releng/promote-a-build.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ pipeline {
agent any
parameters {
booleanParam(defaultValue: true, description: 'Do a dry run of the build. All commands will be echoed.First run with this on, then when you are sure it is right, choose rebuild in the passing job and uncheck this box', name: 'DRY_RUN')
booleanParam(defaultValue: false, description: 'Include CDT standalone debugger when publishing (if applicable)', name: 'STANDALONE')
booleanParam(defaultValue: false, description: 'Publish only the standalon debugger. This is used to add the standalone debugger from a different job to the already published CDT release', name: 'STANDALONE_ONLY')
string(defaultValue: '9.8', description: 'The major and minor version of CDT being released (e.g. 9.7, 9.8, 10.0).', name: 'MINOR_VERSION')
string(defaultValue: 'cdt-9.8.0', description: 'The full name of this release (e.g. cdt-9.4.2, cdt-9.5.0-rc1, cdt-9.5.0-photon-m7, cdt-9.5.0-photon-rc1)', name: 'MILESTONE')
string(defaultValue: 'cdt/job/main', description: 'The CI job name being promoted from (e.g. cdt/job/cdt_10_7, cdt/job/main', name: 'CDT_JOB_NAME')
Expand Down
56 changes: 11 additions & 45 deletions releng/scripts/promote-a-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,11 @@ 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.txt
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

Expand All @@ -27,48 +24,17 @@ else
echo Dry run of build:
fi

echo Testing to make sure we are publishing to a new directory
$SSH "test ! -e $DOWNLOAD"
$ECHO $SSH "mkdir -p $DOWNLOAD"

# 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/* ."
$ECHO $SSH "cd $DOWNLOAD && \
wget -q $ARTIFACTS_REPO_TARGET/repository/*zip*/repository.zip && \
unzip -q repository.zip && \
mv repository/* . && \
rm -r repository repository.zip"

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 "cd $DOWNLOAD && \
wget -q $ARTIFACTS_REPO_TARGET/org.eclipse.cdt.repo.zip && \
mv org.eclipse.cdt.repo.zip $MILESTONE.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

0 comments on commit 4588c76

Please sign in to comment.