Author: Henrique R. Kops
| Which | How to |
|---|---|
| Docker | docker-ce |
| Python | $ sudo apt install python3.6 |
| Pip | $ sudo apt install python3-pip |
| Virtualenv | $pip3 install virtualenv |
- Clone the project:
$ git clone https://github.com/henriquekops/jenkins_tutorial.git
- Navigate to project directory:
$ cd /path/to/cloned/project/jenkins_tutorial/
- Create virtual environment (Optional):
$ virtualenv venv
- Activate virtual environment (Optional):
$ source ./venv/bin/activate
- Install requirements:
$ pip3 install -r requirements.txt
- (Build up the jenkins docker):
$ sudo docker-compose up
- Verify containers (Optional):
$ docker ps
- Get the first access key:
$ docker exec Jenkins-Tutorial cat /var/...
-
Select the community useful installation
-
Input new user credentials
-
On
localhost:PORTappend/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! 🐳 👔 🐍
| 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 |