Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
c233f746
Commit
c233f746
authored
Apr 18, 2020
by
Joseph Noir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Experiment with Dockerfiles pipeline syntax
parent
eaea2944
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
110 additions
and
0 deletions
+110
-0
Jenkinsfile
Jenkinsfile
+45
-0
dockerfiles/caf-jenkins-fedora-30
dockerfiles/caf-jenkins-fedora-30
+65
-0
No files found.
Jenkinsfile
View file @
c233f746
#
!
/usr/
bin
/
env
groovy
#
!
/usr/
bin
/
env
groovy
node
{
checkout
scm
docker
.
withServer
(
'tcp://mobi7.inet.haw-hamburg.de:2376'
,
'674e60ef-6985-48dd-a61c-353806cc7106 (certificate for docker on mobi3 v7 (docker plugin))'
)
{
def
dockerfile
=
'caf-jenkins-fedora-30'
def
image
=
docker
.
build
(
"caf-jenkins:fedora-30"
,
"-f ${dockerfile} ./dockerfiles"
)
image
.
inside
{
stage
(
'Testing'
)
{
steps
{
sh
'uname -r'
sh
'cat /etc/os_release'
}
}
}
}
}
/*
pipeline {
agent {
agent {
// Equivalent to "docker build -f Dockerfile.build --build-arg version=1.0.2 ./build/
dockerfile {
filename 'caf-jenkins-fedora-30'
dir 'dockerfile'
label 'my-defined-label'
additionalBuildArgs '--build-arg version=1.0.2'
args '-v /tmp:/tmp'
}
}
}
stages {
stage('Build') {
steps {
sh 'uname -r'
sh 'cat /etc/os_release'
checkout scm
}
}
}
}
*/
/*
@Library('caf-continuous-integration') _
@Library('caf-continuous-integration') _
// Default CMake flags for release builds.
// Default CMake flags for release builds.
...
@@ -189,3 +233,4 @@ pipeline {
...
@@ -189,3 +233,4 @@ pipeline {
}
}
}
}
}
}
*/
dockerfiles/caf-jenkins-fedora-30
0 → 100644
View file @
c233f746
########################################################
# Dockerfile for Jenkins slave with gcc 9
# Based on Fedora 30
############################################################
FROM fedora:30
MAINTAINER Raphael Hiesgen
# Install Essentials
RUN dnf update -y && \
yum clean all
##################### INSTALL TOOLS ########################
# Install Packages
RUN dnf install -y git \
wget \
make \
openssh-server \
sudo \
java-11-openjdk \
cmake \
docker \
kcov \
gcc gcc-c++ \
clang \
openssl-devel \
libasan \
libubsan \
python-pip \
&& dnf clean all
##################### INSTALL GCOVR #######################
RUN pip install --upgrade gcovr
####################### SETUP SSH #########################
# gen dummy keys, centos doesn't autogen them like ubuntu does
RUN /usr/bin/ssh-keygen -A
# Set SSH Configuration to allow remote logins without /proc write access
RUN sed -ri 's/^session\s+required\s+pam_loginuid.so$/session optional pam_loginuid.so/' \
/etc/pam.d/sshd
# Create Jenkins User
RUN useradd jenkins -m -s /bin/bash
# Add public key for Jenkins login
RUN mkdir /home/jenkins/.ssh
COPY authorized_keys /home/jenkins/.ssh/authorized_keys
RUN chown -R jenkins /home/jenkins
RUN chgrp -R jenkins /home/jenkins
RUN chmod 600 /home/jenkins/.ssh/authorized_keys
RUN chmod 700 /home/jenkins/.ssh
# Add the jenkins user to sudoers
# RUN echo "jenkins ALL=(ALL) ALL" >> etc/sudoers
# Set Name Servers
# COPY /files/resolv.conf /etc/resolv.conf
# Expose SSH port and run SSHD
EXPOSE 22
CMD ["/usr/sbin/sshd","-D"]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment