Hello,
I have a question regarding application properties.
Successfully set up a CodePipeline that pulls content of a repository from github, builds the java app with CodeBuild and deploys it on Elastic Beanstalk.
Would like to modify the build and include an extra step to replace the application.properties file before creating the jar.
Would like to specify this step in the buildspec.yml that currently looks like this:
pre_build:
commands:
- echo "Copying application.properties to CodeBuild..."
- cp -f /root/xyz-api/config/application.properties ./src/main/resources/
build:
commands:
- mvn test
post_build:
commands:
- mvn package
Unfortunately the pre_build phase fails. Where can we store the application.properties file to be accessible by CodeBuild (so the pre_build would swap the file before running maven test and package?) We are planning to have a separate application.properties file for dev and prod environments.
Bw,
Ian