Jenkins: Difference between revisions
Jump to navigation
Jump to search
(→Docker) |
No edit summary |
||
Line 9: | Line 9: | ||
|} | |} | ||
= | {| class="wikitable sortable" | ||
|- | |||
! Local location !! Container location !! Usage | |||
|- | |||
| <code>$JENKINS_HOME/jenkins_2.235.3/jenkins_home</code> || <code>/var/jenkins_home</code> || Jenkins Data | |||
|} | |||
<source lang="bash"> | <source lang="bash"> | ||
docker run -it --rm \ | docker run -it --rm \ | ||
Line 22: | Line 28: | ||
chown -R 1000:1000 $JENKINS_HOME/jenkins_2.235.3/jenkins_home | chown -R 1000:1000 $JENKINS_HOME/jenkins_2.235.3/jenkins_home | ||
==Docker== | |||
<source lang="bash" highlight="4-6"> | |||
<source lang="bash"> | |||
docker run --detach \ | docker run --detach \ | ||
--publish 8088:8080 \ | --publish 8088:8080 \ | ||
Line 39: | Line 39: | ||
</source> | </source> | ||
<source lang="bash"> | <source lang="bash" highlight="5-8"> | ||
docker run --detach \ | docker run --detach \ | ||
--publish 8088:8080 \ | --publish 8088:8080 \ | ||
Line 52: | Line 52: | ||
<source lang="bash"> | <source lang="bash"> | ||
docker exec -it jenkins bash | docker exec -it jenkins bash | ||
cat /var/jenkins_home/secrets/initialAdminPassword | cat /var/jenkins_home/secrets/initialAdminPassword | ||
Line 59: | Line 58: | ||
docker start jenkins | docker start jenkins | ||
docker stop jenkins | docker stop jenkins | ||
docker logs jenkins | |||
</source> | </source> | ||
==Raspbian== | ==Raspbian== | ||
<source lang="bash"> | <source lang="bash"> | ||
vcgencmd measure_temp | |||
df -h | df -h | ||
wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add - | wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add - |
Revision as of 17:52, 25 August 2020
Linux: export JENKINS_HOME=/srv/jenkins |
MacOS: export JENKINS_HOME=$HOME/jenkins |
Local location | Container location | Usage |
---|---|---|
$JENKINS_HOME/jenkins_2.235.3/jenkins_home |
/var/jenkins_home |
Jenkins Data |
docker run -it --rm \
--publish 8088:8080 \
--publish 50000:50000 \
jenkins/jenkins:2.235.3-lts-centos7 \
bin/bash
id; exit
mkdir -p $JENKINS_HOME/jenkins_2.235.3/jenkins_home chown -R 1000:1000 $JENKINS_HOME/jenkins_2.235.3/jenkins_home
Docker
docker run --detach \
--publish 8088:8080 \
--name jenkins \
--env JENKINS_OPTS="--prefix=/jenkins" \
--env JAVA_OPTS="-Dhudson.footerURL=https://cdn.chorke.org" \
--volume $JENKINS_HOME/jenkins_2.235.3/jenkins_home:/var/jenkins_home \
jenkins/jenkins:2.235.3-lts-centos7
docker run --detach \
--publish 8088:8080 \
--publish 50000:50000 \
--name jenkins \
--env JENKINS_SLAVE_AGENT_PORT=50000 \
--env JENKINS_OPTS="--prefix=/jenkins" \
--env JAVA_OPTS="-Dhudson.footerURL=https://cdn.chorke.org -Djava.util.logging.config.file=/var/jenkins_home/log.properties" \
--volume $JENKINS_HOME/jenkins_2.235.3/jenkins_home:/var/jenkins_home \
jenkins/jenkins:2.235.3-lts-centos7
docker exec -it jenkins bash
cat /var/jenkins_home/secrets/initialAdminPassword
exit
docker start jenkins
docker stop jenkins
docker logs jenkins
Raspbian
vcgencmd measure_temp
df -h
wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -
sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
apt update
apt list --upgradable
apt install git/stable
apt install jenkins/binary
systemctl start jenkins
systemctl status jenkins
systemctl enable jenkins
/lib/systemd/systemd-sysv-install enable jenkins
vcgencmd measure_temp
df -h
Admin User
cat /var/lib/jenkins/secrets/initialAdminPassword
ssh -L 8088:localhost:8088 [email protected]
http://localhost:8088