This repo holds the project files that were used for a demonstration in the course DD2482 "Automated Software Testing and DevOps".
The following flowchart gives an overview of the pipeline that made up the demonstration.
- Setup Jenkins server (with the Jenkins pipline script) Note: that some names must be changed to match your AWS setup
- Install dependencies (Git, Python) on server.
- Clone Amazon FreeRTOS repository.
- Follow "Getting started tutorial with ESP32 and AWS".
- Follow "Tutorial to install initial firmware on ESP32 for OTA".
- Push your initial firmware source code to new repo on Github.
- Setup webhook from Github to Jenkins (Github repo settings) which triggers the Jenkins pipline whenever something is pushed to the repo.
- 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.