Giter Club home page Giter Club logo

dd2482-esp-cicd's Introduction

Automated remote OTA deployment and testing on ESP32 with Jenkins and AWS

This repo holds the project files that were used for a demonstration in the course DD2482 "Automated Software Testing and DevOps".

Pipeline overview

The following flowchart gives an overview of the pipeline that made up the demonstration.

WorkFlow

How to setup

  1. Setup Jenkins server (with the Jenkins pipline script) Note: that some names must be changed to match your AWS setup
  2. Install dependencies (Git, Python) on server.
  3. Clone Amazon FreeRTOS repository.
  4. Follow "Getting started tutorial with ESP32 and AWS".
  5. Follow "Tutorial to install initial firmware on ESP32 for OTA".
  6. Push your initial firmware source code to new repo on Github.
  7. Setup webhook from Github to Jenkins (Github repo settings) which triggers the Jenkins pipline whenever something is pushed to the repo.
  8. Add a new thread for your own code to run aside the OTA process like here File.
Iot_CreateDetachedThread( runTestDemo,
                          NULL,
                          (democonfigDEMO_PRIORITY - 1),
                          democonfigDEMO_STACKSIZE );

9a. Our test demo was basically just doing an https post to the server that runs jenkins (See Code ).

void runTestDemo( void * pArgument )
{
    vTaskDelay( pdMS_TO_TICKS( 5000 ) );
    IotLogInfo( "Hello from runTestDemo!" );
    testSetup();
    sendHttpRequest( &transportInterface,
                     HTTP_METHOD_POST,
                     POST_PATH );
}

9b. A webhook in Jenkins catches the HTTPS post and compares the sent data with the expected data.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.