Skip to content

henriquekops/jenkins-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Author: Henrique R. Kops

Jenkins Tutorial for Python CI!

ENVIRONMENT SETUP

DEPENDENCIES

Which How to
Docker docker-ce
Python $ sudo apt install python3.6
Pip $ sudo apt install python3-pip
Virtualenv $pip3 install virtualenv

STEPS

  1. Clone the project:
$ git clone https://github.com/henriquekops/jenkins_tutorial.git
  1. Navigate to project directory:
$ cd /path/to/cloned/project/jenkins_tutorial/
  1. Create virtual environment (Optional):
$ virtualenv venv
  1. Activate virtual environment (Optional):
$ source ./venv/bin/activate
  1. Install requirements:
$ pip3 install -r requirements.txt
  1. (Build up the jenkins docker):
$ sudo docker-compose up
  1. Verify containers (Optional):
$ docker ps
  1. Get the first access key:
$ docker exec Jenkins-Tutorial cat /var/...

JENKINS CONFIGURATON

  • Select the community useful installation

  • Input new user credentials

  • On localhost:PORT append /blue

  • Click on new pipeline

  • Select the GitHub option

  • Input this GitHub access key

  • Say that the project belongs to your user name

  • Select your repo and create pipeline

  • Now you can try to build now

  • Thats all folks! 🐳 👔 🐍

Appendix

USEFUL DOCKER COMMANDS:

Command Whats for
$ docker ps list containers
$ docker images list images
$ docker exec -it <container_name> bash execute in container
$ docker stop <container name> stops container
$ docker rm <container id> remove container
$ docker rmi <image id> remove image

About

A simple CI tutorial

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages