6.1. CI/CD Devtools Ecosystem

6.1.1. Agility

../../_images/agility-bigpicture-v1.png
../../_images/agility-bigpicture-v2.png
../../_images/agility-scrum-userstory.png
../../_images/agility-scrum-capacity-backlog.png
../../_images/agility-scrum-capacity-sprint.png
../../_images/agility-scrum-daily-timer.png
../../_images/agility-scrum-sprint-week-continuous.png

6.1.2. Ecosystem

../../_images/ecosystem-bigpicture.png
../../_images/ecosystem-alternatives.png
../../_images/ecosystem-bigpicture-01.png
../../_images/ecosystem-bigpicture-02.png
../../_images/ecosystem-bigpicture-03.png
../../_images/ecosystem-bigpicture-04.png
../../_images/ecosystem-bigpicture-05.png
../../_images/ecosystem-bigpicture-06.png
../../_images/ecosystem-bigpicture-07.png
../../_images/ecosystem-bigpicture-08.png
../../_images/ecosystem-bigpicture-09.png
../../_images/ecosystem-bigpicture-10.png
../../_images/ecosystem-bigpicture-11.png
../../_images/ecosystem-bigpicture-12.png

6.1.3. Version Control System

../../_images/vcs-gitflow-01-feature.png
../../_images/vcs-gitflow-02-feature-pr.png
../../_images/vcs-gitflow-03-bugfix.png
../../_images/vcs-gitflow-04-develop,feature,bugfix.png
../../_images/vcs-gitflow-05-develop,master.png
../../_images/vcs-gitflow-06-release.png
../../_images/vcs-gitflow-07-tag.png
../../_images/vcs-gitflow-08-hotfix.png
../../_images/vcs-gitflow-bigpicture.png
../../_images/vcs-gitflow-github.png
../../_images/vcs-gitflow-lean.png
../../_images/vcs-bitbucket-create-branch.png

6.1.4. Virtualization

../../_images/virt-docker-stack-01-baremetal.png
../../_images/virt-docker-stack-02-virtualization-1.png
../../_images/virt-docker-stack-02-virtualization-2.png
../../_images/virt-docker-stack-02-virtualization-3.png
../../_images/virt-docker-stack-02-virtualization-4.png
../../_images/virt-docker-stack-03-docker.png
../../_images/virt-docker-stack-04-docker-network-1.png
../../_images/virt-docker-stack-04-docker-network-2.png
../../_images/virt-docker-stack-04-docker-network-3.png
../../_images/virt-docker-stack-05-kubernetes.png
../../_images/virt-docker-stack-06-architecture.png

6.1.5. Continuous Integration / Delivery

../../_images/cicd-jenkins-docker-1.png
../../_images/cicd-jenkins-docker-2-build.png
../../_images/cicd-jenkins-docker-3-notfound.png
../../_images/cicd-jenkins-docker-4-cannotcreatesocket.png
../../_images/cicd-jenkins-docker-5-permissiondenied.png
../../_images/cicd-jenkins-docker-6-dockersock.png
../../_images/cicd-jenkins-docker-7-containers.png
../../_images/cicd-jenkins-blueocean-failing.png
../../_images/cicd-jenkins-blueocean-success.png
../../_images/cicd-jenkins-blueocean-pipeline.png

6.1.6. Quality Assurance

../../_images/qa-sonarlint-a.jpg
../../_images/qa-sonarqube-bigpicture.png
../../_images/qa-sonarqube-feature-branch-a.png
../../_images/qa-sonarqube-feature-portfolio-a.png
../../_images/qa-sonarqube-feature-portfolio-b.png
../../_images/qa-sonarqube-feature-portfolio-c.png
../../_images/qa-sonarqube-feature-pr-a.png
../../_images/qa-sonarqube-feature-security-a.png
../../_images/qa-sonarqube-feature-security-b.png
../../_images/qa-sonarqube-integrations-azuredevops-a.png
../../_images/qa-sonarqube-integrations-bitbucket-a.png
../../_images/qa-sonarqube-integrations-bitbucket-b.png
../../_images/qa-sonarqube-integrations-bitbucket-c.png
../../_images/qa-sonarqube-integrations-bitbucket-d.png
../../_images/qa-sonarqube-integrations-github-a.png
../../_images/qa-sonarqube-integrations-gitlab-a.png
../../_images/qa-sonarqube-license-a.png

6.1.7. Issue Tracker

../../_images/jira-backlog.jpg
../../_images/jira-backlog-kanban.png
../../_images/jira-backlog-scrum.png
../../_images/jira-builds.png
../../_images/jira-devpanel-1.png
../../_images/jira-devpanel-2.png
../../_images/jira-devpanel-3.png
../../_images/jira-pullrequest.png
../../_images/jira-release.png
../../_images/jira-roadmap.png
../../_images/jira-triggers.png
../../_images/jira-versions.png

6.1.8. SSH

../../_images/ssh-pssh-1.jpg
../../_images/ssh-pssh-2.png
../../_images/ssh-pssh-3.png

6.1.9. Testing

../../_images/cicd-strategy.png

6.1.10. Mutation Testing

../../_images/testing-mutation-1.jpg
../../_images/testing-mutation-2.png
../../_images/testing-mutation-3.jpg

6.1.11. BDD Testing

../../_images/test-bdd-behave.png
../../_images/test-bdd-lettuce.png

6.1.12. Load Testing

../../_images/test-load-gatling-result.png
../../_images/test-load-gatling-run.png

6.1.13. Testing UI

../../_images/qa-selenium-ide.png

6.1.14. Testing microservices

../../_images/testing-microservices-01.png
../../_images/testing-microservices-02.png
../../_images/testing-microservices-03.png
../../_images/testing-microservices-04.png
../../_images/testing-microservices-05.png
../../_images/testing-microservices-06.png
../../_images/testing-microservices-07.png
../../_images/testing-microservices-08.png
../../_images/testing-microservices-09.png
../../_images/testing-microservices-10.png
../../_images/testing-microservices-11.png
../../_images/testing-microservices-12.png
../../_images/testing-microservices-13.png

6.1.15. Provisioning

../../_images/provision-ansible.png

6.1.16. Assignments

curl https://get.docker.com |sudo sh
sudo usermod -aG docker ubuntu   # requires logout

Jenkins:

docker network create ecosystem
mkdir -p /home/jenkins
chmod 777 /home/jenkins
chmod 777 /var/run/docker.sock
ln -s /home/jenkins /var/jenkins_home

docker run \
    --name jenkins \
    --detach \
    --rm \
    --network ecosystem \
    --publish 8080:8080 \
    --volume /home/jenkins:/var/jenkins_home \
    --volume /var/run/docker.sock:/var/run/docker.sock \
    jenkins/jenkins:alpine

SonarQube:

docker network create ecosystem
docker volume create --name sonarqube_data
docker volume create --name sonarqube_extensions
docker volume create --name sonarqube_logs

docker run \
    --name sonarqube \
    --detach \
    --rm \
    --network ecosystem \
    --publish 9000:9000 \
    --volume sonarqube_data:/opt/sonarqube/data \
    --volume sonarqube_logs:/opt/sonarqube/logs \
    --volume sonarqube_extensions:/opt/sonarqube/extensions \
    sonarqube

SonarScanner:

## Sonar Server
sonar.host.url=http://sonarqube:9000/
sonar.login=admin
sonar.password=admin

## About Project
sonar.projectKey=myproject
sonar.projectName=myproject
sonar.sourceEncoding=UTF-8

## SonarScanner Config
sonar.verbose=false
sonar.log.level=INFO
sonar.showProfiling=false
sonar.projectBaseDir=/usr/src/
sonar.working.directory=/tmp/

## Build Breaker
sonar.buildbreaker.skip=false
sonar.buildbreaker.queryInterval=10000
sonar.buildbreaker.queryMaxAttempts=1000

## Debugging
# sonar.verbose=true
# sonar.log.level=DEBUG
# sonar.showProfiling=true
# sonar.scanner.dumpToFile=/tmp/sonar-project.properties

## Python
sonar.language=py
sonar.sources=.
sonar.inclusions=**/*.py
sonar.exclusions=**/migrations/**,**/*.pyc,**/__pycache__/**
docker run --rm --network ecosystem -v $(pwd):/usr/src sonarsource/sonar-scanner-cli

Docker Registry:

docker network create ecosystem
mkdir -p /home/registry
chmod 777 /home/registry

docker run \
    --name registry \
    --detach \
    --rm \
    --network ecosystem \
    --publish 5000:5000 \
    --volume /home/registry:/var/lib/registry \
    registry:2

Tests:

Code 6.48. test-unit.sh
#!/bin/sh

cd example-py-unittest
python3 -m unittest
Code 6.49. test-functional.sh
#!/bin/sh

cd example-py-doctest/
python3 -m doctest -v doctests/*
Code 6.50. test-integration.sh
#!/bin/sh

pip install -r requirements.txt
cd example-py-pytest/
python3 -m pytest
Code 6.51. test-static.sh
#!/bin/sh

docker run --rm --net ecosystem -v $(pwd):/usr/src sonarsource/sonar-scanner-cli
Code 6.52. make-artifact.sh
#!/bin/sh

REGISTRY='localhost:5000'
NAME='myapp'
VERSION="$(git log -1 --format='%h')"

IMAGE="$REGISTRY/$NAME:$VERSION"

docker build . -t $IMAGE
docker push $IMAGE
docker rmi $IMAGE

6.1.17. References

1

https://www.sonarlint.org