Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »


Intro

My notes on the CICD tool



Tips And Notes


  • By default Jenkins will consider the build a failure if any command in the build step finishes with an exit value other than 0
  • A red dot next to a build indicates it failed.  Blue means it is all good.




Advantages


  • Easy to use, web-based
  • Built-in documentation with examples.
  • Open Source
  • MIT License
  • Extensible through plugins



Installation


Jenkins can be run in all operating systems, and in Docker containers.  Follow the instructions here: https://jenkins.io/download/


Azure Cloud

You can also find it as a template in the Azure marketplace : https://azuremarketplace.microsoft.com/en-us/marketplace/apps/azure-oss.jenkins?tab=Overview and instructions on how to use it here: https://docs.microsoft.com/en-us/azure/jenkins/


Install Via Docker Container


Pull the Jenkins image

Get Jenkins Image
docker pull jenkins/jenkins:lts


Run Jenkins and expose it on port 8080


Run Jenkins
docker run --detach --publish 8080:8080 --volume jenkins_home:/var/jenkins_home --name jenkins jenkins/jenkins:lts


Connects to the "Jenkins" container and executes the "cat <filename>" command to get the initial password.   After this, you can connect to http://localhost:8080 and log in with the password shown.  If you are inside a VM, make sure you use the browser in the VM and not your host.  Alternatively, you can provide the VM's hostname followed by :8080 (eg, http://ubuntu1804lts:8080)


Execute A Command In Container
docker exec jenkins cat /var/jenkins_home/secrets/initialAdminPassword



Install In Ubuntu


Commands To Install Jenkins
wget -q -O - http://pkg.jenkins-ci.org/debian-stable/jenkins-ci.org.key | apt-key add -

echo "deb http://pkg.jenkins-ci.org/debian-stable binary/" | tee -a /etc/apt/sources.list 

apt-get update && apt-get upgrade -y

apt-get -y install openjdk-8-jdk

apt-get -y install jenkins 

cat /var/lib/jenkins/secrets/initialAdminPassword



  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.