version: v1.0 name: Docker Build agent: machine: type: e1-standard-2 os_image: ubuntu1804 blocks: - name: Build task: jobs: - name: 'Alpine' commands: - checkout - cd alpine - docker build --network=host -t catdeployed/postal:alpine . - docker save -o postal-alpine-container.tar catdeployed/postal:alpine - artifact push workflow postal-alpine-container.tar --expire-in 1d - name: 'Ubuntu' commands: - checkout - cd ubuntu - docker build --network=host -t catdeployed/postal:ubuntu . - docker save -o postal-ubuntu-container.tar catdeployed/postal:ubuntu - artifact push workflow postal-ubuntu-container.tar --expire-in 1d promotions: - name: Docker Image Testing pipeline_file: tests.yml auto_promote: when: result = 'passed'