Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

cloudreach/container-base-terratest

Repository files navigation

Terratest - Automated Testing

Built with Mage

Overview

This repo is borne from the work originally put together by @jlucktay, refactored into an easily consumable accelerator to kickstart Terraform testing leveraged by Terratest.

Description

This repository is a central store for Mage targets/funcs to keep things DRY.

The Dockerfile for our module-test CI/automated test image is also kept here.

Local Development

The docker-build.sh and docker-run.sh scripts in the /scripts/ directory of this repo can get you up and running with a local copy of the Docker image.

The aforementioned scripts will build and execute an image tagged with local-dev. In contrast, the pipeline on Azure DevOps runs against the tag latest from the container registry.

Branching / CI Model

This repository has CI in effect on the master branch, and will not allow commits to be pushed directly.

If you are starting to work on a new feature or piece of functionality, you should create a new branch. Once you are happy with your new branch and wish to have it tested, create a pull request on GitHub into the master branch. All such PRs will be validated with the Azure Pipelines build definition linked from the badge above.

The PR validation build will:

  1. build the Docker image
  2. execute some Terraform validation tests within a container based on said image
  3. if successful on both counts, push the new image to the container registry on Azure

The PR validation builds for the various Terraform modules pull the module-test image tagged as latest.

The module-test:latest image/tag will reflect the contents of the master branch of this repository

About

Base code to compile Terratest dependencies and build the container

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published