This repository has been archived by the owner on Mar 22, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
/
.travis.yml
38 lines (38 loc) · 2.16 KB
/
.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
31
32
33
34
35
36
37
38
dist: xenial
language: ruby
services:
- docker
env:
global:
- ICINGA2_VERSION=$(./hooks/latest-version.sh)
- BUILD_DATE=$(date +"%Y-%m-%d")
- BUILD_IMAGE=bodsch/docker-icinga2:${ICINGA2_VERSION}-base
- secure: cnuQOWTh8TImJWlxcSJRzOfxkZYndXU60iuXVGI54EEyLStxwRRETKBWS2gADwOhsdUY105YyWEwSA0uTTERolBX6mXtDBJSxzVfW+sOE36pCISv/L/EZhK6pDxfsl9Q72GmdcSIT5DVXblTjIBvN1Jh+Jdymao/QoFC3g7JAwossXCi8WXdPL9uZeNWunFM6i28bgtv/6hMJ4kp2ga65ZvvzxbrrY/9yVZjjLAYWOidAZ77LnzvV3TP5KE7LwpfipkVyCG+w4JKnop5/wFO8c/BcYwEF4fdEdbWh+40nJAsfUJXMAPVjTvdQgwpysneMU5oHGMos09wjm4EUce3Yifm6iCMtKcEZ0svCdeY8/r2t5Voyu1e+1Hk7/X1XhwUg3t5H4MlkUN5I0TMkbFMGklfJ5e3VX+OQjHCTrLUqtjHkGBE2/HlgONgB0dNS2Atmtntvvhm5N6FJbM2Sjx47EzSGwlVee2yXXQ7MGHqW129Ykk6ETBUFSOV7x2HyGPd/tWf4ZCm7D1lrCueEjmFyDv8t+VjsAQrDEq/QCnJ7C2sWjQw06q+bYg5kYMSE7eSqF8uPoHqEOW7M5bOnN8eLcbhMVh7jRkbizxabrQ7sh+mvh1zOTmSGDZWROaH2GfoBlPsConMRYfbkEfO1ljtQXVUuBGHHEpB+cC4PEor6Qg=
jobs:
include:
- stage: build and publish base image
script:
- make base-build
- docker login --username "${DOCKER_USERNAME}" --password "${DOCKER_PASSWORD}"
- make publish-base
- docker logout
- stage: push latest docker image
if: branch = master
script:
- make
- docker login --username "${DOCKER_USERNAME}" --password "${DOCKER_PASSWORD}"
- docker tag ${USER}/icinga2:latest-master ${DOCKER_USERNAME}/docker-icinga2:latest-master
- docker tag ${USER}/icinga2:latest-satellite ${DOCKER_USERNAME}/docker-icinga2:latest-satellite
- docker push ${DOCKER_USERNAME}/docker-icinga2:latest-master
- docker push ${DOCKER_USERNAME}/docker-icinga2:latest-satellite
- docker logout
- stage: push version docker image
if: branch = master
script:
- make
- docker login --username "${DOCKER_USERNAME}" --password "${DOCKER_PASSWORD}"
- docker tag ${USER}/icinga2:latest-master ${DOCKER_USERNAME}/docker-icinga2:${ICINGA2_VERSION}-master
- docker tag ${USER}/icinga2:latest-satellite ${DOCKER_USERNAME}/docker-icinga2:${ICINGA2_VERSION}-satellite
- docker push ${DOCKER_USERNAME}/docker-icinga2:${ICINGA2_VERSION}-master
- docker push ${DOCKER_USERNAME}/docker-icinga2:${ICINGA2_VERSION}-satellite
- docker logout