-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[INFOPLAT-1427] Action to deploy Protobuf/AVRO schemas to Confluent S…
…chema Registry (#850) * beholder pulumi schema deploy * pin image for testing * shell * set up env for job * set up env * tighter env per command * fix secrets * fix acc id * remove aws setup * fmt * shell * again * minimal action * full pipeline * image, preview * fix command * add env and path * kafka keys * mount volume * remove comment * fix bucket name * remove pulumi setup * changeset * remove preview flag * point action to qa-latest * shorter tag
- Loading branch information
Showing
5 changed files
with
96 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"beholder-pulumi-deploy-schema": major | ||
--- | ||
|
||
Schema deployment to Schema Registry using RTSP's in-house tool |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# beholder-pulumi-deploy-schema | ||
|
||
> Validates and deploys a Protobuf or AVRO schema to Confluent Schema Registry |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: beholder-pulumi-deploy-schema | ||
description: | ||
"Validates and deploys a Protobuf or AVRO schema to Confluent Schema Registry" | ||
|
||
inputs: | ||
pulumi_s3_bucket: | ||
description: "S3 bucket name to use as Pulumi backend" | ||
required: true | ||
deploy_environment: | ||
description: "Deployment environment" | ||
required: true | ||
deploy_config_path: | ||
description: "Path to the deploy config YAML file" | ||
required: true | ||
aws_account_id: | ||
description: "AWS Account ID" | ||
required: false | ||
default: "654654554896" | ||
aws_region: | ||
description: "AWS region" | ||
required: false | ||
default: "us-west-2" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: actions/[email protected] | ||
|
||
- name: Docker login to ECR | ||
shell: bash | ||
run: | | ||
aws ecr get-login-password --region ${{ inputs.aws_region }} \ | ||
| docker login --username AWS --password-stdin \ | ||
${{ inputs.aws_account_id }}.dkr.ecr.${{ inputs.aws_region }}.amazonaws.com | ||
- name: Pull container image | ||
shell: bash | ||
run: | | ||
docker pull ${{ inputs.aws_account_id }}.dkr.ecr.${{ inputs.aws_region }}.amazonaws.com/atlas-beholder-pulumi:qa-latest | ||
docker tag ${{ inputs.aws_account_id }}.dkr.ecr.${{ inputs.aws_region }}.amazonaws.com/atlas-beholder-pulumi:qa-latest atlas-beholder-pulumi | ||
- name: Deploy schema | ||
shell: bash | ||
run: | | ||
docker run \ | ||
-v "$PWD:/workspace" \ | ||
-w /workspace \ | ||
-e AWS_REGION=${{ inputs.aws_region }} \ | ||
-e AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} \ | ||
-e AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} \ | ||
-e AWS_SESSION_TOKEN=${AWS_SESSION_TOKEN} \ | ||
-e DEPLOY_ENVIRONMENT=${{ inputs.deploy_environment }} \ | ||
-e DEPLOY_CONFIG_PATH=${{ inputs.deploy_config_path }} \ | ||
-e PULUMI_S3_BUCKET=${{ inputs.pulumi_s3_bucket }} \ | ||
-e CONFLUENT_CLOUD_API_KEY=${CONFLUENT_CLOUD_API_KEY} \ | ||
-e CONFLUENT_CLOUD_API_SECRET=${CONFLUENT_CLOUD_API_SECRET} \ | ||
-e SCHEMA_REGISTRY_KEY=${SCHEMA_REGISTRY_KEY} \ | ||
-e SCHEMA_REGISTRY_SECRET=${SCHEMA_REGISTRY_SECRET} \ | ||
-e PULUMI_CONFIG_PASSPHRASE=${PULUMI_CONFIG_PASSPHRASE} \ | ||
-e KAFKA_REST_KEY=${KAFKA_REST_KEY} \ | ||
-e KAFKA_REST_SECRET=${KAFKA_REST_SECRET} \ | ||
atlas-beholder-pulumi beholder-pulumi deploy-schemas | ||
env: | ||
CONFLUENT_CLOUD_API_KEY: ${{ env.CONFLUENT_CLOUD_API_KEY }} | ||
CONFLUENT_CLOUD_API_SECRET: ${{ env.CONFLUENT_CLOUD_API_SECRET }} | ||
SCHEMA_REGISTRY_KEY: ${{ env.SCHEMA_REGISTRY_KEY }} | ||
SCHEMA_REGISTRY_SECRET: ${{ env.SCHEMA_REGISTRY_SECRET }} | ||
PULUMI_CONFIG_PASSPHRASE: ${{ env.PULUMI_CONFIG_PASSPHRASE }} | ||
KAFKA_REST_KEY: ${{ env.KAFKA_REST_KEY }} | ||
KAFKA_REST_SECRET: ${{ env.KAFKA_REST_SECRET }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "beholder-pulumi-deploy-schema", | ||
"version": "0.0.0", | ||
"description": "", | ||
"private": true, | ||
"scripts": {}, | ||
"author": "@smartcontractkit", | ||
"license": "MIT", | ||
"dependencies": {}, | ||
"repository": "https://github.com/smartcontractkit/.github" | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "beholder-pulumi-deploy-schema", | ||
"$schema": "../../node_modules/nx/schemas/project-schema.json", | ||
"projectType": "application", | ||
"sourceRoot": "actions/beholder-pulumi-deploy-schema", | ||
"targets": {} | ||
} |