mirror of
https://github.com/Icinga/docker-icinga2.git
synced 2026-05-05 10:56:12 +02:00
action.bash: outsource compiling into compile.bash
This commit is contained in:
parent
f192d78f19
commit
2231c2c7f8
@ -1,5 +1,5 @@
|
||||
FROM icinga/icinga2-builder
|
||||
|
||||
COPY action.bash Dockerfile /
|
||||
COPY action.bash compile.bash Dockerfile /
|
||||
|
||||
CMD ["/action.bash"]
|
||||
|
||||
18
action.bash
18
action.bash
@ -15,26 +15,10 @@ mkimg () {
|
||||
node /actions/checkout/dist/index.js |grep -vFe ::add-matcher::
|
||||
cache restore
|
||||
|
||||
export PATH="/usr/lib/ccache:$PATH"
|
||||
mkdir -p ccache
|
||||
ln -vs "$(pwd)/ccache" ~/.ccache
|
||||
|
||||
mkdir icinga2-bin
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_SYSCONFDIR=/etc \
|
||||
-DCMAKE_INSTALL_LOCALSTATEDIR=/var -DICINGA2_RUNDIR=/run \
|
||||
-DICINGA2_SYSCONFIGFILE=/etc/sysconfig/icinga2 -DICINGA2_WITH_{COMPAT,LIVESTATUS}=OFF ..
|
||||
|
||||
make
|
||||
make test
|
||||
|
||||
make install "DESTDIR=$(pwd)/../icinga2-bin"
|
||||
|
||||
cd ..
|
||||
|
||||
rm icinga2-bin/etc/icinga2/features-enabled/mainlog.conf
|
||||
/compile.bash
|
||||
|
||||
cache save
|
||||
docker build -f /Dockerfile -t "${TARGET}:$TAG" .
|
||||
|
||||
21
compile.bash
Executable file
21
compile.bash
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
set -exo pipefail
|
||||
|
||||
export PATH="/usr/lib/ccache:$PATH"
|
||||
|
||||
mkdir icinga2-bin
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_SYSCONFDIR=/etc \
|
||||
-DCMAKE_INSTALL_LOCALSTATEDIR=/var -DICINGA2_RUNDIR=/run \
|
||||
-DICINGA2_SYSCONFIGFILE=/etc/sysconfig/icinga2 -DICINGA2_WITH_{COMPAT,LIVESTATUS}=OFF ..
|
||||
|
||||
make
|
||||
make test
|
||||
|
||||
make install "DESTDIR=$(pwd)/../icinga2-bin"
|
||||
|
||||
cd ..
|
||||
|
||||
rm icinga2-bin/etc/icinga2/features-enabled/mainlog.conf
|
||||
Loading…
x
Reference in New Issue
Block a user