PARALLAX

codepipeline

Create or delete AWS CodePipelines

Collection: community.aws

Full Name: community.aws.codepipeline

Synopsis

Create or delete AWS CodePipelines

Parameters

NameTypeRequiredDefaultDescription
access_keystr
artifact_storedictyes
aws_ca_bundlepath
aws_configdict
debug_botocore_endpoint_logsboolfalse
endpoint_urlstr
namestryes
profilestr
regionstr
role_arnstryes
secret_keystr
session_tokenstr
stageslistyes
statestrpresent
validate_certsbooltrue
versionint

Example

yaml
# Example for creating a pipeline for continuous deploy of Github code to an ECS cluster (container)
- name: Create or delete AWS CodePipelines
  community.aws.codepipeline:
    name: my_deploy_pipeline
    role_arn: arn:aws:iam::123456:role/AWS-CodePipeline-Service
    artifact_store:
        type: S3
        location: my_s3_codepipline_bucket
    stages:
        - name: Get_source
          actions:
            - name: Git_pull
              actionTypeId:
                category: Source
                owner: ThirdParty
                provider: GitHub
                version: '1'
              outputArtifacts:
                - {name: my-app-source}
              configuration:
                Owner: mediapeers
                Repo: my_gh_repo
                PollForSourceChanges: 'true'
                Branch: master
                # Generate token like this:
                # https://docs.aws.amazon.com/codepipeline/latest/userguide/GitHub-rotate-personal-token-CLI.html
                # GH Link: https://github.com/settings/tokens
                OAuthToken: 'abc123def456'
              runOrder: 1
        - name: Build
          actions:
            - name: CodeBuild
              actionTypeId:
                category: Build
                owner: AWS
                provider: CodeBuild
                version: '1'
              inputArtifacts:
                - {name: my-app-source}
              outputArtifacts:
                - {name: my-app-build}
              configuration:
                # A project with that name needs to be setup on AWS CodeBuild already (use code_build module).
                ProjectName: codebuild-project-name
              runOrder: 1
        - name: ECS_deploy
          actions:
            - name: ECS_deploy
              actionTypeId:
                category: Deploy
                owner: AWS
                provider: ECS
                version: '1'
              inputArtifacts:
                - {name: vod-api-app-build}
              configuration:
                # an ECS cluster with that name needs to be setup on AWS ECS already (use ecs_cluster and ecs_service module)
                ClusterName: ecs-cluster-name
                ServiceName: ecs-cluster-service-name
                FileName: imagedefinitions.json
    region: us-east-1
    state: present
Search
    ↑ ↓ move↵ openesc close