34 lines
1.2 KiB
YAML
34 lines
1.2 KiB
YAML
version: v1.0
|
|
name: Docker Image Upload
|
|
agent:
|
|
machine:
|
|
type: e1-standard-2
|
|
os_image: ubuntu1804
|
|
global_job_config:
|
|
secrets:
|
|
- name: DOCKER_HUB_CATDEPLOYED
|
|
blocks:
|
|
- name: Upload
|
|
task:
|
|
jobs:
|
|
- name: 'Alpine Upload'
|
|
commands:
|
|
- checkout
|
|
- cd alpine
|
|
- artifact pull workflow postal-alpine-container.tar
|
|
- docker load -i postal-alpine-container.tar
|
|
- echo "$DOCKER_HUB_CATDEPLOYED_PASS" | docker login --username "$DOCKER_HUB_CATDEPLOYED_USER" --password-stdin
|
|
- docker tag catdeployed/postal:alpine catdeployed/postal:latest
|
|
- docker push catdeployed/postal:alpine
|
|
- docker push catdeployed/postal:latest
|
|
- artifact yank workflow postal-alpine-container.tar
|
|
- name: 'Ubuntu Upload'
|
|
commands:
|
|
- checkout
|
|
- cd ubuntu
|
|
- artifact pull workflow postal-ubuntu-container.tar
|
|
- docker load -i postal-ubuntu-container.tar
|
|
- echo "$DOCKER_HUB_CATDEPLOYED_PASS" | docker login --username "$DOCKER_HUB_CATDEPLOYED_USER" --password-stdin
|
|
- docker push catdeployed/postal:ubuntu
|
|
- artifact yank workflow postal-ubuntu-container.tar
|