-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[INFOPLAT-1427] Action to deploy Protobuf/AVRO schemas to Confluent Schema Registry #850
Merged
Merged
Changes from 16 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
bd83dd4
beholder pulumi schema deploy
nanchano eda1aba
pin image for testing
nanchano 911678f
shell
nanchano 6628661
set up env for job
nanchano 20f3628
set up env
nanchano 50e5938
tighter env per command
nanchano 28e958d
fix secrets
nanchano ded5273
fix acc id
nanchano 52208c1
remove aws setup
nanchano 36318f3
fmt
nanchano 9d54655
shell
nanchano 00f7103
again
nanchano 56f57d8
minimal action
nanchano 5083c26
full pipeline
nanchano ba0e15d
image, preview
nanchano f00d4a9
fix command
nanchano 830da7b
add env and path
nanchano c74eb90
kafka keys
nanchano bdc2fb0
mount volume
nanchano 163f1d9
remove comment
nanchano 1c63714
fix bucket name
nanchano c5cd318
remove pulumi setup
nanchano fe590e3
changeset
nanchano dec69f1
remove preview flag
nanchano a23294b
point action to qa-latest
nanchano 1441411
shorter tag
nanchano d99a845
Merge branch 'main' into INFOPLAT-1427/action
nanchano File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,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,62 @@ | ||
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 | ||
aws_account_id: | ||
description: "AWS Account ID" | ||
required: false | ||
default: "654654554896" # this is info platform sandbox. TBD: change to prod account once ready | ||
aws_region: | ||
description: "AWS region" | ||
required: false | ||
default: "us-west-2" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: actions/[email protected] | ||
|
||
- name: Install Pulumi | ||
shell: bash | ||
run: | | ||
curl -fsSL https://get.pulumi.com | sh | ||
echo "$HOME/.pulumi/bin" >> $GITHUB_PATH | ||
|
||
- name: Pulumi Login | ||
shell: bash | ||
run: pulumi login s3://${{ inputs.pulumi_s3_bucket }} | ||
env: | ||
PULUMI_CONFIG_PASSPHRASE: ${{ env.PULUMI_CONFIG_PASSPHRASE }} | ||
|
||
- 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:latest | ||
|
||
- name: Deploy schema | ||
shell: bash | ||
run: | | ||
docker run \ | ||
-e CONFLUENT_CLOUD_API_KEY="${{ env.CONFLUENT_CLOUD_API_KEY }}" \ | ||
-e CONFLUENT_CLOUD_API_SECRET="${{ env.CONFLUENT_CLOUD_API_SECRET }}" \ | ||
-e SCHEMA_REGISTRY_KEY="${{ env.SCHEMA_REGISTRY_KEY }}" \ | ||
-e SCHEMA_REGISTRY_SECRET="${{ env.SCHEMA_REGISTRY_SECRET }}" \ | ||
-e PULUMI_CONFIG_PASSPHRASE="${{ env.PULUMI_CONFIG_PASSPHRASE }}" \ | ||
${{ inputs.aws_account_id }}.dkr.ecr.${{ inputs.aws_region }}.amazonaws.com/atlas-beholder-pulumi deploy-schemas --preview | ||
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 }} |
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", | ||
nanchano marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"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": {} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this change to prod account or the PR is not yet ready? (because is marked as open and not Draft)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will change soon, but thanks for flagging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update: we'll leave the sandbox account default to start off (since this is just an MVP), and clients may use the prod one if they so wish.