pespin has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/37292?usp=email )
Change subject: asterisk-master: Fetch required branch directly ......................................................................
asterisk-master: Fetch required branch directly
When I added the Dockerfile I initially wrote it in a 2 step fetch & build, to try to avoid recompiling the whole thing every time some patch from one of the devs was pushed to our building branch. This, whoever, creates problems sometimes due to how the build system for pjproject is generated when building asterisk, so let's drop the 2stage setup to avoid problems fetching from different branches, etc.
Change-Id: Id9fbee9cdb8f9387e0daefd7925df2542d384a91 --- M asterisk-master/Dockerfile 1 file changed, 20 insertions(+), 12 deletions(-)
Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve osmith: Looks good to me, approved
diff --git a/asterisk-master/Dockerfile b/asterisk-master/Dockerfile index 8e508e4..8ddbaa0 100644 --- a/asterisk-master/Dockerfile +++ b/asterisk-master/Dockerfile @@ -60,10 +60,13 @@
# clone asterisk ARG ASTERISK_REMOTE=https://gitea.sysmocom.de/sysmocom/asterisk.git +ARG ASTERISK_BRANCH=sysmocom/master RUN git clone $ASTERISK_REMOTE
+ADD https://gitea.sysmocom.de/api/v1/repos/sysmocom/asterisk/git/refs/heads/$AST... /tmp/asterisk-ver + RUN cd asterisk && \ - git fetch && git checkout -f -B sysmocom/master origin/sysmocom/master + git fetch && git checkout -f -B $ASTERISK_BRANCH origin/$ASTERISK_BRANCH
# Use pjproject from git repo above instead of downloading tar.gz: RUN cd asterisk/third-party/pjproject && \ @@ -72,17 +75,6 @@ RUN cd asterisk && \ ./bootstrap.sh && \ ./configure && \ - make "-j$(nproc)" - -ARG ASTERISK_BRANCH=sysmocom/master - -ADD https://gitea.sysmocom.de/api/v1/repos/sysmocom/asterisk/git/refs/heads/$AST... /tmp/asterisk-ver - -# update the source code (if needed) -RUN cd asterisk && \ - git fetch && git checkout -B $ASTERISK_BRANCH origin/$ASTERISK_BRANCH - -RUN cd asterisk && \ make "-j$(nproc)" && \ make install && \ make samples && \