Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 0 additions & 70 deletions JenkinsJobs/Cleanup/pruneDailyRepos.groovy

This file was deleted.

242 changes: 0 additions & 242 deletions cje-production/cleaners/cleanupNightlyRepo.sh

This file was deleted.

31 changes: 30 additions & 1 deletion cje-production/mbscripts/mb620_promoteUpdateSite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ fi
source $CJE_ROOT/scripts/common-functions.shsource
source $1

compositeTargetSize=3
epUpdateDir=/home/data/httpd/download.eclipse.org/eclipse/updates
dropsPath=${epUpdateDir}/${STREAMMajor}.${STREAMMinor}-${BUILD_TYPE}-builds
latestRelDir=/home/data/httpd/download.eclipse.org/eclipse/downloads/drops4
Expand All @@ -48,7 +49,35 @@ epRelDir=$(ssh [email protected] ls -d --format=single-c
ssh [email protected] tar -C ${workspace} -xzf ${epRelDir}/eclipse-platform-*-linux-gtk-x86_64.tar.gz

#get requisite tools
ssh [email protected] wget -O ${workspace}/addToComposite.xml https://download.eclipse.org/eclipse/relengScripts/cje-production/scripts/addToComposite.xml
# Enhance the addToComposite ANT script to remove the oldest/earliest children to ensure the target-size is not exceeded
scp [email protected]:${dropsPath}/compositeArtifacts.jar compositeArtifacts.jar
#Unzip compositeArtifacts.xml and read the current children from it
currentChildren=$(unzip -p compositeArtifacts.jar compositeArtifacts.xml |\
xmllint - --xpath '/repository/children/child/@location' |\
sed --expression 's|location="||g' --expression 's|"||g')
rm compositeArtifacts.jar
childrenArray=(${currentChildren})
echo "Current children of composite repository: ${childrenArray[@]}"

addToComposite_xml=$(curl https://download.eclipse.org/eclipse/relengScripts/cje-production/scripts/addToComposite.xml)
extraTasksMarker='<!--EXTRA_TASKS-->'

# One more child is about to be added to the composite.
# Remove those children from the beginning of the list if the target-size would be exceeded.
removalCount=$(( ${#childrenArray[@]} + 1 - compositeTargetSize ))
if [ "${removalCount}" -gt 0 ]; then
childrenToRemove="${childrenArray[@]:0:${removalCount}}"
echo "Remove from composite repsitory: ${childrenToRemove}"
extraAntTask=''
for child in ${childrenToRemove}; do
extraAntTask+="<remove><repository location=\\\"${child}\\\"/></remove>\\n "
done
addToComposite_xml=$(cat <<<"${addToComposite_xml}" | sed --expression "s|${extraTasksMarker}|${extraAntTask}|g")
else
echo "Composite p2-repository contains only ${#childrenArray[@]} children and adding one will not exceed its target size of ${compositeTargetSize}: ${dropsPath}"
fi

ssh [email protected] "cat<<<'${addToComposite_xml}' > ${workspace}/addToComposite.xml"

#triggering ant runner
baseBuilderDir=${workspace}/eclipse
Expand Down
3 changes: 1 addition & 2 deletions cje-production/scripts/addToComposite.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>

<project
default="addToComposite"
basedir=".">
Expand All @@ -16,7 +15,7 @@
<add>
<repository location="${complocation}" />
</add>
<!--EXTRA_TASKS-->
</p2.composite.repository>
</target>
</project>

Loading