Vagrant Jenkins build Build Status

Run a Jenkins 2.25 instance on Ubuntu 16.04 LTS using vagrant.

Before you start

Build the vagrant box

vagrant up

To access the Jenkins server with GUI, open your browser with the following url:

http://localhost:8080

or, add the following line to the hosts file (OPTIONAL)

127.0.0.1   jenkins.local

to access the virtual machine via CLI run the following command:

vagrant ssh

and then run the server in your browser with the following url:

http://jenkins.local:8080

First time accessing Jenkins

Since version 2.0 Jenkins has a security setup wizard when first running it after the installation.

SSH into the machine with

vagrant ssh

Locate the security password

cat /var/lib/jenkins/secrets/initialAdminPassword

and copy it into the password field on the Jenkins server.

When you finish configuring Jenkins from the web UI, restart the service

sudo service jenkins restart

Next steps

Step 1

Step 2

npm install
  • After that. You should be able to run the app using
npm start
  • You can run the tests in the same way
npm test

Step 3

With your environment ready, you can now proceed to create the CI Pipeline. Use Jenkinsfile based solutions versioning it. Your solution should look like this:

Default-aligned image