- Git client
- Hugo client
- Visual Studio Code
- CircleCI
- Pivotal
- SonarCloud
- Sonarlint
- Slack
- Azure DevOps
- Zoom
- UptimeBot
- K6
- LambdaTest
Se connecter à Slack
Créer un espace de collaboration Slack Workspace
Ajouter des canaux de communications pour vos besoins de centraliser les informations liée au projet Slack Channel
- bugs
- kanban
- CI/CD
Se connecter à AzureDevOps
Créer une nouvelle organisation AzureDevOps Organization
Créer un projet public AzureDevOps Project
Configurer votre espace de gestion de projet :
- Click Project settings
- Désactiver les services Azure Devops inutile
- Repos
- Pipelines
- Test Plans
- Artifacts
Créer une premier tâche
Channel Kanban :
/azboards signin
/azboards link https://dev.azure.com/techlunch/Tech-lunch
/azboards subscriptions
Event : Work item created/deleted/restored/updated
#### Créer une tâche sur Azure Board via Slack
/azboards create
Task
Créer un item via des actions sur les messages
Channel Bugs :
Il manque le favicon sur le site, veuillez créer un issue pour investiguer et corriger
Documentation AzureBoard for Slack
/github subscribe ReachInfinity/hugo-circleci-1
/github help
Les fonctionnalités par défaut :
- issues
- pulls
- statuses
- commits
- deployments
- public
exemple pour créer une issue sur Github :
/github open ReachInfinity/hugo-circleci-1
Exécutez un job CircleCI pour voir l'état du pipeline dans le cannale de communication.
exemple :
Success: ReachInfinity's workflow (build_deploy_and_scan) in ReachInfinity/hugo-circleci-1 (master)
- Test de la qualité du code (a03c10f)
/zoom Start a meeting
/zoom meeting [topic] Start a meeting with topic
/zoom join [meeting id/personal link name] Join a meeting using meeting ID/personal link name
/zoom join me Join a meeting using your personal meeting ID
/zoom call [@contact/phone number] Start a phone call with a contact or a phone number
/zoom config Configure your settings for Zoom Meetings in Slack
/zoom logout Logout from Zoom on all your Slack channels and direct messages
hugo new site techlunch-1
cd techlunch/ && touch .gitingore && touch .gitmodules
.gitignore :
public/
Ajouter le theme du site :
git submodule add https://github.com/spech66/bootstrap-bp-hugo-startpage.git themes/presentation
editez le fichier config.toml et ajouter :
baseURL = "https://tech-lunch.cfapps.io/"
languageName = "Français"
languageCode = "fr-FR"
title = "Tech Lunch"
theme = "presentation"
### Pour le theme presentation
[params]
welcomeText = "Hello World"
Générer les fichiers statiques du site
hugo -D
Exécuter le serveur web avec une autoregénération :
hugo server -D
http://localhost:1313/
Créer son premier processus déploiement continue :
mkdir .circleci
vim .circleci/config.yml
#############################
version: 2.1
jobs:
build:
docker:
# 2019-10-23 BTH: had to fix the version as there is a breaking change in latest (=0.59)
# See https://hub.docker.com/r/cibuilds/hugo, https://github.com/cibuilds/hugo
- image: cibuilds/hugo:0.58.3
steps:
- checkout
- run:
name: Install git client
command: apk update && apk add git
- run:
name: Load submodule
command: git submodule sync && git submodule update --init
- run:
name: Build Hugo static website
command: HUGO_ENV=production hugo
- run:
name: Install CF CLI
command: |
apk add wget
wget https://cli.run.pivotal.io/stable?release=linux64-binary
mv stable?release=linux64-binary /tmp/cf-cli.tgz
mkdir -p /usr/local/bin
tar -xzf /tmp/cf-cli.tgz -C /usr/local/bin
cf --version
rm -f /tmp/cf-cli.tgz
- run:
name: Deploy
command: |
cf login -a "$CF_API" -u "$CF_USERNAME" -p "$CF_PASSWORD" -o "$CF_ORG" -s "$CF_SPACE_PROD"
cf push
Créer le manifeste de déploiement :
vim manifest.yml
---
applications:
-
name: tech-lunch
memory: 64M
path: public
buildpacks:
- staticfile_buildpack
routes:
- route: tech-lunch.cfapps.io
env:
FORCE_HTTPS: true
Créer un fichier sonar-project.properties :
sonar.projectKey=ReachInfinity_hugo-circleci-1
sonar.organization=reachinfinity
# This is the name and version displayed in the SonarCloud UI.
sonar.projectName=hugo-circleci-1
sonar.projectVersion=1.0
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
sonar.sources=.
# Encoding of the source code. Default is default system encoding
sonar.sourceEncoding=UTF-8
Ajouter le processus automatique de scan via CircleCI :
.circleci/config.yml
scan:
docker:
- image: sonarsource/sonarcloud-scan:1.0.1
steps:
- checkout
- run:
name: Quality Scan
command: sonar-scanner -Dsonar.host.url=https://sonarcloud.io -Dsonar.login="$SONAR_LOGIN"
workflows:
version: 2.1
build_deploy_and_scan:
jobs:
- build
- scan:
requires:
- build
Ajouter du contenu pour le scan, créer le répertoire assets/css/ à la racine et créer le fichier test.scss, remplissez le avec un exemple
Créer votre arborscence dans le projet :
mkdir browser-testing
Ajouter le fichier tech-lunch.js et développez votre test, dans l'exemple du Tech-Lunch, c'est une adaptation de l'exemple proposer par LambdaTest
Installer nodeJs sur votre poste et exécuter la commande suivante :
npm install && npm i selenium-webdriver
Modifier le fichier config.toml de circleci : .circleci/config.toml
testUI:
docker:
- image: circleci/node:13.10.1-browsers
steps:
- checkout
- run:
name: Browser Testing
command: |
npm i selenium-webdriver
node browser-testing/tech-lunch.js
...
- testUI:
requires:
- build
Générer le script d'exécution des tests de performance
Créer votre arborscence dans le projet :
mkdir loadtests
Ajouter le fichier générer juste avant dans loadtests
Modifier le fichier config.toml de circleci :
.circleci/config.toml
version: 2.1
jobs:
...
test:
machine: true
steps:
- checkout
- run:
name: Running k6 tests
command: |
docker pull loadimpact/k6:latest
docker run -i -e K6_CLOUD_TOKEN=$K6_CLOUD_TOKEN -v $PWD:/ci/ loadimpact/k6:latest cloud /ci/loadtests/performance-test.js
...
workflows:
version: 2.1
build_deploy_and_scan:
...
- test:
requires:
- build
Ajouter dans votre projet CircleCI la variable d'environnement K6_CLOUD_TOKEN
K6 pour CircleCI
Ajouter les notifications de k6 dans Slack K6 pour Slack
Récupérer l'URL afin de l'intégrer dans K6.
Activer les notifications sur K6
Il est possible de planifier l'exécution d'un pipeline la nuit afin de garantir le bon fonctionnement de la CI et des applications. L'objectif étant d'exécuter ce pipeline la lui et le premier arriver peut déjà comprendre certains dysfonctionnement du pipeline.
Modifier le fichier config.toml de Circleci:
# Scheduled workflows may be delayed by up to 15 minutes.
# This is done to maintain reliability during busy times such as 12:00am UTC.
# Scheduled workflows should not assume they are started with to-the-minute accuracy.
nightly:
triggers:
- schedule:
cron: "0 0 * * *"
filters:
branches:
only:
- master
jobs:
- build
- scan

