in aws-codedeploy-agent/src/main/java/jetbrains/buildServer/runner/codedeploy/ApplicationRevision.java [93:109]
private File getCustomAppSpecYmlFile() throws CodeDeployRunner.CodeDeployRunnerException {
if (StringUtil.isEmptyOrSpaces(myCustomAppSpec)) return null;
if (myCustomAppSpec.endsWith(CodeDeployConstants.APPSPEC_YML)) {
return FileUtil.resolvePath(myBaseDir, myCustomAppSpec);
}
final File customAppSpecYml = new File(myTempDir, CodeDeployConstants.APPSPEC_YML);
if (!customAppSpecYml.isFile()) {
try {
FileUtil.writeFile(customAppSpecYml, "" + myCustomAppSpec, "UTF-8");
} catch (IOException e) {
throw new CodeDeployRunner.CodeDeployRunnerException("Failed to write custom " + CodeDeployConstants.APPSPEC_YML, e);
}
}
return customAppSpecYml;
}