forked from sddj/MISP-dockerized-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
88 lines (81 loc) · 3.49 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
language: minimal
dist: xenial
addons:
apt:
sources:
- docker-xenial
env:
global:
#- DOCKER_COMPOSE_VERSION=1.4.2
- COMPONENT=server
matrix:
# Activate only Supported and Nightly Images.
#- VERSION=2.4.nightly FOLDER=$VERSION-ubuntu TAG="$FOLDER-dev"
#- VERSION=2.4.nightly FOLDER=$VERSION-debian TAG="$FOLDER-dev" ADD_TAG="latest-dev"
#- VERSION=2.4.88 FOLDER=$VERSION-ubuntu TAG="$FOLDER-dev"
#- VERSION=2.4.89 FOLDER=$VERSION-ubuntu TAG="$FOLDER-dev"
#- VERSION=2.4.90 FOLDER=$VERSION-ubuntu TAG="$FOLDER-dev"
#- VERSION=2.4.91 FOLDER=$VERSION-ubuntu TAG="$FOLDER-dev"
#- VERSION=2.4.92 FOLDER=$VERSION-ubuntu TAG="$FOLDER-dev"
#- VERSION=2.4.93 FOLDER=$VERSION-ubuntu TAG="$FOLDER-dev"
#- VERSION=2.4.94 FOLDER=$VERSION-ubuntu TAG="$FOLDER-dev"
#- VERSION=2.4.95 FOLDER=$VERSION-ubuntu TAG="$FOLDER-dev"
#- VERSION=2.4.96 FOLDER=$VERSION-ubuntu TAG="$FOLDER-dev"
#- VERSION=2.4.97 FOLDER=$VERSION-debian TAG="$FOLDER-dev"
#- VERSION=2.4.98 FOLDER=$VERSION-debian TAG="$FOLDER-dev"
#- VERSION=2.4.99 FOLDER=$VERSION-debian TAG="$FOLDER-dev"
#- VERSION=2.4.100 FOLDER=$VERSION-debian TAG="$FOLDER-dev"
#- VERSION=2.4.101 FOLDER=$VERSION-debian TAG="$FOLDER-dev"
#- VERSION=2.4.102 FOLDER=$VERSION-debian TAG="$FOLDER-dev"
#- VERSION=2.4.103 FOLDER=$VERSION-debian TAG="$FOLDER-dev"
#- VERSION=2.4.104 FOLDER=$VERSION-debian TAG="$FOLDER-dev"
#- VERSION=2.4.105 FOLDER=$VERSION-debian TAG="$FOLDER-dev"
#- VERSION=2.4.106 FOLDER=$VERSION-debian TAG="$FOLDER-dev"
#- VERSION=2.4.107 FOLDER=$VERSION-debian TAG="$FOLDER-dev"
#- VERSION=2.4.108 FOLDER=$VERSION-debian TAG="$FOLDER-dev"
#- VERSION=2.4.109 FOLDER=$VERSION-debian TAG="$FOLDER-dev"
#- VERSION=2.4.110 FOLDER=$VERSION-debian TAG="$FOLDER-dev"
#- VERSION=2.4.111 FOLDER=$VERSION-debian TAG="$FOLDER-dev"
### Supported
# - VERSION=2.4.112 FOLDER=$VERSION-debian TAG="$FOLDER-dev"
# - VERSION=2.4.113 FOLDER=$VERSION-debian TAG="$FOLDER-dev"
# - VERSION=2.4.114 FOLDER=$VERSION-debian TAG="$FOLDER-dev"
# - VERSION=2.4.115 FOLDER=$VERSION-debian TAG="$FOLDER-dev"
# - VERSION=2.4.116 FOLDER=$VERSION-debian TAG="$FOLDER-dev"
# - VERSION=2.4.117 FOLDER=$VERSION-debian TAG="$FOLDER-dev"
- VERSION=2.4.123 FOLDER=$VERSION-ubuntu TAG="$FOLDER-dev"
- VERSION=2.4.124 FOLDER=$VERSION-ubuntu TAG="$FOLDER-dev"
- VERSION=2.4.125 FOLDER=$VERSION-ubuntu TAG="$FOLDER-dev"
before_install:
# Pull Kaniko Image
- docker pull gcr.io/kaniko-project/executor:latest
# Login to hub.docker.com
- echo "$DOCKER_PASSWORD" | docker login -u $DOCKER_USERNAME --password-stdin
install:
# Add docker-retag executable
- wget -q https://github.com/joshdk/docker-retag/releases/download/0.0.2/docker-retag && chmod +x docker-retag
# Add env variables for docker-retag
- export DOCKER_USER=$DOCKER_USERNAME
- export DOCKER_PASS=$DOCKER_PASSWORD
script:
# Build Image via kaniko
- docker run
-v "$TRAVIS_BUILD_DIR/$FOLDER":/workspace
-v $HOME/.docker:/kaniko/.docker
gcr.io/kaniko-project/executor:latest
--context=/workspace
--build-arg VCS_REF=$TRAVIS_COMMIT
--build-arg VERSION=$VERSION
--build-arg GIT_REPO=https://github.com/$TRAVIS_REPO_SLUG
--build-arg COMPONENT=$COMPONENT
--build-arg BUILD_DATE=$(date -u +"%Y-%m-%d")
--verbosity=info
--destination=$DOCKER_SLUG/misp-dockerized-$COMPONENT:$TAG
# Retag images for other tags
- for i in $ADD_TAG;
do
./docker-retag $DOCKER_SLUG/misp-dockerized-$COMPONENT:$TAG $i;
done
# # don't notify me when things fail
# notifications:
# email: false