-
Ssh into the virtual machine
Skip step 2, 3 for the recitation demo. Already setup.
- Install Java Jdk
sudo apt-get install java-1.8.0-openjdk
java -version
- Install jenkins using a docker image
docker pull jenkins/jenkins
- Run the war file on port 8089
java -jar /usr/share/java/jenkins.war --httpPort=8089
Message: Jenkins is fully up and running
-
Login
Username: admin
Password: seaidemo23
-
Click on New Item on top left corner
-
Add name, select Freestyle project and click OK
-
Configue the project - Add a description
-
In Source Code Management, select Git and add repository URL to link to GitHub Note: This repository is public, so it does not require credentials
-
Under Branches to build, in Branch Specifier replace */master with */main
-
Under Build Steps, click on Add Build Steps dropdown and select Execute shell
-
In commands, paste the following commands to run pytest
pytest -v
coverage run -m pytest
coverage report
-
Click Save
-
Click Build Now from left menu
-
In Build History, green tick shows the build is successful. Click on build for details.
-
Click on Console Output from left menu
-
Observe the test cases have passed
-
Click on Actions tab
-
Click on New workflow and then click on set up a workflow yourself
-
Set up yaml file
-
Green ticks signifies successful build