From 77b686a048c2f8cf28a1ca9524cb3de5ec5a6ff9 Mon Sep 17 00:00:00 2001 From: Dave Casavant Date: Wed, 12 Jun 2019 11:36:01 -0700 Subject: [PATCH] Add travis build and DockerHub push (#24) Update .travis.yml to build and push to DockerHub --- .travis.yml | 23 +++++++++++++++++++++-- Makefile | 14 ++++++++++++++ build.sh | 3 --- 3 files changed, 35 insertions(+), 5 deletions(-) create mode 100644 Makefile delete mode 100755 build.sh diff --git a/.travis.yml b/.travis.yml index 2bf37d3a..b0d030ff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,25 @@ services: - docker -script: - - docker build -t pegasystems/pega-ready . +env: + global: + - secure: "eumCrUvnKXEJd+6bV6WB03O4H1CSUB2wcTFIXL8liYrDJgU4690gTX+N85xZvo3Fjb4XeIEfjmhuxzO9XiypPdqM/Q2o06ryTWnxOdIGtnAMLClRqsJKwjZXxT2L5YfDaHZgzTQDiT7GuxtHfVsGU4vnpUpA2+UR+zQR2M9itkdwI6msZww9zyy+i+s5HLhOCWiyc0sFQrMTeJhu5d3SiqfF5QMEGlkO3IzYQR+r1QGNgaMeZgAiqArS/uLfJ0AubDrtChXc7IVP7RERa5RIa+PeHrCQEWPn92G0cLj3wozpTyti8saurPMkWVu3FQ7YquFFRVrb8BB7sDUG7M9lsHu4wVrajUWebG235uCcyMd8d6i3WgCg/reBdEY05p7lwH0T7noFfUTC2Cz5hLvzd18kgMSf5H58stUzlkKQ73lqosbOZBHW5jIy35qcmoe9UVcBrUl9mvRToahD5xDyjndaZBVGIyxlu0DdkZOnfvPztIkSxFsymzjy5RX4cqU1g5PA8Xfbck1DtOxnlpKm28tengMqqSP/I4C00IoUK2kQODiMrK0gJoZ5MO4anKM8Eda3Hnzh10ZPRq6EaZqb2TCuNduKOVWxqopst9Ros0+JsDy1evN+Xu+XdZhcR2We42YI+c05K0wYEmqxRlEHImG8d5BahHNGoJ8AfUICaNE=" + - secure: "Pu8tfrmmWAnQYmgZ9fmiosVj22XeoZ6mSwSKe3knjmLQYC8A/9VJSFjpZn11dqUQokhZMbgbTYthp4c4/JW7cy8nGWykg7a/osiWqNAuPYiJl+oUmPJcxW0Enagq8p5+RNbFfeND4GyX5ZdBi0xRaGh2CgUbmVYxbaSfq0Sbkfzgl4HkF8uqBPkjdfQLBJ/kAe5prXkAAAyu58LYvPNjpMoOSlOS+c7F+XNokMLzlsL+sKE/CC2l6tLjDslxLX5CzW8jA1vBkqhThAO0Fe5UYv+6AqDBfsYBro01bgmfMR9F/IwBkOH3eFcs/icm5BOeYaQ2It5YEhbSW1CY8U/iFmKkpKWe5q8Jw4fgRPB4QTcVu/M0ffvWtlaTwCV0T9kE93imfQidfrRSTbnDnZwunxpn3Ymx8OAhEzeLndq56wq0ShIJTkh65mtkHVf+75dQ6F4nHwB+RkhHT6ggGWGUNcYOkMb+UQq4bzpGmQNJC9zdFtqOp1EcB5WnlOrDxbyxJ8yrYNvKvJ8+wi1K+Z/RZvRCCE+P2AJQc2mMlgKelP7WUPnhcNRTEyMa6Q6L0EklluVRR3b4N7nbpqlwU+lYU2pyJ764ULNXJJfk7CmC3dhI3PBQ/BreFYNNd7TujrNK53T41VAYfHxhIoz8lwsHT/fOIKAKE7LLqXvbR3Tp+wo=" + +install: + - make image - docker images + +script: + - docker run -d -p 8080:8080 --name pega-ready pegasystems/pega-ready + - docker ps + +before_deploy: + - docker login -u="$DOCKER_USER" -p="$DOCKER_PASS" + +deploy: + provider: script + script: make push + on: + repo: pegasystems/docker-pega-web-ready + branch: master diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..37735044 --- /dev/null +++ b/Makefile @@ -0,0 +1,14 @@ +TAG = "2.0.0" +PREFIX = $(shell git config --get remote.origin.url | tr ':.' '/' | rev | cut -d '/' -f 3 | rev) +REPO_NAME = "pega-ready" + +all: image + +container: image + +image: + docker build -t $(PREFIX)/$(REPO_NAME) . # Build new image and automatically tag it as latest + docker tag $(PREFIX)/$(REPO_NAME) $(PREFIX)/$(REPO_NAME):$(TAG) # Add the version tag to the latest image + +push: image + docker push $(PREFIX)/$(REPO_NAME) diff --git a/build.sh b/build.sh deleted file mode 100755 index 36bf5ea2..00000000 --- a/build.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -docker build -t pegasystems/docker-pega-web-ready .