-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dockerfile, Jenkinsfile: testing based on Jenkinsfile
- Loading branch information
Everett Hildenbrandt
committed
Jan 29, 2019
1 parent
1b518a9
commit b2eb346
Showing
2 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
FROM ubuntu:bionic | ||
|
||
ENV TZ=America/Chicago | ||
RUN ln --symbolic --no-dereference --force /usr/share/zoneinfo/$TZ /etc/localtime \ | ||
&& echo $TZ > /etc/timezone | ||
|
||
RUN apt update && apt upgrade --yes | ||
|
||
RUN apt install --yes \ | ||
autoconf curl flex gcc libffi-dev libmpfr-dev libtool make maven \ | ||
opam openjdk-8-jdk pandoc pkg-config python3 python-pygments \ | ||
python-recommonmark python-sphinx time zlib1g-dev | ||
|
||
RUN update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java | ||
|
||
RUN curl -sSL https://get.haskellstack.org/ | sh | ||
|
||
RUN git clone 'https://github.com/z3prover/z3' --branch=z3-4.6.0 \ | ||
&& cd z3 \ | ||
&& python scripts/mk_make.py \ | ||
&& cd build \ | ||
&& make -j8 \ | ||
&& make install \ | ||
&& cd ../.. \ | ||
&& rm -rf z3 | ||
|
||
ARG USER_ID=1000 | ||
ARG GROUP_ID=1000 | ||
RUN groupadd --gid $GROUP_ID user \ | ||
&& useradd --create-home --uid $USER_ID --shell /bin/sh --gid user user | ||
|
||
USER $USER_ID:$GROUP_ID | ||
|
||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain 1.28.0 | ||
|
||
ADD .build/k/k-distribution/src/main/scripts/bin/k-configure-opam-dev .build/k/k-distribution/src/main/scripts/bin/k-configure-opam-common /home/user/.tmp-opam/bin/ | ||
ADD .build/k/k-distribution/src/main/scripts/lib/opam /home/user/.tmp-opam/lib/opam/ | ||
RUN cd /home/user \ | ||
&& ./.tmp-opam/bin/k-configure-opam-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
pipeline { | ||
agent { | ||
dockerfile { | ||
additionalBuildArgs '--build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g)' | ||
} | ||
} | ||
stages { | ||
stage("Init title") { | ||
when { changeRequest() } | ||
steps { | ||
script { | ||
currentBuild.displayName = "PR ${env.CHANGE_ID}: ${env.CHANGE_TITLE}" | ||
} | ||
} | ||
} | ||
stage('Build') { | ||
steps { | ||
ansiColor('xterm') { | ||
sh ''' | ||
export PATH=$HOME/.local/bin:$PATH | ||
make clean | ||
make deps | ||
make build -j2 | ||
''' | ||
} | ||
} | ||
} | ||
stage('Test') { | ||
steps { | ||
ansiColor('xterm') { | ||
sh ''' | ||
export PATH=$HOME/.local/bin:$PATH | ||
make test -j6 | ||
''' | ||
} | ||
} | ||
} | ||
} | ||
} |