willardmr / sustainable_infrastructure_ci

Continuous integration plugin to enforce sustainability best practices on software infrastructure.
Apache License 2.0
5 stars 2 forks source link

sustainable_infrastructure_ci

Continuous integration plugin to enforce sustainability best practices on software infrastructure.

project chat

View the project brief

Getting started

Dependencies

  1. Terraform: https://developer.hashicorp.com/terraform/downloads
  2. Google Cloud: https://cloud.google.com/sdk/docs/install or https://snapcraft.io/google-cloud-cli

Installation

  1. Create a free GCP account: https://cloud.google.com/free
  2. Create a project in your account: https://cloud.google.com/resource-manager/docs/creating-managing-projects#creating_a_project
  3. Clone & cd:
    git clone https://github.com/AntoineSebert/sustainable_infrastructure_ci.git
    cd sustainable_infrastructure_ci

Running the tests

  1. Login to Google Cloud:
    gcloud auth login
    # if you encounter an authentication error at a later stages you can try instead:
    # gcloud auth application-default login
  2. Set your project name in the environment:
    export GOOGLE_PROJECT=your_gcp_project_name
  3. Run the test:
    cd core/gcp
    go test -v -tags gcp .