Skip to content

Commit

Permalink
build/linux: properly set build args
Browse files Browse the repository at this point in the history
  • Loading branch information
Hellslicer committed Oct 25, 2019
1 parent 72cf543 commit 01c41e2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ env:

script:
- git submodule update --init
- curl -O -L https://github.com/grammarly/rocker/releases/download/1.3.0/rocker_linux_amd64.tar.gz
- curl -O -L https://github.com/Hellslicer/rocker/releases/download/1.3.4/rocker_linux_amd64.tar.gz
- tar xvf rocker_linux_amd64.tar.gz
- cd code/
- 'if [ -z "$TRAVIS_TAG" ]; then ../rocker build --build-arg JOB_SLOTS=$(nproc); fi'
Expand Down
15 changes: 4 additions & 11 deletions code/Rockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,15 @@
# environment variables workaround
FROM alpine:3.8
ARG CI_BRANCH
ARG CI_BUILD_NUMBER
ARG JOB_SLOTS
MOUNT ..:/src
RUN echo 'export CI_BRANCH='$CI_BRANCH > /src/.env
RUN echo 'export CI_BUILD_NUMBER='$CI_BUILD_NUMBER >> /src/.env
RUN echo 'export JOB_SLOTS='$JOB_SLOTS >> /src/.env

# build system resources
FROM mcr.microsoft.com/dotnet/core/sdk:2.2-alpine3.9
MOUNT ..:/src
RUN cd /src/ext/system-resources/ && /bin/sh build.sh

# build server
FROM alpine:3.8
ARG CI_BRANCH
ARG CI_BUILD_NUMBER
ARG JOB_SLOTS
MOUNT ..:/src
RUN source /src/.env && /bin/sh /src/code/tools/ci/build_server_2.sh
RUN /bin/sh /src/code/tools/ci/build_server_2.sh
RUN mkdir -p /opt/cfx-server/citizen/system_resources/
RUN cp -a /src/ext/system-resources/data/* /opt/cfx-server/citizen/system_resources/
ENV LD_LIBRARY_PATH /usr/lib/v8/:/lib:/usr/lib/
Expand Down

0 comments on commit 01c41e2

Please sign in to comment.