Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Commit

Permalink
do not run inherit if no build or build-late
Browse files Browse the repository at this point in the history
  • Loading branch information
n0rad committed Apr 12, 2016
1 parent baf2408 commit 2d7001c
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
7 changes: 4 additions & 3 deletions aci-builder/files/dgr/builder/stage2/builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ fi

echo "ce9d63a98a8b4438882fd795e294cd50" > /etc/machine-id

mkdir -p /dgr/builder/runlevels
mkdir -p /dgr/builder/attributes

# save envs
export | grep -v -E " SHLV=| ROOTFS=| TARGET= | ACI_PATH= | ACI_HOME= | ACI_EXEC=" > /dgr/builder/export

Expand Down Expand Up @@ -65,8 +67,7 @@ if [ -d ${ACI_HOME}/runlevels/inherit-build-early ]; then
fi

# build runlevel
if [ -d ${ACI_HOME}/runlevels/build ] || [ -d ${ROOTFS}/dgr/runlevels/inherit-build-early ]; then
mkdir -p /dgr/builder/runlevels
if [ -d ${ACI_HOME}/runlevels/build ] || [ -d ${ACI_HOME}/runlevels/build-late ]; then
if [ -d ${ACI_HOME}/runlevels/build ]; then
cp -Rf ${ACI_HOME}/runlevels/build /dgr/builder/runlevels
fi
Expand Down Expand Up @@ -105,7 +106,7 @@ fi


# build-late runlevel
if [ -d ${ACI_HOME}/runlevels/build-late ] || [ -d ${ROOTFS}/dgr/runlevels/inherit-build-late ]; then
if [ -d ${ACI_HOME}/runlevels/build ] || [ -d ${ACI_HOME}/runlevels/build-late ]; then
if [ -d ${ACI_HOME}/runlevels/build-late ]; then
cp -Rf ${ACI_HOME}/runlevels/build-late /dgr/builder/runlevels
fi
Expand Down
2 changes: 2 additions & 0 deletions aci-builder/files/dgr/command/build
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ execute_files "/dgr/runlevels/inherit-build-early" || onError "Inherit-build-ear
/dgr/bin/prestart
execute_files "/dgr/runlevels/inherit-build-late" || onError "Inherit-build-late"

echo_green "\nBuilder is ready\n"

export ACI_HOME="/dgr/aci-home"
/dgr/builder/stage2/builder.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/dgr/bin/busybox sh
set -x
set -e
. /dgr/bin/functions.sh
isLevelEnabled "debug" && set -x

cat > /etc/apt/sources.list.d/cassandra.list<<EOF
deb http://ftp.fr.debian.org/debian/ sid main non-free contrib # needed for java8
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/dgr/bin/busybox sh
set -e
. /dgr/bin/functions.sh
isLevelEnabled "debug" && set -x

export CASSANDRA_VERSION=`dpkg -s cassandra | grep 'Version: ' | cut -d' ' -f 2`
echo -e "default:\n version: ${CASSANDRA_VERSION}" > /dgr/builder/attributes/version.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash
set -x
#!/dgr/bin/busybox sh
set -e
. /dgr/bin/functions.sh
isLevelEnabled "debug" && set -x

cat > /dgr/attributes/aci-cassandra/prestart.yml <<EOF
default:
Expand Down

0 comments on commit 2d7001c

Please sign in to comment.