Create Continuous Integration (CI) Pipeline in Gitlab

Create Continuous Integration (CI) Pipeline in Gitlab Agenda What is Continuous Integration (CI)? What it is the application? How does a CI Pipeline work? What do I need for a CI Pipeline? What steps are necessary? Small Project in Python Server Configuration Python Project Gitlab CI Yaml File stages: - test python_test: stage: test image: python:3.9 script: - pip3 install pipenv - pipenv install - pipenv run python3 -m pytest Server Configuration Server Update # SSH Login ~ ssh root@IP-Adresse # Update Server root@server:~$ apt-get update && apt-get upgrade Create new user # Create new user root@server:~$ useradd -m -s /bin/bash youtube # Change Password root@server:~$ passwd youtube # Add user to sudo Group root@server:~$ usermod -aG sudo youtube Disable root access per ssh # Edit SSH Config youtube@server:~$ sudo vim /etc/ssh/sshd_config # inside vim /PermitRootLogin yes mit no ersetzen # on your keyboard :wq # Restart ssh service root@server:~$ sudo systemctl restart ssh Password-less login + Installation of Docker # on your Laptop / PC ~ ssh-copy-id youtube@server-IP # Login mit youtube ohne Passwort # Installation of Docker youtube@server:~$ sudo apt-get install -y docker....

January 3, 2021 · 2 min · Moritz Gnisia