Jenkins Build and ECR Push
Before getting started
Docker Build & Push with Jenkins
1. Include a Dockerfile in the service's source code
Dockerfile in the service's source code2. Configure the jenkins server to be able to access ECR
jenkins server to be able to access ECR3. Create a deployment Job for the service in jenkins, and set the Job to build a new image using the pre-included Dockerfile when executed
jenkins, and set the Job to build a new image using the pre-included Dockerfile when executed4. Build a new docker image on the jenkins server and then push the image to ECR
jenkins server and then push the image to ECR5. Finally, on the test server, pull the new image from ECR, delete the existing container, and create a new container
Configure Jenkins job example
ex1) Discard old builds
ex2) Invoke Gradle script
ex3) Execute shell
ex4) Post-build Actions
Last updated