Skip to content

Latest commit

 

History

History
24 lines (15 loc) · 2.6 KB

README.md

File metadata and controls

24 lines (15 loc) · 2.6 KB

DotNetCore-Test

This is a repo to test different versions of CI/CD with.

Prerequisites

Docker for Windows

Setup for Jankins Blue Ocean

This setup guide assumes you are using a Windows machine with PowerShell installed.

Start by pulling the latest Jenkins Blue Ocean Docker image. Do this by running in PowerShell: docker pull jenkinsci/blueocean

Once pulled run the with the following command in PowerShell and do not close thas it will display a password need to complete the Jenkins setup. docker run --rm -u root -p 8080:8080 -v jenkins-data:/var/jenkins_home -v /var/run/docker.sock:/var/run/docker.sock -v "%HOMEPATH%":/home jenkinsci/blueocean

You can then go to localhost:8080 to view the Jenkins install. You will be greeted by to initial setup screen which will need the password display in the PowerShell window you ran the docker run command in. On the following screen select Install suggested plugins and wait for the installation to complete (This may take a few minutes). On the next screen you can setup and an admin user by entering the details required and then saving and continuing.

You will now be greeted the Jenkins dashboard. In order for Jenkins to run pipelines in Docker containers you need to install the Docker Plugin. To do this press Manage Jenkins on the left of the screen. Then select Manage Plugins from the list of options. Next select the Avaliable tab and search for the "Docker Plugin". Finally check the tick box by the plugins name and press Install without restart.

To view Jenkins with the new Blue Ocean UI return to the dashboard by pressing the Jenkins logo in the top left of the screen and then press Open Blue Ocean on the left of the screen.

To create a pipeline start by pressing the Create a new pipeline button. Then click the option for where your code is stored, in this case press Github. To access GitHub Jenkins will need a personal access token, which can be generated by clicking the link on screen or by visiting this link. Press the link in Jenkins should auto fill the scope for what the access token needs. You can then select the organisation the repo belongs to and then the repo itself.

If you have selected this repo Jenkins will then load the pipeline from the Jenkinsfile contained in the repo. For more information on how to create a pipeline from scratch click here.