Commit d99b2ce9 authored by Christian Kuhn's avatar Christian Kuhn
Browse files

[TASK] Drop bamboo test plans

With the CI migration from bamboo to gitlab being finished,
the bamboo test plan setup can be dropped from core.

Resolves: #93994
Releases: master, 10.4, 9.5
Change-Id: I8f3d5beda8b296e268c2da5eddead6a542f5d418
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/68883


Tested-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Simon Gilli's avatarSimon Gilli <typo3@gilbertsoft.org>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Simon Gilli's avatarSimon Gilli <typo3@gilbertsoft.org>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent d5f8ce55
......@@ -20,7 +20,6 @@ FILES=`find . -type f \
! -path "./.php_cs.cache" \
! -path "./typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Contrib/*" \
! -path "./typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Plugins/*" \
! -path "./Build/bamboo/target/*" \
! -path "./Build/JavaScript/*" \
! -path "./typo3/sysext/*/Documentation-GENERATED-temp/*" \
-print0 | xargs -0 -n1 -P8 file {} | grep 'UTF-8 Unicode (with BOM)'`
......
......@@ -9,7 +9,7 @@
# on windows systems.
#
# Rule is simple: If this script returns with not 0, for instance by
# a bamboo pre-merge test, then shorten the offending path / file
# a gitlab pre-merge test, then shorten the offending path / file
# combination somehow.
#
# This script expects to be run from the core root.
......
......@@ -201,7 +201,7 @@ Options:
-o <number>
Only with -s unitRandom
Set specific random seed to replay a random run in this order again. The phpunit randomizer
outputs the used seed at the end (in bamboo core testing logs, too). Use that number to
outputs the used seed at the end (in gitlab core testing logs, too). Use that number to
replay the unit tests in that order.
-n
......
username=admin
password=aPassword
.credentials
### Maven
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
### Java
# Compiled class file
*.class
# Log file
*.log
# Package Files #
*.jar
### Never add private credentials file to upstream
.credentials
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
### Idea
.idea/
*.iml
### Eclipse
.classpath
.project
.settings/
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.atlassian.bamboo</groupId>
<artifactId>bamboo-specs-parent</artifactId>
<version>7.1.2</version>
<relativePath/>
</parent>
<groupId>com.atlassian.bamboo</groupId>
<artifactId>typo3-core</artifactId>
<version>1.0.0</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>com.atlassian.bamboo</groupId>
<artifactId>bamboo-specs-api</artifactId>
</dependency>
<dependency>
<groupId>com.atlassian.bamboo</groupId>
<artifactId>bamboo-specs</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<!-- run 'mvn test' to perform offline validation of the plan -->
<!-- run 'mvn -Ppublish-specs' to upload the plan to your Bamboo server -->
</project>
This diff is collapsed.
package core;
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
import com.atlassian.bamboo.specs.api.builders.plan.Job;
import com.atlassian.bamboo.specs.api.builders.plan.Stage;
import com.atlassian.bamboo.specs.api.builders.project.Project;
import com.atlassian.bamboo.specs.builders.trigger.RemoteTrigger;
import java.util.ArrayList;
/**
* Pre-Merge and Security Pre-Merge tests use the same setup, but different repositories and triggers
* Bundling the common bits in a parent class eases changes in the future
*/
abstract class AbstractPreMergeSpec extends AbstractCoreSpec {
private static int numberOfAcceptanceTestJobs = 10;
private static int numberOfFunctionalMysqlJobs = 10;
private static int numberOfFunctionalMssqlJobs = 10;
private static int numberOfFunctionalPgsqlJobs = 10;
private static int numberOfFunctionalSqliteJobs = 10;
private static int numberOfUnitRandomOrderJobs = 1;
private String[] phpVersions = {"PHP74"};
/**
* override in concrete class in function createPlan. If not security repo related, set to false
*/
Boolean isSecurity = true;
RemoteTrigger getGerritTrigger() {
return new RemoteTrigger()
.name("Remote trigger for pre-merge builds")
.description("Gerrit")
.triggerIPAddresses("5.10.165.218,91.184.35.13");
}
Stage getMainStage() {
ArrayList<Job> jobsMainStage = new ArrayList<Job>();
jobsMainStage.add(this.getJobAcceptanceTestInstallMysql(0, phpVersions[0], this.getTaskComposerInstall(phpVersions[0]), isSecurity));
jobsMainStage.add(this.getJobAcceptanceTestInstallPgsql(0, phpVersions[0], this.getTaskComposerInstall(phpVersions[0]), isSecurity));
jobsMainStage.add(this.getJobAcceptanceTestInstallSqlite(0, phpVersions[0], this.getTaskComposerInstall(phpVersions[0]), isSecurity));
jobsMainStage.addAll(this.getJobsAcceptanceTestsBackendMysql(0, numberOfAcceptanceTestJobs, phpVersions[0], this.getTaskComposerInstall(phpVersions[0]), isSecurity));
jobsMainStage.add(this.getJobIntegrationPhpStan(phpVersions[0], this.getTaskComposerInstall(phpVersions[0]), isSecurity));
jobsMainStage.add(this.getJobIntegrationDocBlocks(phpVersions[0], this.getTaskComposerInstall(phpVersions[0]), isSecurity));
jobsMainStage.add(this.getJobIntegrationAnnotations(phpVersions[0], this.getTaskComposerInstall(phpVersions[0]), isSecurity));
jobsMainStage.add(this.getJobIntegrationVarious(phpVersions[0], this.getTaskComposerInstall(phpVersions[0]), isSecurity));
jobsMainStage.addAll(this.getJobsFunctionalTestsMysqlWithDriverMySqli(0, numberOfFunctionalMysqlJobs, phpVersions[0], this.getTaskComposerInstall(phpVersions[0]), isSecurity));
// mssql functionals are not executed as pre-merge
jobsMainStage.addAll(this.getJobsFunctionalTestsPgsql(0, numberOfFunctionalPgsqlJobs, phpVersions[0], this.getTaskComposerInstall(phpVersions[0]), isSecurity));
jobsMainStage.addAll(this.getJobsFunctionalTestsSqlite(0, numberOfFunctionalSqliteJobs, phpVersions[0], this.getTaskComposerInstall(phpVersions[0]), isSecurity));
jobsMainStage.add(this.getJobUnitJavaScript("JS", this.getTaskComposerInstall(phpVersions[0]), isSecurity));
for (String phpVersion : phpVersions) {
jobsMainStage.add(this.getJobLintPhp(phpVersion, isSecurity));
}
jobsMainStage.add(this.getJobLintScssTs("JS", isSecurity));
for (String phpVersion : phpVersions) {
jobsMainStage.add(this.getJobUnitPhp(0, phpVersion, this.getTaskComposerInstall(phpVersion), isSecurity));
}
for (String phpVersion : phpVersions) {
jobsMainStage.add(this.getJobUnitDeprecatedPhp(0, phpVersion, this.getTaskComposerInstall(phpVersion), isSecurity));
}
for (String phpVersion : phpVersions) {
jobsMainStage.addAll(this.getJobUnitPhpRandom(0, numberOfUnitRandomOrderJobs, phpVersion, this.getTaskComposerInstall(phpVersion), isSecurity));
}
return new Stage("Main stage")
.jobs(jobsMainStage.toArray(new Job[jobsMainStage.size()]));
}
Stage getEarlyStage() {
ArrayList<Job> jobsEarlyStage = new ArrayList<Job>();
jobsEarlyStage.add(this.getJobCglCheckGitCommit(phpVersions[0], isSecurity));
jobsEarlyStage.add(this.getJobComposerValidate(phpVersions[0], isSecurity));
return new Stage("Early")
.jobs(jobsEarlyStage.toArray(new Job[jobsEarlyStage.size()]));
}
Stage getPreparationStage() {
ArrayList<Job> jobsPreparationStage = new ArrayList<Job>();
jobsPreparationStage.add(this.getJobBuildLabels());
return new Stage("Preparation")
.jobs(jobsPreparationStage.toArray(new Job[jobsPreparationStage.size()]));
}
/**
* Core master pre-merge plan is in "TYPO3 core" project of bamboo
*/
Project project() {
return new Project().name(projectName).key(projectKey);
}
}
package core;
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
import com.atlassian.bamboo.specs.api.BambooSpec;
import com.atlassian.bamboo.specs.api.builders.AtlassianModule;
import com.atlassian.bamboo.specs.api.builders.Variable;
import com.atlassian.bamboo.specs.api.builders.notification.AnyNotificationRecipient;
import com.atlassian.bamboo.specs.api.builders.notification.Notification;
import com.atlassian.bamboo.specs.api.builders.plan.Job;
import com.atlassian.bamboo.specs.api.builders.plan.Plan;
import com.atlassian.bamboo.specs.api.builders.plan.Stage;
import com.atlassian.bamboo.specs.api.builders.plan.branches.BranchCleanup;
import com.atlassian.bamboo.specs.api.builders.plan.branches.PlanBranchManagement;
import com.atlassian.bamboo.specs.api.builders.project.Project;
import com.atlassian.bamboo.specs.api.builders.task.Task;
import com.atlassian.bamboo.specs.builders.notification.PlanCompletedNotification;
import com.atlassian.bamboo.specs.builders.trigger.ScheduledTrigger;
import com.atlassian.bamboo.specs.util.BambooServer;
import java.util.ArrayList;
/**
* Core master nightly test plan.
*/
@BambooSpec
public class NightlySpec extends AbstractCoreSpec {
private static String planName = "Core master nightly";
private static String planKey = "GTN";
private static int numberOfAcceptanceTestJobs = 8;
private static int numberOfFunctionalMysqlJobs = 6;
private static int numberOfFunctionalMssqlJobs = 16;
private static int numberOfFunctionalPgsqlJobs = 6;
private static int numberOfFunctionalSqliteJobs = 6;
private static int numberOfUnitRandomOrderJobs = 2;
private String[] phpVersions = {"PHP74"};
/**
* Run main to publish plan on Bamboo
*/
public static void main(final String[] args) throws Exception {
phpMinVersions.put("PHP74", "7.4.1");
// By default credentials are read from the '.credentials' file.
BambooServer bambooServer = new BambooServer(bambooServerName);
bambooServer.publish(new NightlySpec().createPlan());
bambooServer.publish(new NightlySpec().getDefaultPlanPermissions(projectKey, planKey));
}
/**
* Core master pre-merge plan is in "TYPO3 core" project of bamboo
*/
private Project project() {
return new Project().name(projectName)
.key(projectKey);
}
/**
* Returns full Plan definition
*/
Plan createPlan() {
ArrayList<Stage> stages = new ArrayList<>();
stages.add(getPreparationStage());
stages.add(getIntegrityStage());
stages.addAll(getUnitTestStages());
// Acceptance tests
stages.addAll(getCodeceptionMySqlStages());
stages.addAll(getCodeceptionSqLiteStages());
stages.addAll(getCodeceptionPgSqlStages());
// Functional tests
stages.addAll(getFunctionalMySqlStages());
stages.addAll(getFunctionalPGSqlStages());
stages.addAll(getFunctionalSqliteStages());
stages.addAll(getFunctionalMsSqlStages());
// Compile plan
return new Plan(project(), planName, planKey).description("Execute TYPO3 core master nightly tests. Auto generated! See Build/bamboo of core git repository.")
.pluginConfigurations(this.getDefaultPlanPluginConfiguration())
.stages(stages.toArray(new Stage[0]))
.linkedRepositories("github TYPO3 TYPO3.CMS")
.triggers(new ScheduledTrigger().name("Scheduled")
.description("once a day")
.cronExpression("0 0 3 ? * *"))
.variables(new Variable("changeUrl", ""), new Variable("patchset", ""))
.planBranchManagement(new PlanBranchManagement().delete(new BranchCleanup())
.notificationForCommitters())
.notifications(new Notification().type(new PlanCompletedNotification())
.recipients(new AnyNotificationRecipient(new AtlassianModule("com.atlassian.bamboo.plugins.bamboo-slack:recipient.slack")).recipientString("https://intercept.typo3.com/bamboo")));
}
/**
* functional tests executed with DBMS Sqlite
*/
private ArrayList<Stage> getFunctionalSqliteStages() {
ArrayList<Stage> stages = new ArrayList<>();
ArrayList<Job> jobs = new ArrayList<>();
// PHP 7.4, composer default
String phpVersion = "PHP74";
Task composerTask = getComposerTaskByStageNumber(phpVersion, COMPOSER_DEFAULT);
jobs.addAll(this.getJobsFunctionalTestsSqlite(COMPOSER_DEFAULT, numberOfFunctionalSqliteJobs, phpVersion, composerTask, false));
stages.add(new Stage("Functionals sqlite").jobs(jobs.toArray(new Job[0])));
return stages;
}
/**
* functional tests executed with DBMS PostgreSql
*/
private ArrayList<Stage> getFunctionalPGSqlStages() {
ArrayList<Stage> stages = new ArrayList<>();
ArrayList<Job> jobs = new ArrayList<>();
String phpVersion = "PHP74";
Task composerMinTask = getComposerTaskByStageNumber(phpVersion, COMPOSER_MIN);
jobs.addAll(this.getJobsFunctionalTestsPgsql(COMPOSER_MIN, numberOfFunctionalPgsqlJobs, phpVersion, composerMinTask, false));
Task composerMaxTask = getComposerTaskByStageNumber(phpVersion, COMPOSER_MAX);
jobs.addAll(this.getJobsFunctionalTestsPgsql(COMPOSER_MAX, numberOfFunctionalPgsqlJobs, phpVersion, composerMaxTask, false));
stages.add(new Stage("Functionals pgsql").jobs(jobs.toArray(new Job[0])));
return stages;
}
/**
* functional tests executed with DBMS MsSQL
*/
private ArrayList<Stage> getFunctionalMsSqlStages() {
ArrayList<Stage> stages = new ArrayList<>();
String phpVersion = "PHP74";
Task composerMinTask = getComposerTaskByStageNumber(phpVersion, COMPOSER_MIN);
ArrayList<Job> jobs = new ArrayList<>(this.getJobsFunctionalTestsMssqlWithDriverPdoSqlSrv(COMPOSER_MIN, numberOfFunctionalMssqlJobs, phpVersion, composerMinTask, false));
Task composerDefaultTask = getComposerTaskByStageNumber(phpVersion, COMPOSER_DEFAULT);
jobs.addAll(this.getJobsFunctionalTestsMssqlWithDriverSqlSrv(COMPOSER_DEFAULT, numberOfFunctionalMssqlJobs, phpVersion, composerDefaultTask, false));
Task composerMaxTask = getComposerTaskByStageNumber(phpVersion, COMPOSER_MAX);
jobs.addAll(this.getJobsFunctionalTestsMssqlWithDriverSqlSrv(COMPOSER_MAX, numberOfFunctionalMssqlJobs, phpVersion, composerMaxTask, false));
stages.add(new Stage("Functionals mssql").jobs(jobs.toArray(new Job[0])));
return stages;
}
/**
* functional tests executed with DBMS MySQL
*/
private ArrayList<Stage> getFunctionalMySqlStages() {
ArrayList<Stage> stages = new ArrayList<>();
ArrayList<Job> jobs = new ArrayList<>();
// PHP 7.4, composer min, pdo
String phpVersion = "PHP74";
Task composerJob = getComposerTaskByStageNumber(phpVersion, COMPOSER_MIN);
jobs.addAll(this.getJobsFunctionalTestsMysqlWithDriverPdoMysql(COMPOSER_MIN, numberOfFunctionalMysqlJobs, phpVersion, composerJob, false));
// PHP 7.4, composer default, mysqli
composerJob = getComposerTaskByStageNumber(phpVersion, COMPOSER_DEFAULT);
jobs.addAll(this.getJobsFunctionalTestsMysqlWithDriverMySqli(COMPOSER_DEFAULT, numberOfFunctionalMysqlJobs, phpVersion, composerJob, false));
// PHP 7.4, composer max, pdo
composerJob = getComposerTaskByStageNumber(phpVersion, COMPOSER_MAX);
jobs.addAll(this.getJobsFunctionalTestsMysqlWithDriverPdoMysql(COMPOSER_MAX, numberOfFunctionalMysqlJobs, phpVersion, composerJob, false));
stages.add(new Stage("Functionals mysql").jobs(jobs.toArray(new Job[0])));
return stages;
}
/**
* all tests run via codeception framework on MySql
*/
private ArrayList<Stage> getCodeceptionMySqlStages() {
ArrayList<Stage> stages = new ArrayList<>();
// install tests
String phpVersion = "PHP74";
ArrayList<Job> jobs = new ArrayList<>();
Task composerTask = getComposerTaskByStageNumber(phpVersion, COMPOSER_DEFAULT);
jobs.add(this.getJobAcceptanceTestInstallMysql(COMPOSER_DEFAULT, phpVersion, composerTask, false));
composerTask = getComposerTaskByStageNumber(phpVersion, COMPOSER_MAX);
jobs.add(this.getJobAcceptanceTestInstallMysql(COMPOSER_MAX, phpVersion, composerTask, false));
composerTask = getComposerTaskByStageNumber(phpVersion, COMPOSER_MIN);
jobs.add(this.getJobAcceptanceTestInstallMysql(COMPOSER_MIN, phpVersion, composerTask, false));
// regular tests, composer min
composerTask = getComposerTaskByStageNumber(phpVersion, COMPOSER_MIN);
jobs.addAll(this.getJobsAcceptanceTestsBackendMysql(COMPOSER_MIN, numberOfAcceptanceTestJobs, phpVersion, composerTask, false));
// regular tests, composer max
composerTask = getComposerTaskByStageNumber(phpVersion, COMPOSER_MAX);
jobs.addAll(this.getJobsAcceptanceTestsBackendMysql(COMPOSER_MAX, numberOfAcceptanceTestJobs, phpVersion, composerTask, false));
// regular tests, composer default
composerTask = getComposerTaskByStageNumber(phpVersion, COMPOSER_DEFAULT);
jobs.addAll(this.getJobsAcceptanceTestsBackendMysql(COMPOSER_DEFAULT, numberOfAcceptanceTestJobs, phpVersion, composerTask, false));
stages.add(new Stage("Acceptance mysql").jobs(jobs.toArray(new Job[0])));
return stages;
}
/**
* all tests run via codeception framework on SqLite
*/
private ArrayList<Stage> getCodeceptionSqLiteStages() {
ArrayList<Stage> stages = new ArrayList<>();
ArrayList<Job> jobs = new ArrayList<>();
String phpVersion = "PHP74";
Task composerTask = getComposerTaskByStageNumber(phpVersion, COMPOSER_MAX);
jobs.add(this.getJobAcceptanceTestInstallSqlite(COMPOSER_MAX, phpVersion, composerTask, false));
composerTask = getComposerTaskByStageNumber(phpVersion, COMPOSER_MIN);
jobs.add(this.getJobAcceptanceTestInstallSqlite(COMPOSER_MIN, phpVersion, composerTask, false));
composerTask = getComposerTaskByStageNumber(phpVersion, COMPOSER_DEFAULT);
jobs.add(this.getJobAcceptanceTestInstallSqlite(COMPOSER_DEFAULT, phpVersion, composerTask, false));
stages.add(new Stage("Acceptance sqlite").jobs(jobs.toArray(new Job[0])));
return stages;
}
/**
* all tests run via codeception framework on PostGreSql
*/
private ArrayList<Stage> getCodeceptionPgSqlStages() {
ArrayList<Stage> stages = new ArrayList<>();
ArrayList<Job> jobs = new ArrayList<>();
String phpVersion = "PHP74";
Task composerTask = getComposerTaskByStageNumber(phpVersion, COMPOSER_MIN);
jobs.add(this.getJobAcceptanceTestInstallPgsql(COMPOSER_MIN, phpVersion, composerTask, false));
composerTask = getComposerTaskByStageNumber(phpVersion, COMPOSER_DEFAULT);
jobs.add(this.getJobAcceptanceTestInstallPgsql(COMPOSER_DEFAULT, phpVersion, composerTask, false));
composerTask = getComposerTaskByStageNumber(phpVersion, COMPOSER_MAX);
jobs.add(this.getJobAcceptanceTestInstallPgsql(COMPOSER_MAX, phpVersion, composerTask, false));
stages.add(new Stage("Acceptance pgsql").jobs(jobs.toArray(new Job[0])));
return stages;
}
/**
* all unit tests, for all php versions and each with composer max and min install
*/
private ArrayList<Stage> getUnitTestStages() {
ArrayList<Stage> stages = new ArrayList<>();
for (String phpVersion : phpVersions) {
ArrayList<Job> jobs = new ArrayList<>();
for (int stageNumber = 0; stageNumber <= 2; stageNumber++) {
Task composerTask = getComposerTaskByStageNumber(phpVersion, stageNumber);
jobs.addAll(this.getJobUnitPhpRandom(stageNumber, numberOfUnitRandomOrderJobs, phpVersion, composerTask, false));
jobs.add(this.getJobUnitDeprecatedPhp(stageNumber, phpVersion, composerTask, false));
jobs.add(this.getJobUnitPhp(stageNumber, phpVersion, composerTask, false));
}
stages.add(new Stage("Unit Tests " + phpVersion).jobs(jobs.toArray(new Job[0])));
}
return stages;
}
/**
* integrity stage - various checks for code quality
* <p>
* this stage is independent of actual composer or php versions
*/
private Stage getIntegrityStage() {
String phpVersionForIntegrityStage = phpVersions[0]; // the version is not very important, just use one (except for linting!)
ArrayList<Job> jobs = new ArrayList<>();
jobs.add(this.getJobIntegrationAnnotations(phpVersionForIntegrityStage, this.getTaskComposerInstall(phpVersionForIntegrityStage), false));
jobs.add(this.getJobCglCheckFullCore(phpVersionForIntegrityStage, this.getTaskComposerInstall(phpVersionForIntegrityStage), false));
jobs.add(this.getJobIntegrationPhpStan(phpVersionForIntegrityStage, this.getTaskComposerInstall(phpVersionForIntegrityStage), false));
jobs.add(this.getJobIntegrationDocBlocks(phpVersionForIntegrityStage, this.getTaskComposerInstall(phpVersionForIntegrityStage), false));
jobs.add(this.getJobIntegrationVarious(phpVersionForIntegrityStage, this.getTaskComposerInstall(phpVersionForIntegrityStage), false));
jobs.add(this.getJobLintScssTs("JS", false));
jobs.add(this.getJobUnitJavaScript("JS", this.getTaskComposerInstall(phpVersionForIntegrityStage), false));
jobs.add(this.getJobComposerValidate(phpVersionForIntegrityStage, false));
for (String phpVersion : phpVersions) {
jobs.add(this.getJobLintPhp(phpVersion, false));
}
return new Stage("Integrity").jobs(jobs.toArray(new Job[0]));
}
/**
* preparation stage - this will only define labels for later communication of test results
*/
private Stage getPreparationStage() {
ArrayList<Job> jobs = new ArrayList<>();
jobs.add(this.getJobBuildLabels());
return new Stage("Preparation").jobs(jobs.toArray(new Job[0]));
}
}
package core;
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
import com.atlassian.bamboo.specs.api.BambooSpec;
import com.atlassian.bamboo.specs.api.builders.AtlassianModule;
import com.atlassian.bamboo.specs.api.builders.Variable;
import com.atlassian.bamboo.specs.api.builders.notification.AnyNotificationRecipient;
import com.atlassian.bamboo.specs.api.builders.notification.Notification;
import com.atlassian.bamboo.specs.api.builders.plan.Plan;
import com.atlassian.bamboo.specs.api.builders.plan.Stage;
import com.atlassian.bamboo.specs.api.builders.plan.branches.BranchCleanup;
import com.atlassian.bamboo.specs.api.builders.plan.branches.PlanBranchManagement;
import com.atlassian.bamboo.specs.api.builders.project.Project;
import com.atlassian.bamboo.specs.builders.notification.PlanCompletedNotification;
import com.atlassian.bamboo.specs.builders.trigger.RepositoryPollingTrigger;
import com.atlassian.bamboo.specs.util.BambooServer;
/**
* Core master pre-merge test plan.
*/
@BambooSpec
public class PreMergeSpec extends AbstractPreMergeSpec {
private static String planName = "Core master pre-merge";
private static String planKey = "GTC";
/**
* Run main to publish plan on Bamboo
*/
public static void main(final String[] args) throws Exception {
// By default credentials are read from the '.credentials' file.
BambooServer bambooServer = new BambooServer(bambooServerName);
bambooServer.publish(new PreMergeSpec().createPlan());
bambooServer.publish(new PreMergeSpec().getDefaultPlanPermissions(projectKey, planKey));
}
/**
* Returns full Plan definition
*/
Plan createPlan() {
this.isSecurity = false;
Stage stagePreparation = getPreparationStage();
Stage stageEarly = getEarlyStage();