-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
30 lines (27 loc) · 910 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
sudo: required
services:
- docker
env:
global:
- REPO_NAME=hugomcfonseca/rundeck-alpine
- VERSION=2.10.8
before_script:
- docker pull "$REPO_NAME" || true
script:
- docker build --pull --cache-from "$REPO_NAME" --target=basic --tag "$REPO_NAME:$VERSION-basic" .
- docker build --pull --cache-from "$REPO_NAME" --target=templated --tag "$REPO_NAME:$VERSION-templated" .
- docker build --pull --cache-from "$REPO_NAME" --target=production --tag "$REPO_NAME:$VERSION" .
after_script:
- docker images
before_deploy:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker tag "$REPO_NAME:$VERSION" "$REPO_NAME:latest"
deploy:
provider: script
script:
docker push ${REPO_NAME}:$VERSION-basic;
docker push ${REPO_NAME}:$VERSION-templated;
docker push ${REPO_NAME}:$VERSION;
docker push ${REPO_NAME}:latest
on:
branch: master