Skip to content

Commit

Permalink
Add cdt-lsp support to the promote-a-build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahgraham committed Sep 8, 2023
1 parent 4588c76 commit 69bd1cb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
7 changes: 4 additions & 3 deletions releng/promote-a-build.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ 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')
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')
string(defaultValue: '9.8', description: 'The major and minor version of CDT being released (e.g. 11.3, 12.0, cdt-lsp-1.0, cdt-lsp-1.1).', 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-lsp-1.0.0, cdt-lsp-1.0.0-rc1)', name: 'MILESTONE')
choice(choices: ['cdt', 'cdt-lsp'], description: 'The repo being published', name: 'CDT_REPO')
string(defaultValue: 'main', description: 'The repo branch being published (e.g. main, master, cdt_11_3)', name: 'CDT_BRANCH')
string(defaultValue: '12345', description: 'The CI build number being promoted from', name: 'CDT_BUILD_NUMBER')
choice(choices: ['releases', 'builds'], description: 'Publish location (releases or builds)', name: 'RELEASE_OR_BUILD')
}
Expand Down
17 changes: 13 additions & 4 deletions releng/scripts/promote-a-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,17 @@ 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
ARTIFACTS_REPO_TARGET=$ARTIFACTS/releng/org.eclipse.cdt.repo/target
ARTIFACTS=https://ci.eclipse.org/cdt/job/$CDT_REPO/job/$CDT_BRANCH/$CDT_BUILD_NUMBER/artifact
if [ "$CDT_REPO" == "cdt" ]; then
ARTIFACTS_REPO_TARGET=$ARTIFACTS/releng/org.eclipse.cdt.repo/target
ZIP_NAME=org.eclipse.cdt.repo.zip
elif [ "$CDT_REPO" == "cdt-lsp" ]; then
ARTIFACTS_REPO_TARGET=$ARTIFACTS/releng/org.eclipse.cdt.lsp.repository/target
ZIP_NAME=org.eclipse.cdt.lsp.repository.zip
else
echo "unexpected value for CDT_REPO: ${CDT_REPO}"
exit 1
fi

echo Using download location root of $DOWNLOAD
echo Using artifacts location root of $ARTIFACTS
Expand All @@ -35,6 +44,6 @@ $ECHO $SSH "cd $DOWNLOAD && \
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"
wget -q $ARTIFACTS_REPO_TARGET/$ZIP_NAME && \
mv $ZIP_NAME $MILESTONE.zip"

0 comments on commit 69bd1cb

Please sign in to comment.