Code Monkey home page Code Monkey logo

terraform-aws-codecommit-cicd's Introduction

terraform-aws-codecommit-cicd

Terraform module that stands up a new AWS CodeCommit repository integrated with AWS CodePipeline. The CodePipeline consists of three stages:

  1. A Source stage that is fed by the repository.
  2. A Test stage that uses the artifacts of the Source and executes commands in buildspec_test.yml.
  3. A Package stage that uses the artrifacts of the Test stage and excutes commands in buildspec.yml.

Usage

module "codecommit-cicd" {
    source                 = "git::https://github.com/slalompdx/terraform-aws-codecommit-cicd.git?ref=master"
    repo_name                 = "new-test-repo"              # Required
    organization_name         = "slalom"                     # Required
    repo_default_branch       = "master"                     # Default value
    aws_region                = "us-west-2"                  # Default value
    char_delimiter            = "-"                          # Default value
    environment               = "dev"                        # Default value
    build_timeout             = "5"                          # Default value
    build_compute_type        = "BUILD_GENERAL1_SMALL"       # Default value
    build_image               = "aws/codebuild/nodejs:6.3.1" # Default value
    build_privileged_override = "false"                      # Default value
    test_buildspec            = "buildspec_test.yml"         # Default value
    package_buildspec         = "buildspec.yml"              # Default value
    force_artifact_destroy    = "false"                      # Default value
}

CodeCommit Note

New repositories are not created with their default branch. Therefore, once the module has ran you must clone the repository, add a file, and then push to origin/<repo_default_branch> to initialize the repository.

Your command line execution might look something like this:

$>terraform apply
$>git clone https://git-codecommit.us-west-2.amazonaws.com/v1/repos/slalom-devops
$>cd slalom-devops
$>echo 'hello world' > touch.txt
$>git commit -a -m 'init master'
$>git push -u origin master

terraform-aws-codecommit-cicd's People

Contributors

kylegalbraith avatar jackdanger avatar c0sco avatar joebowbeer avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.