Skip to content

Repository files navigation

Pipeline DevOps 👬

Board Status

CircleCI

Quality Gate Status

Pipeline DevOps

Prérequis 🔴

Mise en oeuvre du tech-lunch 👏

Initialisation du plan

Créer l'espace de collaboration 💻

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
Créer l'espace de gestion de projet 📅

Se connecter à AzureDevOps

Créer une nouvelle organisation AzureDevOps Organization

Créer un projet public AzureDevOps Project

Configurer votre espace de gestion de projet :

  1. Click Project settings
  2. Désactiver les services Azure Devops inutile
  • Repos
  • Pipelines
  • Test Plans
  • Artifacts

Créer une premier tâche

Azure Boards pour Slack

AzureBoards sur Slack

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  

Creer un item via un message

Documentation AzureBoard for Slack

Github pour Slack :octocat:

Github pour 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

CirceCI pour Slack

CircleCI pour Slack

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 pour Slack 📷

Zoom pour Slack

/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
UptimeBot pour Slack

UptimeBot pour Slack

Github pour AzureBoards

Github pour Azure Boards

Documentation

Initialisation du développement web

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/

Initialisation du processus CI/CD

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

Initialisation de la qualité du code

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

Initialisation des tests de navigation utilisateur

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

Initialisation des tests de performance

Générer le script d'exécution des tests de performance

K6 recorder

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

Initialisation d'un pipeline nocture

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

Initialisation du monitoring de la plateforme web

Metric Pivotal

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages