1
0
mirror of https://github.com/lineageos4microg/docker-lineage-cicd synced 2024-11-09 10:09:56 +01:00

Rename OUT_DIR to ZIP_DIR

It was confusing the build system which was placing any output file inside the final output directory
This commit is contained in:
Julian Xhokaxhiu 2017-01-21 23:59:02 +01:00
parent 702b3689c8
commit b655ad3fe6
3 changed files with 11 additions and 11 deletions

@ -6,7 +6,7 @@ MAINTAINER Julian Xhokaxhiu <info at julianxhokaxhiu dot com>
ENV SRC_DIR /srv/src
ENV CCACHE_DIR /srv/ccache
ENV OUT_DIR /srv/out
ENV ZIP_DIR /srv/zips
ENV LMANIFEST_DIR /srv/local_manifests
# Configurable environment variables
@ -59,7 +59,7 @@ ENV ANDROID_JACK_VM_ARGS "-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G"
VOLUME $SRC_DIR
VOLUME $CCACHE_DIR
VOLUME $OUT_DIR
VOLUME $ZIP_DIR
VOLUME $LMANIFEST_DIR
# Copy required files and fix permissions
@ -72,7 +72,7 @@ COPY src/* /root/
RUN mkdir -p $SRC_DIR
RUN mkdir -p $CCACHE_DIR
RUN mkdir -p $OUT_DIR
RUN mkdir -p $ZIP_DIR
RUN mkdir -p $LMANIFEST_DIR
# Set the work directory

@ -18,7 +18,7 @@ Because I'm a big fan of isolating everything if possible. I don't want to reins
## How it works
This docker will autobuild any device list given for a specified branch every midnight at 02:00 UTC. In the end, any built ZIP will be moved to the relative volume mapped directory to `/srv/out`.
This docker will autobuild any device list given for a specified branch every midnight at 02:00 UTC. In the end, any built ZIP will be moved to the relative volume mapped directory to `/srv/zips`.
> **IMPORTANT:** Remember to use VOLUME mapping. By default Docker creates container with max 10GB of Space. If you will not map volumes, the docker will just break during Source syncronization!
@ -39,7 +39,7 @@ docker run \
-e "DEVICE_LIST=hammerhead" \
-v "/home/user/ccache:/srv/ccache" \
-v "/home/user/source:/srv/src" \
-v "/home/user/zips:/srv/out" \
-v "/home/user/zips:/srv/zips" \
julianxhokaxhiu/docker-lineage-cicd
```
@ -55,7 +55,7 @@ docker run \
-e "DEVICE_LIST=hammerhead,bullhead" \
-v "/home/user/ccache:/srv/ccache" \
-v "/home/user/source:/srv/src" \
-v "/home/user/zips:/srv/out" \
-v "/home/user/zips:/srv/zips" \
julianxhokaxhiu/docker-lineage-cicd
```
@ -72,7 +72,7 @@ docker run \
-e "OTA_URL=http://cool.domain/api" \
-v "/home/user/ccache:/srv/ccache" \
-v "/home/user/source:/srv/src" \
-v "/home/user/zips:/srv/out" \
-v "/home/user/zips:/srv/zips" \
-v "/home/user/local_manifests:/srv/local_manifests" \
julianxhokaxhiu/docker-lineage-cicd
```

@ -38,8 +38,8 @@ if ! [ -z "$DEVICE_LIST" ]; then
# If requested, clean the OUT dir in order to avoid clutter
if [ "$CLEAN_OUTDIR" = true ]; then
echo ">> [$(date)] Cleaning '$OUT_DIR'"
rm -Rf "$OUT_DIR/*"
echo ">> [$(date)] Cleaning '$ZIP_DIR'"
rm -Rf "$ZIP_DIR/*"
fi
# Prepare the environment
@ -60,9 +60,9 @@ if ! [ -z "$DEVICE_LIST" ]; then
echo ">> [$(date)] Starting build for $codename"
if brunch $codename 2>&1 >&$OUTPUT; then
# Move produced ZIP files to the main OUT directory
echo "[$(date)] Moving build artifacts for $codename to '$OUT_DIR'"
echo "[$(date)] Moving build artifacts for $codename to '$ZIP_DIR'"
cd $SRC_DIR
find out/target/product/$codename -name '*UNOFFICIAL*.zip*' -exec mv {} $OUT_DIR \;
find out/target/product/$codename -name '*UNOFFICIAL*.zip*' -exec mv {} $ZIP_DIR \;
# Clean everything, in order to start fresh on next build
if [ "$CLEAN_AFTER_BUILD" = true ]; then