Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wenqing
ogs
Commits
6d5aff51
Commit
6d5aff51
authored
7 years ago
by
Lars Bilke
Browse files
Options
Downloads
Patches
Plain Diff
[Jenkins] Build sanitizer Docker image from source.
parent
9575ece6
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Jenkinsfile
+6
-4
6 additions, 4 deletions
Jenkinsfile
scripts/docker/Dockerfile.clang.minimal
+77
-0
77 additions, 0 deletions
scripts/docker/Dockerfile.clang.minimal
with
83 additions
and
4 deletions
Jenkinsfile
+
6
−
4
View file @
6d5aff51
...
@@ -351,15 +351,17 @@ pipeline {
...
@@ -351,15 +351,17 @@ pipeline {
// ************************** Sanitizer ********************************
// ************************** Sanitizer ********************************
stage
(
'Sanitizer'
)
{
stage
(
'Sanitizer'
)
{
agent
{
agent
{
docker
{
dockerfile
{
image
'ogs6/clang-base:latest'
filename
'Dockerfile.clang.minimal'
dir
'scripts/docker'
label
'docker'
label
'docker'
args
'-v /home/jenkins/
.ccache:/usr/src/.ccache
'
args
'-v
ccache:
/home/jenkins/
cache/ccache -v conan-cache:/home/jenkins/cache/conan
'
a
lwaysPull
true
a
dditionalBuildArgs
'--pull'
}
}
}
}
steps
{
steps
{
script
{
script
{
sh
'find $CONAN_USER_HOME -name "system_reqs.txt" -exec rm {} \\;'
configure
{
configure
{
cmakeOptions
=
cmakeOptions
=
'-DOGS_USE_CONAN=ON '
+
'-DOGS_USE_CONAN=ON '
+
...
...
This diff is collapsed.
Click to expand it.
scripts/docker/Dockerfile.clang.minimal
0 → 100644
+
77
−
0
View file @
6d5aff51
FROM ubuntu:16.04
RUN apt-get update && apt-get install -y software-properties-common curl \
&& add-apt-repository -y ppa:ubuntu-toolchain-r/test \
&& curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash \
&& apt-get update \
&& apt-get -y install \
build-essential \
ccache \
git git-lfs \
python-pip \
sudo \
unzip \
xz-utils
RUN python -m pip install --upgrade pip \
&& python -m pip install cmake conan
# Ninja
RUN curl -L -o ninja-linux.zip https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip \
&& unzip ninja-linux.zip \
&& mv ninja /usr/local/bin/ninja \
&& rm ninja-linux.zip
# Install LLVM, see http://llvm.org/docs/CMake.html
RUN curl -L -o llvm.tar.xz http://releases.llvm.org/3.9.0/llvm-3.9.0.src.tar.xz \
&& tar -Jxf llvm.tar.xz \
&& mkdir build-llvm && cd build-llvm \
&& cmake ../llvm-3.9.0.src -DCMAKE_BUILD_TYPE=Release \
&& make -j$(nproc) install \
&& cd .. && rm -rf build-llvm llvm-3.9.0.src llvm.tar.xz
# Clang
RUN curl -L -o cfe-tar-xz http://releases.llvm.org/3.9.0/cfe-3.9.0.src.tar.xz \
&& tar -Jxf cfe-tar-xz \
&& mkdir build-cfe && cd build-cfe \
&& cmake ../cfe-3.9.0.src -DCMAKE_BUILD_TYPE=Release -DLLVM_CONFIG_PATH=/usr/local/bin/llvm-config \
&& make -j$(nproc) install \
&& cd .. && rm -rf build-cfe cfe-3.9.0.src cfe-tar-xz
ENV CC=clang
ENV CXX=clang++
# Compiler-rt
RUN curl -L -o compiler-rt.tar.xz http://releases.llvm.org/3.9.0/compiler-rt-3.9.0.src.tar.xz \
&& tar -Jxf compiler-rt.tar.xz \
&& mkdir build-compiler-rt && cd build-compiler-rt \
&& cmake ../compiler-rt-3.9.0.src -DCMAKE_BUILD_TYPE=Release -DLLVM_CONFIG_PATH=/usr/local/bin/llvm-config \
&& make -j$(nproc) install \
&& cd .. && rm -rf build-compiler-rt compiler-rt-3.9.0.src compiler-rt.tar.xz
RUN mkdir /usr/local/lib/clang/3.9.0/lib
RUN ln -s /usr/local/lib/linux /usr/local/lib/clang/3.9.0/lib/linux
# Lis
RUN curl -L -o lis.tar.gz http://www.ssisc.org/lis/dl/lis-1.7.9.tar.gz \
&& tar xf lis.tar.gz \
&& cd lis-1.7.9 \
&& ./configure \
&& make -j$(nproc) install \
&& cd .. && rm -rf lis-1.7.9 lis.tar.gz
# Add user jenkins to the image
RUN adduser --uid 500 --disabled-password --gecos "" jenkins \
# Add user jenkins to sudoers with NOPASSWD
&& echo "jenkins ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers \
# Set password for the jenkins user (you may want to alter this).
&& echo "jenkins:jenkins" | chpasswd
USER jenkins
ENV CCACHE_DIR=/home/jenkins/cache/ccache
RUN mkdir -p $CCACHE_DIR
ENV CCACHE_MAXSIZE=15G
ENV CCACHE_SLOPPINESS=pch_defines,time_macros
ENV CONAN_USER_HOME=/home/jenkins/cache/conan
WORKDIR /home/jenkins
RUN conan user
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment