cypress job update
This commit is contained in:
parent
cbd6573870
commit
566e2ac3e5
@ -107,26 +107,26 @@ public class PlanSpec {
|
|||||||
|
|
||||||
public Plan createCypressTestPlan() {
|
public Plan createCypressTestPlan() {
|
||||||
|
|
||||||
return new Plan(project(), "redaction-ui-tests", new BambooKey("REDCYPRESS"))
|
return new Plan(project(), "redaction-ui-tests", new BambooKey("UI-TESTS"))
|
||||||
.description("Cypress UI tests for redaction-ui.")
|
.description("Cypress UI tests for redaction-ui.")
|
||||||
.stages(new Stage("UI Test Stage").jobs(createCypressJob("cypress")))
|
.stages(new Stage("UI Test Stage").jobs(createCypressJob()))
|
||||||
.linkedRepositories("RED / ui").triggers(new BitbucketServerTrigger()).planBranchManagement(
|
.linkedRepositories("RED / ui").triggers(new BitbucketServerTrigger()).planBranchManagement(
|
||||||
new PlanBranchManagement().createForVcsBranch()
|
new PlanBranchManagement().createForVcsBranch()
|
||||||
.delete(new BranchCleanup().whenInactiveInRepositoryAfterDays(30)).notificationForCommitters());
|
.delete(new BranchCleanup().whenInactiveInRepositoryAfterDays(30)).notificationForCommitters());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private Job createCypressJob(String project) {
|
private Job createCypressJob() {
|
||||||
return new Job("Cypress Job: " + project, new BambooKey(project.toUpperCase().replaceAll("-", ""))).tasks(
|
return new Job("Cypress UI Tests Job", new BambooKey("UI-TESTS-CYPRESS")).tasks(
|
||||||
new VcsCheckoutTask().description("Checkout Default Repository")
|
new VcsCheckoutTask().description("Checkout Default Repository")
|
||||||
.checkoutItems(new CheckoutItem().defaultRepository()),
|
.checkoutItems(new CheckoutItem().defaultRepository()),
|
||||||
|
|
||||||
new ScriptTask().description("Build").inlineBody(
|
new ScriptTask().description("Build").inlineBody(
|
||||||
"#!/bin/bash\n" + "set -e\n" + "imageName=\"nexus.iqser.com:5001/red/ui-" + project + "\"\n"
|
"#!/bin/bash\n" + "set -e\n" + "imageName=\"nexus.iqser.com:5001/red/ui-cypress\"\n"
|
||||||
+ "dockerfileLocation=\"build/docker/" + project + "/Dockerfile\"\n"
|
+ "dockerfileLocation=\"build/docker/cypress/Dockerfile\"\n"
|
||||||
+ "docker build -t ${imageName}:latest -f ${dockerfileLocation} .\n"),
|
+ "docker build -t ${imageName}:latest -f ${dockerfileLocation} .\n"),
|
||||||
new ScriptTask().description("Run Tests").inlineBody(
|
new ScriptTask().description("Run Tests").inlineBody(
|
||||||
"#!/bin/bash\n" + "set -e\n" + "imageName=\"nexus.iqser.com:5001/red/ui-" + project + "\"\n"
|
"#!/bin/bash\n" + "set -e\n" + "imageName=\"nexus.iqser.com:5001/red/ui-cypress\"\n"
|
||||||
+ "docker run -v $PWD:/e2e -w /e2e ${imageName}:latest\n" + "sleep 10")
|
+ "docker run -v $PWD:/e2e -w /e2e ${imageName}:latest\n" + "sleep 10")
|
||||||
// for some reason disk isn't synced in real-time from docker
|
// for some reason disk isn't synced in real-time from docker
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user