-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.build.yml
99 lines (93 loc) · 3.62 KB
/
docker-compose.build.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
89
90
91
92
93
94
95
96
97
98
99
version: '3'
services:
pkgtools:
image: untangleinc/${PKGTOOLS_REPOSITORY:-pkgtools}
environment:
PKGTOOLS_URL: ${PKGTOOLS_URL:-https://github.com/untangle/ngfw_pkgtools}
PKGTOOLS_COMMIT: ${PKGTOOLS_COMMIT:-origin/master}
volumes:
- pkgtools:/opt/untangle/ngfw_pkgtools
entrypoint: >
bash -c "
git remote set-url origin $${PKGTOOLS_URL} &&
git fetch -a &&
git clean -f -d -x &&
git reset --hard &&
git checkout $${PKGTOOLS_COMMIT} || true"
img_modifier_checkout:
image: untangleinc/ngfw:img-modifier
environment:
IMG_MODIFIER_URL: ${IMG_MODIFIER_URL:-git@github.com:untangle/ngfw_hades-pkgs}
IMG_MODIFIER_COMMIT: ${IMG_MODIFIER_COMMIT:-origin/master}
SSH_KEY: ${SSH_KEY} # defaults to empty: "no key"
volumes:
- img_modifier:/opt/untangle/img_modifier
- ${SSH_KEY}:${SSH_KEY}
entrypoint: >
bash -c "
export GIT_SSH_COMMAND='ssh -i '$${SSH_KEY} &&
[ -d .git ] || git clone $${IMG_MODIFIER_URL} . &&
git remote set-url origin $${IMG_MODIFIER_URL} &&
git fetch -a &&
git clean -f -d -x &&
git reset --hard &&
git clean -f -d -x &&
git reset --hard &&
git checkout $${IMG_MODIFIER_COMMIT}"
img_modifier_apply:
image: untangleinc/ngfw:img-modifier
environment:
IMG_MODIFIER_VENDOR: ${IMG_MODIFIER_VENDOR:-untangle}
volumes:
- img_modifier:/opt/untangle/img_modifier:ro
- .:/opt/untangle/build
entrypoint: >
bash -c "
declare -x IMG_MODIFIER_DIR=/opt/untangle/img_modifier/untangle-oem-$${IMG_MODIFIER_VENDOR}/ngfw_imgtools &&
if [ -d $${IMG_MODIFIER_DIR} ] ; then
echo $${IMG_MODIFIER_DIR} && rsync -aHvP --no-owner --no-group $${IMG_MODIFIER_DIR}/* /opt/untangle/build/
fi"
build_clean:
image: untangleinc/ngfw:${REPOSITORY:-bullseye}-build-multiarch
volumes:
- .:/opt/untangle/build
entrypoint: >
bash -c "
git clean -f -d -x && git reset --hard;
pwd"
build:
image: untangleinc/ngfw:${REPOSITORY:-bullseye}-build-multiarch
environment:
REPOSITORY: ${REPOSITORY:-bullseye}
DISTRIBUTION: ${DISTRIBUTION} # # defaults to empty: let pkgtools do the right thing
ARCHITECTURE: ${ARCHITECTURE} # defaults to empty: build.sh will use host arch
VERBOSE: ${VERBOSE} # defaults to empty: "not verbose"
PACKAGE: ${PACKAGE} # defaults to empty: "all packages"
DEBUG: ${DEBUG} # defaults to empty: "no debugging"
SSH_KEY: ${SSH_KEY} # defaults to empty: "no key"
NO_CLEAN: ${NO_CLEAN} # defaults to empty: "do clean"
# empty: "no upload" (default)
# scp: use scp method for dput
# ftp: use ftp method for dput
UPLOAD: ${UPLOAD}
# empty: "do not force the build when that version is already
# present on the target mirror (default)"
FORCE: ${FORCE}
VERSION: ${VERSION}
TRAVIS_BRANCH: ${TRAVIS_BRANCH:-master}
TRAVIS_PULL_REQUEST_BRANCH:
TRAVIS_REPO_SLUG:
SERIAL: ${SERIAL}
REGION: ${REGION}
privileged: ${PRIVILEGED:-false}
extra_hosts:
# from the outside, pass package-server's outside IP instead
- "package-server:${PACKAGE_SERVER_IP:-52.2.228.218}"
volumes:
- .:/opt/untangle/build
- pkgtools:/opt/untangle/ngfw_pkgtools:ro
- /tmp/travis-buildbot.rsa:/tmp/travis-buildbot.rsa
- /etc/apt/apt.conf.d/01proxy:/etc/apt/apt.conf.d/01proxy
volumes:
pkgtools:
img_modifier: