This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to ECS Fargate and track deployment in DynamoDB | |
on: | |
workflow_call: | |
inputs: | |
# pass in environment through manual trigger, if not passed in, default to 'dev' | |
env: | |
required: true | |
type: string | |
default: 'dev' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and test workflow | |
on: | |
workflow_call: | |
inputs: | |
# pass in environment through manual trigger, if not passed in, default to 'dev' | |
env: | |
required: true | |
type: string | |
default: 'dev' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "aws_ecs_task_definition" "app" { | |
family = local.service_name | |
network_mode = "awsvpc" | |
cpu = local.container_definition.0.cpu | |
memory = local.container_definition.0.memory | |
requires_compatibilities = ["FARGATE"] | |
container_definitions = jsonencode(local.container_definition) | |
execution_role_arn = aws_iam_role.task_execution_role.arn | |
task_role_arn = aws_iam_role.task_role.arn |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider "github" { | |
token = var.pipeline_token | |
owner = "your-github-account" | |
} | |
...... | |
resource "github_actions_environment_secret" "s3_bucket_name" { | |
repository = var.deploy_repo | |
environment = var.deploy_env |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Terraform Deployment" | |
on: | |
workflow_call: | |
inputs: | |
# working-directory is added to specify "terraform" directory in project source code as that's where the terraform files live. | |
working-directory: | |
required: false | |
type: string | |
default: './terraform' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider "aws" { | |
region = "us-east-1" | |
} | |
# for github secrets creation | |
provider "github" { | |
token = var.pipeline_token | |
owner = "your-github-account" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow runs maven release to publish artifact to GitHub Packages | |
name: Release workflow to run maven release to publish release version to GitHub Packages | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- release/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This CD workflow pulls the docker image from ECR and deploys it to the environment specified by the manual trigger | |
name: CD workflow for deploying microservice to ECS Fargate | |
on: | |
workflow_dispatch: | |
inputs: | |
environment: | |
description: 'Environment to run the workflow against' | |
type: environment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This CI workflow can be triggered by PR creation or code push in PR, or manual trigger (after maven release) | |
name: CI workflow for building, testing microservice, and publishing image to ECR | |
on: | |
workflow_dispatch: | |
inputs: | |
environment: | |
description: 'Environment to run the workflow against' | |
type: environment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release workflow for Spring Boot microservices or shared libraries | |
on: | |
workflow_call: | |
inputs: | |
# working-directory is added to accommodate monorepo. For multi repo, defaults to '.', current directory | |
working-directory: | |
required: false | |
type: string | |
default: '.' |