Closed robbinscpcg closed 4 years ago
Yes, $CODEBUILD_SRC_DIR
is the directory from which the provided buildspec file is searched for. I can confirm that option two works, but you will need to specify the path with the keyword buildSpecFile
like so: buildSpecFile: '../SOURCE2/buildspec-build.yml'
(see the pipeline syntax helper for the awsCodeBuild step). Let me know if that works for you.
No recent updates. Resolving.
Is there a correct way to specify the buildspec path when using multiple sources? I have two sources, SOURCE1 and SOURCE2. SOURCE1 contains the application code; SOURCE2 contains my buildspec file. I've tried setting buildspec in my Jenkins pipeline with no success, as shown in the examples below - is there a correct way to set buildspec when using multiple sources? It appears that CodeBuild places you in the source directory of the first source specified; can you confirm that?
BuildSpec Attempts
buildspec: '../buildspec-build.yml'
buildspec: '../SOURCE2/buildspec-build.yml'
buildspec: '../SOURCE2_jenkins/buildspec-build.yml'
buildspec: '$CODEBUILD_SRC_DIR_jenkins/buildspec-build.yml'
Error shown below.