Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

PJL-2986: Create repo if it does not exist #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,14 @@ node {
stepsForParallel["Postgres ${version}"] = {
stage("Postgres ${version}"){
def ver = "${version}".replace(".", "")
// Pull the latest image so we have a record of the sha
sh "docker pull 723151894364.dkr.ecr.us-east-1.amazonaws.com/postgres${ver}:latest || true"

sh "docker build -t '723151894364.dkr.ecr.us-east-1.amazonaws.com/postgres${ver}' ${version}/"
if (env.BRANCH_NAME == 'master') {
//# Try to create the repository so the push doesn't fail
sh "aws ecr create-repository --repository-name postgres${ver} || true"

sh "docker push 723151894364.dkr.ecr.us-east-1.amazonaws.com/postgres${ver}:latest"
}
}
Expand Down