Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.
/ DD2482-ESP-CICD Public archive

DD2482 Task 1 - Testing and Continouos integration for ESP

License

Notifications You must be signed in to change notification settings

EdmanJohan/DD2482-ESP-CICD

Repository files navigation

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.

About

DD2482 Task 1 - Testing and Continouos integration for ESP

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published