Skip to content
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

Add onboarding resources for GitHub and bitbucket integration templates #80

Merged
merged 21 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/upload-integration-templates.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Upload integration templates
on:
push:
branches:
- main
paths:
# we only want to run this workflow when changes are made to the integrations folder
- integrations/**

# when running the workflow manually upload to stg bucket
workflow_dispatch:
inputs:
bucket_environment:
description: 'Environment to deploy to, either stg or prod'
required: true
default: 'stg-01'
options:
- 'stg-01'

jobs:
upload-templates:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Configure AWS Credentials 🔒
id: aws-credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: resolve the aws s3 bucket name
id: resolve-bucket-name
run: |
if [[ "${{ github.event_name }}" == "push" ]]; then
echo "BUCKET_NAME=advance-templates" >> $GITHUB_OUTPUT
else
echo "BUCKET_NAME=advance-templates-stg-01" >> $GITHUB_OUTPUT
fi
- name: Upload specifications to s3
run: aws s3 cp integrations/ s3://${{ steps.resolve-bucket-name.outputs.BUCKET_NAME }}/integrations/ --recursive
170 changes: 170 additions & 0 deletions integrations/bitbucket/actions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
[
{
"identifier": "bitbucket_scaffold_service",
"title": "Scaffold Service",
"icon": "Microservice",
"userInputs": {
"properties": {
"service_name": {
"title": "Service Name",
"description": "The new service's name",
"type": "string"
},
"bitbucket_workspace_name": {
"title": "Bitbucket Workspace Name",
"description": "The workspace to create the new service in",
"type": "string"
},
"bitbucket_project_key": {
"title": "Bitbucket Project Key",
"description": "Bitbucket project key symbol",
"type": "string"
}
},
"required": [
"service_name",
"bitbucket_workspace_name",
"bitbucket_project_key"
],
"order": [
"service_name",
"bitbucket_workspace_name",
"bitbucket_project_key"
]
},
"invocationMethod": {
"type": "WEBHOOK",
"agent": true,
"url": "https://example.com",
"synchronized": false,
"method": "POST"
},
"trigger": "CREATE",
"description": "To complete setting up this action, please refer to the following guide: [Setup scaffold service action ->](https://docs.getport.io/guides-and-tutorials/scaffold-a-new-service?git-provider=bitbucket)",
"requiredApproval": false,
"blueprint": "service"
},
{
"identifier": "bitbucket_send_scorecard_reminder",
"icon": "Slack",
"title": "Send scorecard reminder",
"userInputs": {
"properties": {},
"required": []
},
"invocationMethod": {
"type": "WEBHOOK",
"agent": true,
"url": "https://example.com",
"synchronized": false,
"method": "POST"
},
"trigger": "CREATE",
"description": "To complete setting up this action, please refer to the following guide: [Setup send scorecard reminder action ->](https://docs.getport.io/guides-and-tutorials/setup-slack-reminders?git-provider=bitbucket)",
"requiredApproval": false,
"blueprint": "service"
},
{
"identifier": "bitbucket_enrich_service",
"title": "Enrich service",
"icon": "Git",
"userInputs": {
"properties": {
"type": {
"icon": "BlankPage",
"title": "Type",
"description": "The service's type",
"type": "string",
"enum": [
"backend",
"frontend",
"integration"
],
"enumColors": {
"backend": "lightGray",
"frontend": "lightGray",
"integration": "lightGray"
}
},
"lifecycle": {
"icon": "CICD",
"title": "Lifecycle",
"description": "The service's lifecycle state",
"type": "string",
"enum": [
"Production",
"Experimental",
"Deprecated"
],
"enumColors": {
"Production": "green",
"Experimental": "orange",
"Deprecated": "red"
}
}
},
"required": [],
"order": [
"type",
"lifecycle"
]
},
"invocationMethod": {
"type": "WEBHOOK",
"agent": true,
"url": "https://example.com",
"synchronized": false,
"method": "POST"
},
"trigger": "DAY-2",
"description": "To complete setting up this action, please refer to the following guide: [Setup enrich service action ->](https://docs.getport.io/guides-and-tutorials/let-developers-enrich-services-using-gitops?git-provider=bitbucket)",
"requiredApproval": false,
"blueprint": "service"
},
{
"identifier": "bitbucket_create_s3_bucket",
"icon": "S3",
"title": "Create s3 bucket",
"userInputs": {
"properties": {
"name": {
"title": "Name",
"description": "The name of the cloud resource",
"type": "string"
},
"visibility": {
"title": "Visibility",
"description": "The resource's public/private visibility",
"type": "string",
"enum": [
"public",
"private"
],
"enumColors": {
"public": "green",
"private": "red"
}
}
},
"required": [
"name",
"visibility"
],
"order": [
"name",
"visibility"
]
},
"invocationMethod": {
"type": "WEBHOOK",
"agent": true,
"url": "https://example.com",
"synchronized": false,
"method": "POST"
},
"trigger": "DAY-2",
"description": "To complete setting up this action, please refer to the following guide: [Setup create s3 bucket ->](https://docs.getport.io/guides-and-tutorials/create-cloud-resource-using-iac?git-provider=bitbucket)",
"requiredApproval": false,
"blueprint": "service"
}
]
57 changes: 57 additions & 0 deletions integrations/bitbucket/blueprints.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
[
{
"identifier": "service",
"title": "Service",
"icon": "BitBucket",
"schema": {
"properties": {
"readme": {
"title": "README",
"type": "string",
"format": "markdown",
"icon": "Book"
},
"url": {
"title": "URL",
"format": "url",
"type": "string",
"icon": "Link"
},
"language": {
"type": "string",
"title": "Language",
"icon": "Git"
},
"slack": {
"icon": "Slack",
"type": "string",
"title": "Slack",
"format": "url"
},
"tier": {
"title": "Tier",
"type": "string",
"description": "How mission-critical the service is",
"enum": [
"Mission Critical",
"Customer Facing",
"Internal Service",
"Other"
],
"enumColors": {
"Mission Critical": "turquoise",
"Customer Facing": "green",
"Internal Service": "darkGray",
"Other": "yellow"
},
"icon": "DefaultProperty"
}
},
"required": []
},
"mirrorProperties": {},
"calculationProperties": {},
"aggregationProperties": {},
"relations": {}
}
]
Loading