diff --git a/Jenkinsfile b/Jenkinsfile index d93cfd225..08a9e40fa 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -53,7 +53,29 @@ pipeline { } } - + stage ('Docker Image Build'){ + steps { + echo "Push Docker Image to ECR" + script { + sh 'rm -f ~/.dockercfg~/.docker/config.json || true' + docker.withRegistry("http://${ECR_REPOSITORY}", "ecr"${REGION}:${AWS_CREDENTIAL_NAME}") { + docker.image("${ECR_DOCKER_IMAGE}:latest").push() + } + } + } + stage('Clean Up Docker Images on Jenkins Server'){ + steps { + echo 'Cleaning up unused Docker images on Jenkins server' + sh "docker image prune -f --all --filter \"nutil=1h\"" + } + } + stage('Upload to S3'){ + + } + stage('Codedeploy Workload'){ + + } + } }