-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Low
-
Affects Version/s: 8.2.3
-
Component/s: Bamboo Specs
-
None
-
1
-
Severity 3 - Minor
Issue Summary
Bamboo Specs export with multiline Dockerfile produces invalid Java
This is reproducible on Data Center: yes
Steps to Reproduce
- Add a Docker task of type Build to your build plan
- Add a multiline Dockerfile such as:
FROM node:12-alpine RUN apk add --no-cache python2 g++ make
- Plan Configuration >> Actions >> Export as Java Specs
Expected Results
Java generated is valid
Actual Results
The Java generated is invalid, it contains a multiline string:
new DockerBuildImageTask() .imageName("asdsadas") .useCache(true) .dockerfile("FROM node:12.18.1 RUN apk add --no-cache python2 g++ make"),
This causes compilation errors when publishing:
[ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] /Users/user/stored-spec/bamboo-specs/src/main/java/tutorial/PlanSpec.java:[47,49] unclosed string literal
Workaround
Manually change the Java Spec after exporting it to use newline characters E.g.
.dockerfile("FROM node:12.18.1\nRUN apk add --no-cache python2 g++ make"),