CICD Overview

From DDCIDeos
Jump to navigationJump to search

All code can be found at https://deos.ddci.com/svn/DDCI/maintainer-tools/cicd/

cron job → cicd.sh → run docker with setup.sh → cicd.py → nightly build

Steps of a nightly build:

  • Jenkins user has a cron job to run cicd.sh each weekday on the Automate server
  • cicd.sh:
    • pulls the latest docker at dds-docker-maintainer-kismet
    • calls run docker with a file of commands setup.sh which includes running cicd.py
    • cleans up docker after all commands finish
  • setup.sh:
    • installs python3-cryptography (needed for emails)
    • sets up ssh-agent
    • sets environment variables (qemu ip addresses, ssh/svn, license file)
    • cd to /cicd/cicd_scripts
    • runs script cicd.py
  • cicd.py:
    • build_components:
      • starts 3 qemu platforms via cdproc
      • check if component changed since last build, do not add to build list if not
      • for each component (in build list or csv) create an array of commands as strings which includes:
        • checkout component
        • install build dependencies (from csv)
        • install regress dependencies (if required)
        • update externals
        • build component
        • build and run regress
      • Then exec_commands is called with the commands array passed
      • After all components finish this process, the build dates in the csv are updated and pushed to svn.
        • Regress summary.htm and regress.log for components are zipped and sent to the test team.
    • Exec_commands:
      • uses os.popen to run the array of commands
      • checks the build results in build log
      • zips results
      • sends emails
      • copies results to mounted folder
    • Generate_summary_page and save_summary_page called by main after everything else finishes
      • Creates html build report by getting build info from the captured log output from each component build
      • commits build report to svn