I'm scanning the Bamboo Specs file from local Bitbucket Server.
The scan succeeds with no error, but no project/plan is created.
My Specs File :
imports ...
@BambooSpec
@BambooSpec
public class PlanSpecs {
public Plan plan() {
final Plan plan = new Plan(new Project()
.oid(new BambooOid("tkkii3pbhero"))
.key(new BambooKey("TS"))
.name("testSpecProj")
.description("Project to test Bamboo Spec"),
"testSpecPlan",
new BambooKey("TS"))
.oid(new BambooOid("tkataic3nmdg"))
.description("Plan to test Bamboo Spec")
.pluginConfigurations(new ConcurrentBuilds())
.stages(new Stage("Default Stage")
.jobs(new Job("Default Job",
new BambooKey("JOB1"))
.tasks(new VcsCheckoutTask()
.description("Checkout Default Repository")
.checkoutItems(new CheckoutItem()
.repository(new VcsRepositoryIdentifier()
.name("tWeb2"))),
new AnyTask(new AtlassianModule("org.swift.bamboo.groovy:gradle"))
.description("Build")
.configuration(new MapBuilder()
.put("projectFile", "")
.put("scriptLocationTypes", "")
.put("scriptLocation", "FILE")
.put("scriptBody", "")
.put("label", "gradle")
.put("testChecked", "")
.put("targets", "build")
.put("script", "")
.put("testDirectoryOption", "standardTestDirectory")
.put("environmentVariables", "")
.put("testResultsDirectory", "**/*reports/*.xml,**/*results/*.xml")
.put("buildJdk", "JDK 1.8")
.put("arguments", "")
.put("workingSubDirectory", "")
.build()),
new AnyTask(new AtlassianModule("org.jfrog.bamboo.bamboo-artifactory-plugin:artifactoryGenericTask"))
.description("artifactory")
.configuration(new MapBuilder()
.put("artifactory.generic.publishBuildInfo", "true")
.put("bintrayConfiguration", "")
.put("bintray.licenses", "")
.put("bintray.repository", "")
.put("artifactory.generic.username", "admin")
.put("artifactory.generic.specSourceChoice", "jobConfiguration")
.put("artifactory.generic.resolveRepo", "")
.put("artifactory.generic.deployPattern", "")
.put("artifactory.generic.envVarsExcludePatterns", "*password*,*secret*,*security*,*key*")
.put("bintray.signMethod", "false")
.put("builder.artifactoryGenericBuilder.artifactoryServerId", "0")
.put("bintray.subject", "")
.put("artifactory.generic.file", "")
.put("artifactory.generic.useSpecsChoice", "specs")
.put("bintray.packageName", "")
.put("artifactory.generic.includeEnvVars", "")
.put("artifactory.generic.artifactSpecs", "")
.put("artifactory.generic.password", "password")
.put("bintray.mavenSync", "")
.put("artifactory.generic.jobConfiguration", "{\n \"files\": [\n {\n \"pattern\": \"**/*.war\",\n \"target\": \"example-repo-local\"\n }\n ]\n}")
.put("baseUrl", "http://192.168.252.1:8085")
.put("artifactory.generic.envVarsIncludePatterns", "")
.put("artifactory.generic.resolvePattern", "")
.put("bintray.vcsUrl", "")
.put("builder.artifactoryGenericBuilder.deployableRepo", "")
.put("bintray.gpgPassphrase", "/* SENSITIVE INFORMATION */")
.build()),
new AnyTask(new AtlassianModule("com.atlassian.bamboo.plugins.tomcat.bamboo-tomcat-plugin:deployAppTask"))
.description("deploy")
.configuration(new MapBuilder()
.put("appVersion", "")
.put("tomcatUrl", "http://localhost:8088/manager")
.put("warFilePath", "build\\libs\\testWeb-1.0-SNAPSHOT.war")
.put("tomcatUsername", "bamboo")
.put("deploymentTag", "")
.put("encTomcatPassword", "YCW7Iv5C7yA=")
.put("appContext", "/testSpec")
.put("tomcat6", "")
.build()))))
.planRepositories(new GitHubRepository()
.name("tWeb2")
.oid(new BambooOid("tkeyyc2c5j4b"))
.repositoryViewer(new GitHubRepositoryViewer())
.repository("parthjeet/testWebApp")
.branch("master")
.authentication(new UserPasswordAuthentication("parthjeet")
.password("BAMSCRT@0@0@iOQ8jDtwPEP5tT7ZGrMrFg=="))
.changeDetection(new VcsChangeDetection()))
.triggers(new RepositoryPollingTrigger())
.planBranchManagement(new PlanBranchManagement()
.delete(new BranchCleanup())
.notificationForCommitters())
.forceStopHungBuilds();
return plan;
}
public PlanPermissions planPermission() {
final PlanPermissions planPermission = new PlanPermissions(new PlanIdentifier("TS", "TS"))
.permissions(new Permissions()
.userPermissions("admin", PermissionType.EDIT, PermissionType.VIEW, PermissionType.ADMIN, PermissionType.CLONE, PermissionType.BUILD)
.loggedInUserPermissions(PermissionType.VIEW)
.anonymousUserPermissionView());
return planPermission;
}
public static void main(String... argv) {
Yml yml = new Yml();
BambooServer bambooServer = new BambooServer("http://192.168.252.1:8085");
final PlanSpecs planSpecs = new PlanSpecs();
final Plan plan = planSpecs.plan();
bambooServer.publish(plan);
final PlanPermissions planPermission = planSpecs.planPermission();
bambooServer.publish(planPermission);
}
}
Bamboo Spec Log:
Content of pom.xml used: <?xml version="1.0" encoding="UTF-8" standalone="no"?><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"> <!--Edit template at BAMBOO_INSTALL/atlassian-bamboo/WEB-INF/classes/bamboo-specs-pom.xml--> <modelVersion>4.0.0</modelVersion> <parent> <groupId>com.atlassian.bamboo</groupId> <artifactId>bamboo-specs-parent</artifactId> <version>6.8.0</version> <relativePath/> </parent> <artifactId>bamboo-specs-generator</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> <!-- Test dependencies --> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.yaml</groupId> <artifactId>snakeyaml</artifactId> <version>1.23</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <compilerArgs> <compilerArg>-proc:none</compilerArg> </compilerArgs> </configuration> </plugin> </plugins> </build> </project> [INFO] Error stacktraces are turned on. [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building bamboo-specs-generator 1.0.0 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] >>> bamboo-specs-runner:6.8.0:run (default-cli) > package @ bamboo-specs-generator >>> [INFO] [INFO] --- maven-resources-plugin:2.6:copy-resources (copy-license) @ bamboo-specs-generator --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 0 resource [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ bamboo-specs-generator --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory C:\Users\ParthJeet\bamboo-home\xml-data\build-dir\serverSide\REPOSITORY_STORED_SPECS\repository-1867780\checkout\bamboo-specs\src\main\resources [INFO] [INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ bamboo-specs-generator --- [INFO] No sources to compile [INFO] [INFO] --- maven-enforcer-plugin:3.0.0-M1:enforce (enforce-build-environment) @ bamboo-specs-generator --- [INFO] Skipping Rule Enforcement. [INFO] [INFO] --- maven-enforcer-plugin:3.0.0-M1:enforce (ban-milestones-and-release-candidates) @ bamboo-specs-generator --- [INFO] Skipping Rule Enforcement. [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ bamboo-specs-generator --- [INFO] Not copying test resources [INFO] [INFO] --- maven-compiler-plugin:3.7.0:testCompile (default-testCompile) @ bamboo-specs-generator --- [INFO] Not compiling test sources [INFO] [INFO] --- maven-surefire-plugin:2.20:test (default-test) @ bamboo-specs-generator --- [INFO] Tests are skipped. [INFO] [INFO] --- maven-jar-plugin:3.0.2:jar (default-jar) @ bamboo-specs-generator --- [INFO] Building jar: C:\Users\ParthJeet\bamboo-home\xml-data\build-dir\serverSide\REPOSITORY_STORED_SPECS\repository-1867780\checkout\bamboo-specs\target\bamboo-specs-generator-1.0.0.jar [INFO] [INFO] <<< bamboo-specs-runner:6.8.0:run (default-cli) < package @ bamboo-specs-generator <<< [INFO] [INFO] [INFO] --- bamboo-specs-runner:6.8.0:run (default-cli) @ bamboo-specs-generator --- [INFO] Scanning C:\Users\ParthJeet\bamboo-home\xml-data\build-dir\serverSide\REPOSITORY_STORED_SPECS\repository-1867780\checkout\bamboo-specs\target\classes for classes annotated with Bamboo plan annotation. [INFO] Updating ownership of files in C:\Users\ParthJeet\bamboo-home\xml-data\build-dir\serverSide\REPOSITORY_STORED_SPECS\repository-1867780\internal-yamls to BUILTIN\Administrators (Alias) [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.749 s [INFO] Finished at: 2019-03-07T18:25:05+05:30 [INFO] Final Memory: 15M/208M [INFO] ------------------------------------------------------------------------
Hi @Parth Jeet
I see there is an ongoing investigation open by you in our support system. I think that is the best channel when a deeper investigation is needed.
If you don't mind, please share the resolution when you have it, so we can help other users that might face the same issue.
Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.