diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 5008ddf..0000000 Binary files a/.DS_Store and /dev/null differ diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index f3aeb19..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,135 +0,0 @@ -version: 2 -jobs: - build-alpine: - machine: true - working_directory: ~/repo/alpine - steps: - - checkout: - path: ~/repo - - run: - name: Build Postal Docker Container - command: docker build --network=host -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 - steps: - - checkout: - path: ~/repo - - run: - name: Build Postal Docker Container - command: docker build --network=host -t catdeployed/postal:ubuntu . - - run: - name: Export Container - command: mkdir workspace && cd workspace && docker save --output postal_ubuntu.tar catdeployed/postal:ubuntu - - persist_to_workspace: - root: workspace - paths: - - postal_ubuntu.tar - deploy: - 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: 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 - - run: - name: Push Ubuntu Container to Docker Hub - command: docker push catdeployed/postal:ubuntu - - run: - 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 - deploy-dev: - 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: Rename Alpine Image Tag - command: docker tag catdeployed/postal:alpine catdeployed/postal:alpine-dev - - run: - name: Rename Ubuntu Image Tag - command: docker tag catdeployed/postal:ubuntu catdeployed/postal:ubuntu-dev - - run: - name: Tag alpine image as latest - command: docker tag catdeployed/postal:alpine catdeployed/postal:latest-dev - - run: - name: Login to Docker Hub - command: docker login -u $DOCKER_USER -p $DOCKER_PASS - - run: - name: Push Ubuntu Container to Docker Hub - command: docker push catdeployed/postal:ubuntu-dev - - run: - name: Push Alpine Container to Docker Hub - command: docker push catdeployed/postal:alpine-dev - - run: - name: Push Latest Container to Docker Hub - command: docker push catdeployed/postal:latest-dev -workflows: - version: 2 - nightly: - triggers: - - schedule: - cron: "0 * * * *" - filters: - branches: - only: - - master - jobs: - - build-alpine - - build-ubuntu - - deploy: - requires: - - build-alpine - - build-ubuntu - filters: - branches: - only: - - master - commit: - jobs: - - build-alpine - - build-ubuntu - - deploy: - requires: - - build-alpine - - build-ubuntu - filters: - branches: - only: - - master - - deploy-dev: - requires: - - build-alpine - - build-ubuntu - filters: - branches: - only: - - dev diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9dff660..6569229 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,6 +5,7 @@ before_script: stages: - build - tests + - upload build-docker-alpine: stage: build @@ -50,18 +51,18 @@ test-docker-alpine: - cd alpine - docker-compose rm -sfv -#upload-images: -# stage: upload -# script: -# - docker load -i ubuntu/postal-ubuntu-container.tar -# - docker load -i alpine/postal-alpine-container.tar -# - docker tag catdeployed/postal:alpine catdeployed/postal:latest -# - docker login -u$DOCKER_USER -p$DOCKER_PASS -# - docker push catdeployed/postal:alpine -# - docker push catdeployed/postal:ubuntu -# - docker push catdeployed/postal:latest -# only: -# - master@CatDeployed/docker-postal +upload-images: + stage: upload + script: + - docker load -i ubuntu/postal-ubuntu-container.tar + - docker load -i alpine/postal-alpine-container.tar + - docker tag catdeployed/postal:alpine catdeployed/postal:latest + - docker login -u$DOCKER_USER -p$DOCKER_PASS + - docker push catdeployed/postal:alpine + - docker push catdeployed/postal:ubuntu + - docker push catdeployed/postal:latest + only: + - master@CatDeployed/docker-postal after_script: - docker container prune -f - docker image prune -f diff --git a/alpine/data/.gitkeep b/alpine/data/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/ubuntu/data/.gitkeep b/ubuntu/data/.gitkeep deleted file mode 100644 index e69de29..0000000