From a4cbf5c82e236d0b8dd0f158f9da4ffbf627ecf1 Mon Sep 17 00:00:00 2001 From: CatDeployed Date: Tue, 24 Jul 2018 01:29:49 -0400 Subject: [PATCH 01/12] more testing --- alpine/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/alpine/Dockerfile b/alpine/Dockerfile index 3f67eaa..1877dd6 100644 --- a/alpine/Dockerfile +++ b/alpine/Dockerfile @@ -1,6 +1,6 @@ -FROM ruby:2.4-alpine +FROM ruby:2.5-alpine -RUN apk --no-cache add nodejs mariadb-client git bash python2 libcap py-setuptools py-pip build-base python-dev mariadb-dev tzdata \ +RUN apk --no-cache add nodejs mariadb-client git bash python2 libcap py-setuptools py-pip build-base python-dev mariadb-dev tzdata mariadb-client-libs \ && pip install j2cli \ && git clone https://github.com/atech/postal.git /opt/postal \ && rm -rf /var/lib/apt/lists/* \ @@ -11,7 +11,7 @@ RUN apk --no-cache add nodejs mariadb-client git bash python2 libcap py-setuptoo && adduser -S -G postal -h /opt/postal -s /bin/bash postal \ && chown -R postal:postal /opt/postal/ \ && /opt/postal/bin/postal bundle /opt/postal/vendor/bundle \ - && apk del mariadb-dev git \ + && apk del git mariadb-dev \ && rm -rf /var/cache/apk/* ## Adjust permissions From 3cbe855652b4aa3ca11e51dc07537b71b17bfe40 Mon Sep 17 00:00:00 2001 From: CatDeployed Date: Tue, 24 Jul 2018 01:48:06 -0400 Subject: [PATCH 02/12] more testing --- alpine/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alpine/Dockerfile b/alpine/Dockerfile index 1877dd6..9989f6a 100644 --- a/alpine/Dockerfile +++ b/alpine/Dockerfile @@ -1,6 +1,6 @@ FROM ruby:2.5-alpine -RUN apk --no-cache add nodejs mariadb-client git bash python2 libcap py-setuptools py-pip build-base python-dev mariadb-dev tzdata mariadb-client-libs \ +RUN apk --no-cache add nodejs mariadb-client git bash python2 libcap py-setuptools py-pip build-base mariadb-dev tzdata mariadb-client-libs \ && pip install j2cli \ && git clone https://github.com/atech/postal.git /opt/postal \ && rm -rf /var/lib/apt/lists/* \ From 7e07b59886e6aea610ed3214c72539fe5b732994 Mon Sep 17 00:00:00 2001 From: CatDeployed Date: Tue, 24 Jul 2018 02:10:05 -0400 Subject: [PATCH 03/12] update webhook --- .circleci/config.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 15e63c2..25d01c5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -56,3 +56,6 @@ workflows: jobs: - build-alpine - build-ubuntu +notify: + webhooks: + - url: https://hooks.microbadger.com/images/catdeployed/postal/K0vCLtQnFFKukT-LuAEBmGD0cHs= From 21991dbc75cce470e314a6cc408b8c81ab9d3239 Mon Sep 17 00:00:00 2001 From: CatDeployed Date: Sun, 29 Jul 2018 16:04:06 -0400 Subject: [PATCH 04/12] test build --- .circleci/config.yml | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 25d01c5..f21c31e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,18 +9,6 @@ jobs: - run: name: Build Postal Docker Container command: docker build -t catdeployed/postal:latest -t catdeployed/postal:alpine . - - run: - name: Skip this job for Pull Requests - command: '[[ -v CIRCLE_PR_NUMBER ]] && circleci step halt || true' - - run: - name: Login to Docker Hub - command: docker login -u $DOCKER_USER -p $DOCKER_PASS - - run: - name: Push to Docker Hub - command: docker push catdeployed/postal:latest - - run: - name: Push to Docker Hub - command: docker push catdeployed/postal:alpine build-ubuntu: machine: true working_directory: ~/repo/ubuntu @@ -30,15 +18,26 @@ jobs: - run: name: Build Postal Docker Container command: docker build -t catdeployed/postal:ubuntu . - - run: - name: Skip this job for Pull Requests - command: '[[ -v CIRCLE_PR_NUMBER ]] && circleci step halt || true' + deploy: + machine: true + working_directory: ~/repo/ubuntu + steps: - run: name: Login to Docker Hub command: docker login -u $DOCKER_USER -p $DOCKER_PASS - run: name: Push to Docker Hub command: docker push catdeployed/postal:ubuntu + - run: + name: Push to Docker Hub + command: docker push catdeployed/postal:alpine + - run: + name: Login to Docker Hub + command: docker push catdeployed/postal:ubuntu + push-alpine: + machine: true + working_directory: ~/repo/ubuntu + steps: workflows: version: 2 nightly: @@ -49,9 +48,19 @@ workflows: branches: only: - master + - dev jobs: - build-alpine - build-ubuntu + - deploy: + requires: + - build-alpine + - build-ubuntu + filters: + branches: + only: + - master + - dev commit: jobs: - build-alpine From 4ea63a2c3b395a7c289ee973462f6e4510401b84 Mon Sep 17 00:00:00 2001 From: CatDeployed Date: Sun, 29 Jul 2018 16:06:50 -0400 Subject: [PATCH 05/12] test build --- .circleci/config.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f21c31e..9de7434 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -34,10 +34,6 @@ jobs: - run: name: Login to Docker Hub command: docker push catdeployed/postal:ubuntu - push-alpine: - machine: true - working_directory: ~/repo/ubuntu - steps: workflows: version: 2 nightly: From 175bbd6335d7fb46645a07105cef3638a9aac7eb Mon Sep 17 00:00:00 2001 From: CatDeployed Date: Sun, 29 Jul 2018 16:18:39 -0400 Subject: [PATCH 06/12] test build --- .circleci/config.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9de7434..9e2a883 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -61,6 +61,15 @@ workflows: jobs: - build-alpine - build-ubuntu + - deploy: + requires: + - build-alpine + - build-ubuntu + filters: + branches: + only: + - master + - dev notify: webhooks: - url: https://hooks.microbadger.com/images/catdeployed/postal/K0vCLtQnFFKukT-LuAEBmGD0cHs= From f8a61838ae026f1f9447490cc72e4f6b3709e4aa Mon Sep 17 00:00:00 2001 From: CatDeployed Date: Sun, 29 Jul 2018 16:31:48 -0400 Subject: [PATCH 07/12] test build --- .circleci/config.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9e2a883..69bd7a3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,6 +9,13 @@ jobs: - run: name: Build Postal Docker Container command: docker build -t catdeployed/postal:latest -t catdeployed/postal:alpine . + - run: + name: Export Container + command: mkdir workspace && cd workspace && docker save --output postal_alpine.tar catdeployed/postal:alpine + - persist_to_workspace: + root: workspace + paths: + - postal_alpine.tar build-ubuntu: machine: true working_directory: ~/repo/ubuntu From 76403acf7ca10361089e0e314429ef25fd4baa53 Mon Sep 17 00:00:00 2001 From: CatDeployed Date: Sun, 29 Jul 2018 16:35:54 -0400 Subject: [PATCH 08/12] test build --- .circleci/config.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 69bd7a3..ace3e18 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -25,6 +25,13 @@ jobs: - run: name: Build Postal Docker Container command: docker build -t catdeployed/postal:ubuntu . + - run: + name: Export Container + command: mkdir workspace && cd workspace && docker save --output postal_alpine.tar catdeployed/postal:ubuntu + - persist_to_workspace: + root: workspace + paths: + - postal_ubuntu.tar deploy: machine: true working_directory: ~/repo/ubuntu From 328ec34dbd16dba664368e5a3607a341870cf7f7 Mon Sep 17 00:00:00 2001 From: CatDeployed Date: Sun, 29 Jul 2018 16:40:03 -0400 Subject: [PATCH 09/12] test build --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ace3e18..39930ce 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -27,7 +27,7 @@ jobs: command: docker build -t catdeployed/postal:ubuntu . - run: name: Export Container - command: mkdir workspace && cd workspace && docker save --output postal_alpine.tar catdeployed/postal:ubuntu + command: mkdir workspace && cd workspace && docker save --output postal_ubuntu.tar catdeployed/postal:ubuntu - persist_to_workspace: root: workspace paths: From 7a3908d13c7df03d06c4bc43d7af07e05a9d95dc Mon Sep 17 00:00:00 2001 From: CatDeployed Date: Sun, 29 Jul 2018 16:49:58 -0400 Subject: [PATCH 10/12] test build --- .circleci/config.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 39930ce..85ed5cb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -36,6 +36,14 @@ jobs: machine: true working_directory: ~/repo/ubuntu steps: + - attach_workspace: + at: /tmp/workspace + - run: + name: Load Alpine Image + command: docker load --input /tmp/workspace/postal_alpine.tar + - run: + name: Load Ubuntu Image + command: docker load --input /tmp/workspace/postal_ubuntu.tar - run: name: Login to Docker Hub command: docker login -u $DOCKER_USER -p $DOCKER_PASS From 91ed1ab0bcf4ceda5cfd8b38a2e13a3769bd5a1b Mon Sep 17 00:00:00 2001 From: CatDeployed Date: Sun, 29 Jul 2018 16:56:55 -0400 Subject: [PATCH 11/12] test build --- .circleci/config.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 85ed5cb..41b82aa 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -48,14 +48,11 @@ jobs: name: Login to Docker Hub command: docker login -u $DOCKER_USER -p $DOCKER_PASS - run: - name: Push to Docker Hub + name: Push Ubuntu Container to Docker Hub command: docker push catdeployed/postal:ubuntu - run: - name: Push to Docker Hub + name: Push Postal Container to Docker Hub command: docker push catdeployed/postal:alpine - - run: - name: Login to Docker Hub - command: docker push catdeployed/postal:ubuntu workflows: version: 2 nightly: From 069c5544e947d78f1ab9b8730c5b1b7759d851f1 Mon Sep 17 00:00:00 2001 From: CatDeployed Date: Sun, 29 Jul 2018 20:53:00 -0400 Subject: [PATCH 12/12] add latest tag --- .circleci/config.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 41b82aa..9e7a76a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -44,6 +44,9 @@ jobs: - run: name: Load Ubuntu Image command: docker load --input /tmp/workspace/postal_ubuntu.tar + - run: + name: Tag alpine image as latest + command: docker tag catdeployed/postal:alpine catdeployed/postal:latest - run: name: Login to Docker Hub command: docker login -u $DOCKER_USER -p $DOCKER_PASS @@ -51,8 +54,11 @@ jobs: name: Push Ubuntu Container to Docker Hub command: docker push catdeployed/postal:ubuntu - run: - name: Push Postal Container to Docker Hub + name: Push Alpine Container to Docker Hub command: docker push catdeployed/postal:alpine + - run: + name: Push Latest Container to Docker Hub + command: docker push catdeployed/postal:latest workflows: version: 2 nightly: