Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2021-05-01 06:09:31 +0000
committerEike Stepper2021-05-01 06:09:31 +0000
commit4e2b3c43b9964c58c31030f5bfb1c4c70dd405c1 (patch)
tree4ab2b69e9dd3339c200cf917fba911a89dcff4e8
parentc12b34eaf1fdea08caedc75df999519458230257 (diff)
downloadcdo.infrastructure-4e2b3c43b9964c58c31030f5bfb1c4c70dd405c1.tar.gz
cdo.infrastructure-4e2b3c43b9964c58c31030f5bfb1c4c70dd405c1.tar.xz
cdo.infrastructure-4e2b3c43b9964c58c31030f5bfb1c4c70dd405c1.zip
Create copied-builds.txt file during promotion
-rw-r--r--org.eclipse.emf.cdo.releng.promotion/config/promoter.properties1
-rw-r--r--org.eclipse.emf.cdo.releng.promotion/src/promoter/BuildCopier.java18
-rw-r--r--org.eclipse.emf.cdo.releng.promotion/src/promoter/Promoter.java5
3 files changed, 20 insertions, 4 deletions
diff --git a/org.eclipse.emf.cdo.releng.promotion/config/promoter.properties b/org.eclipse.emf.cdo.releng.promotion/config/promoter.properties
index feb1d74..4a08ff9 100644
--- a/org.eclipse.emf.cdo.releng.promotion/config/promoter.properties
+++ b/org.eclipse.emf.cdo.releng.promotion/config/promoter.properties
@@ -13,7 +13,6 @@ firstRelevantRevision=1494478feeb46fa6eff70887ea03f59a5a790683
# Global infra structure
GIT_EXECUTABLE=/usr/local/bin/git
HELP_URL=http://help.eclipse.org/2021-03
-#JOBS_URL=https://ci-staging.eclipse.org/cdo/job
ARCHIVE_HOME=/home/data/httpd/archive.eclipse.org
ARCHIVE_URL=http://archive.eclipse.org
diff --git a/org.eclipse.emf.cdo.releng.promotion/src/promoter/BuildCopier.java b/org.eclipse.emf.cdo.releng.promotion/src/promoter/BuildCopier.java
index 075e4b7..5429178 100644
--- a/org.eclipse.emf.cdo.releng.promotion/src/promoter/BuildCopier.java
+++ b/org.eclipse.emf.cdo.releng.promotion/src/promoter/BuildCopier.java
@@ -17,6 +17,7 @@ import org.xml.sax.helpers.DefaultHandler;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
+import java.io.PrintStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
@@ -45,6 +46,9 @@ public class BuildCopier extends PromoterComponent
List<BuildInfo> buildInfos = new ArrayList<>();
File configFolder = new File(PromoterConfig.INSTANCE.getConfigDirectory(), "jobs");
+ File logFile = new File(PromoterConfig.INSTANCE.getWorkingArea(), "copied-builds.txt");
+ logFile.delete(); // Intentionally on best effort.
+
for (File jobDir : configFolder.listFiles())
{
if (!jobDir.isDirectory())
@@ -69,6 +73,20 @@ public class BuildCopier extends PromoterComponent
copyBuilds(jobName, jobProperties, buildInfos);
}
+ if (!buildInfos.isEmpty())
+ {
+ IO.writeFile(logFile, out -> {
+ PrintStream stream = new PrintStream(out);
+
+ for (BuildInfo buildInfo : buildInfos)
+ {
+ stream.println(buildInfo.getQualifier());
+ }
+
+ stream.flush();
+ });
+ }
+
return buildInfos;
}
diff --git a/org.eclipse.emf.cdo.releng.promotion/src/promoter/Promoter.java b/org.eclipse.emf.cdo.releng.promotion/src/promoter/Promoter.java
index 5e5e030..72c070f 100644
--- a/org.eclipse.emf.cdo.releng.promotion/src/promoter/Promoter.java
+++ b/org.eclipse.emf.cdo.releng.promotion/src/promoter/Promoter.java
@@ -104,12 +104,11 @@ public class Promoter extends ComponentFactory
System.out.println("ArchiveArea = " + PromoterConfig.INSTANCE.getArchiveArea());
System.out.println("ArchiveDropsArea = " + PromoterConfig.INSTANCE.getArchiveDropsArea());
System.out.println("WorkingArea = " + PromoterConfig.INSTANCE.getWorkingArea());
- // System.out.println("ProjectRelengArea = " + PromoterConfig.INSTANCE.getProjectRelengArea());
- System.out.println("AntHome = " + PromoterConfig.INSTANCE.getAntHome());
- System.out.println("GitExecutable = " + PromoterConfig.INSTANCE.getGitExecutable());
System.out.println("ProjectCloneLocation = " + PromoterConfig.INSTANCE.getProjectCloneLocation());
System.out.println("InstallDirectory = " + PromoterConfig.INSTANCE.getInstallDirectory());
System.out.println("ConfigDirectory = " + PromoterConfig.INSTANCE.getConfigDirectory());
+ System.out.println("AntHome = " + PromoterConfig.INSTANCE.getAntHome());
+ System.out.println("GitExecutable = " + PromoterConfig.INSTANCE.getGitExecutable());
System.out.println("JobsURL = " + PromoterConfig.INSTANCE.getJobsURL());
System.out.println("----------------------------------------------------------------------------------------------------------");

Back to the top