diff --git a/buildspec.yaml b/buildspec.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ea4831959994894543b4c03f0258ed259ddf143e --- /dev/null +++ b/buildspec.yaml @@ -0,0 +1,26 @@ +version: 0.2 + +env: + variables: + IMAGE_TAG: "latest" + IMAGE_REPO_NAME: "recolic/rserver-status" + parameter-store: + DOCKER_PSWD: "recolic_docker_pswd" + +phases: + pre_build: + commands: + - echo Logging in to Docker Hub... + - docker login -u recolic -p "$DOCKER_PSWD" + # Type the command to log in to your Docker Hub account here. + build: + commands: + - echo Build started on `date` + - echo Building the Docker image... + - docker build -t $IMAGE_REPO_NAME:$IMAGE_TAG . + - docker tag $IMAGE_REPO_NAME:$IMAGE_TAG $IMAGE_REPO_NAME:$IMAGE_TAG + post_build: + commands: + - echo Build completed on `date` + - echo Pushing the Docker image... + - docker push $IMAGE_REPO_NAME:$IMAGE_TAG