Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
fe043d9
if price is 0, exclude from dataset (#174)
Shashwatpathak05 Nov 14, 2024
bc2f785
removed incorrect files (#176)
Shashwatpathak05 Nov 14, 2024
80d1608
update gitref for sqs
RoguedBear Nov 28, 2024
bed4978
add gitref for sns
RoguedBear Nov 28, 2024
49d0b4d
Revert "add gitref for sns"
RoguedBear Dec 2, 2024
bc27ae2
Revert "update gitref for sqs"
RoguedBear Dec 2, 2024
8b4059d
Alb aws facets yaml (#208)
aditya-facets Jan 10, 2025
36ad862
[S73] Feature: Per-Instance Artifactories Module (#210)
pramodh-ayyappan Jan 16, 2025
fdb3960
add output for custom iam policy (#212)
sanmesh-kakade Jan 17, 2025
4ab18e9
Fix mismatches in sample for flavor version (#211)
anujhydrabadi Jan 17, 2025
4cc7ce2
Revert "[S73] Feature: Per-Instance Artifactories Module (#210)" (#214)
pramodh-ayyappan Jan 17, 2025
961abb1
Updated azure roles regex (#217)
aditya-facets Jan 17, 2025
7deb484
Aws lambda (#218)
aditya-facets Jan 24, 2025
ea8a12d
if price is 0, exclude from dataset (#174)
Shashwatpathak05 Nov 14, 2024
8791340
removed incorrect files (#176)
Shashwatpathak05 Nov 14, 2024
728cba9
update gitref for sqs
RoguedBear Nov 28, 2024
b9eee37
add gitref for sns
RoguedBear Nov 28, 2024
49deaf8
Revert "add gitref for sns"
RoguedBear Dec 2, 2024
7239881
Revert "update gitref for sqs"
RoguedBear Dec 2, 2024
6ac403a
[S73] Feature: Per-Instance Artifactories Module (#210)
pramodh-ayyappan Jan 16, 2025
aaa659f
Revert "[S73] Feature: Per-Instance Artifactories Module (#210)" (#214)
pramodh-ayyappan Jan 17, 2025
83a1fdc
Updated azure roles regex (#217)
aditya-facets Jan 17, 2025
963df6b
Aws lambda (#218)
aditya-facets Jan 24, 2025
602ecbd
feat: Add ecs_service intent for managing containers in Amazon ECS
Jan 27, 2025
58c82ac
Helm repo pattern fix (#220)
ShrinidhiFCTS23 Jan 27, 2025
d9b69ba
s3 lifecycle rules and sns s3 trigger filter (#221)
unni-facets Jan 27, 2025
947f6ab
update disruption options visibility (#223)
sanmesh-kakade Jan 29, 2025
7b81ecc
Vault Terraform module (#227)
ishaankalra Jan 29, 2025
b53175c
[S73] Feature: Per-Instance Artifactories Module (#215)
pramodh-ayyappan Jan 29, 2025
dd369be
Artifactories Terraform Module (#228)
ishaankalra Jan 29, 2025
401a83f
Create facets.yaml
rr0hit Jan 30, 2025
0db7539
Update intents.index.json
rr0hit Jan 30, 2025
3d79db0
Added icon url for intents (#226)
MahtoHimanshu Feb 3, 2025
94f377c
Add 0.2 version of database users part 2 (#229)
sanmesh-kakade Feb 3, 2025
33958a9
updated to work with github app
ishaankalra Feb 3, 2025
962f365
updated secrets in github cherry-pick.yml
ishaankalra Feb 3, 2025
2d0519c
Innersourcing workflows (#230)
ishaankalra Feb 3, 2025
6d590ca
Innersourcing workflows update (#231)
ishaankalra Feb 3, 2025
40a6e8e
Merge branch 'develop' of github.com:Facets-cloud/facets-modules into…
ShrinidhiFCTS23 Feb 4, 2025
4fd7739
External postgres module (#235)
rr0hit Feb 5, 2025
6fae5ae
Preview modules (#239)
ishaankalra Feb 6, 2025
8a6ce02
Merge branch 'develop' of github.com:Facets-cloud/facets-modules into…
ShrinidhiFCTS23 Feb 6, 2025
4969b6b
if price is 0, exclude from dataset (#174)
Shashwatpathak05 Nov 14, 2024
0106d87
removed incorrect files (#176)
Shashwatpathak05 Nov 14, 2024
dca5c1f
update gitref for sqs
RoguedBear Nov 28, 2024
716914d
add gitref for sns
RoguedBear Nov 28, 2024
39a5ecc
Revert "add gitref for sns"
RoguedBear Dec 2, 2024
40f9b09
Revert "update gitref for sqs"
RoguedBear Dec 2, 2024
ddc8170
[S73] Feature: Per-Instance Artifactories Module (#210)
pramodh-ayyappan Jan 16, 2025
3d5bb07
Revert "[S73] Feature: Per-Instance Artifactories Module (#210)" (#214)
pramodh-ayyappan Jan 17, 2025
ab6de9f
update disruption options visibility (#223)
sanmesh-kakade Jan 29, 2025
8f9eae6
Vault Terraform module (#227)
ishaankalra Jan 29, 2025
9446bc2
[S73] Feature: Per-Instance Artifactories Module (#215)
pramodh-ayyappan Jan 29, 2025
a3d575a
Artifactories Terraform Module (#228)
ishaankalra Jan 29, 2025
1d6be18
Create facets.yaml
rr0hit Jan 30, 2025
5db4ece
Update intents.index.json
rr0hit Jan 30, 2025
1e48dd2
Added icon url for intents (#226)
MahtoHimanshu Feb 3, 2025
bf7cfe0
Add 0.2 version of database users part 2 (#229)
sanmesh-kakade Feb 3, 2025
a344fb3
updated to work with github app
ishaankalra Feb 3, 2025
4d65a59
updated secrets in github cherry-pick.yml
ishaankalra Feb 3, 2025
ced0940
Innersourcing workflows (#230)
ishaankalra Feb 3, 2025
e971676
Innersourcing workflows update (#231)
ishaankalra Feb 3, 2025
652d3f8
External postgres module (#235)
rr0hit Feb 5, 2025
aff5a60
Preview modules (#239)
ishaankalra Feb 6, 2025
d3c6b39
simplisamrt fixes
pramodh-ayyappan Feb 6, 2025
35109f8
simplismart helm fix
pramodh-ayyappan Feb 6, 2025
ea76ed6
moving _ before - which causes issues
pramodh-ayyappan Feb 6, 2025
3e33a56
add kubernetes cluster output in intent
sanmesh-kakade Feb 6, 2025
b3e8be7
resolved conflicts
ShrinidhiFCTS23 Feb 6, 2025
cf08282
Preview modules workflow changes (#243)
ishaankalra Feb 6, 2025
8750e0c
Merge pull request #244 from Facets-cloud/kubernetes-output
sanmesh-kakade Feb 6, 2025
7dd9cab
updated echo messages
ishaankalra Feb 6, 2025
bff0c74
Input output modelling part 1 (#233)
ShrinidhiFCTS23 Feb 6, 2025
d8ec748
added github workflows for validate bootrapper (#245)
ishaankalra Feb 6, 2025
f0405b7
Validate bootstraper (#246)
ishaankalra Feb 6, 2025
bd4fb10
using workflow_runs conclusion
ishaankalra Feb 6, 2025
5aa95a5
updated validate-bootstrapper.yml message
ishaankalra Feb 6, 2025
44f09e4
Added new icons for the intents (#240)
MahtoHimanshu Feb 7, 2025
65acacb
Add Azure Service Bus facets yaml and output type
RoguedBear Feb 7, 2025
47873d9
chore(azure_service_bus): mark default for disabled as true
RoguedBear Feb 7, 2025
b6e54ad
feat(azure_service_bus): add subscription configuration options in fa…
RoguedBear Feb 7, 2025
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
18 changes: 10 additions & 8 deletions .github/workflows/cherry-pick.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
name: cherry-pick

on:
issue_comment:
types: [created]

permissions:
contents: write
pull-requests: write
actions: write

jobs:
cherry-pick:
if: github.event.issue.pull_request && contains(github.event.comment.body, '/cherry-pick')
runs-on: iac-arc
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.GH_APP_ID }}
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
- name: Check team membership
uses: tspascoal/get-user-teams-membership@v2
id: actorTeams
with:
username: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.PAT }}
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
- name: Check if user belongs to team
run: |
if [[ "${{ steps.actorTeams.outputs.teams }}" == *"infra-release-managers"* ]]; then
Expand All @@ -44,7 +46,7 @@ jobs:
echo "Branch $branch"
echo "branch=$branch" >> $GITHUB_OUTPUT
- name: Authenticate GH CLI
run: gh auth login --with-token <<< ${{ secrets.PAT }}
run: gh auth login --with-token <<< ${{ steps.app-token.outputs.token }}

- name: Check if PR is merged
id: check
Expand All @@ -63,7 +65,7 @@ jobs:
exit 1
fi
env:
GH_TOKEN: ${{ secrets.PAT }}
GH_TOKEN: ${{ steps.app-token.outputs.token }}

- name: Set Git identity
run: |
Expand All @@ -79,15 +81,15 @@ jobs:
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.PAT }}
github_token: ${{ steps.app-token.outputs.token }}
branch: ${{ steps.input.outputs.branch }}
env:
GIT_COMMITTER_NAME: ${{ github.actor }}
GIT_COMMITTER_EMAIL: ${{ github.actor }}@users.noreply.github.com
- name: Add comment to PR
uses: actions/github-script@v3
with:
github-token: ${{secrets.PAT}}
github-token: ${{ steps.app-token.outputs.token }}
script: |
const issueComment = `Commit cherry-picked to ref [${{ steps.input.outputs.branch }}](https://github.com/${{ github.repository }}/tree/${{ steps.input.outputs.branch }}).`
github.issues.createComment({
Expand Down
101 changes: 101 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: Preview Module

on:
workflow_dispatch:
inputs:
intent:
description: 'Intent for the module'
required: true
flavor:
description: 'Flavor for the module'
required: true
version:
description: 'Version of the module'
required: true
url:
description: 'Control Plane URL'
required: false
username:
description: 'Control Plane Username'
required: false
token:
description: 'Control Plane Token'
required: false

jobs:
run-command:
runs-on: iac-arc

steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.ref }}

- name: Create control planes JSON file
id: set_control_planes
run: |
set -e
set -o pipefail
JSON_CONTENT='${{ vars.DEV_CONTROL_PLANES }}'
echo "$JSON_CONTENT" > control_planes.json

- name: Get module directory path
id: get_module_path
run: |
set -e
MODULE_DIR_PATH=$(jq -r ".[] | select(.intent == \"${{ github.event.inputs.intent }}\" and .flavor == \"${{ github.event.inputs.flavor }}\" and .version == \"${{ github.event.inputs.version }}\") | .relativePath" index.json)

# Check if MODULE_DIR_PATH is found
if [ -z "$MODULE_DIR_PATH" ]; then
echo "Error: Module directory path not found for the intent ${{ github.event.inputs.intent }} flavor ${{ github.event.inputs.flavor }} version ${{ github.event.inputs.version }}."
exit 1
fi

echo "MODULE_DIR_PATH=$MODULE_DIR_PATH" >> $GITHUB_ENV
echo "MODULE_DIR_PATH=$MODULE_DIR_PATH"

- name: Update facets.yaml version
run: |
set -e
set -o pipefail
GITHUB_REF="${{ github.ref }}"
FACETS_YAML_PATH="$MODULE_DIR_PATH/facets.yaml"
# Check if facets.yaml exists
if [ ! -f "$FACETS_YAML_PATH" ]; then
echo "Error: facets.yaml not found in the module directory."
exit 1
fi

echo "Updating version in $FACETS_YAML_PATH"
# Append the GitHub ref to the version in facets.yaml
yq eval -i ".version += \"-${GITHUB_REF}\"" "$FACETS_YAML_PATH"
yq eval -i ".sample.version += \"-${GITHUB_REF}\"" "$FACETS_YAML_PATH"

- name: Execute command
env:
ALL_SECRETS: ${{ toJson(secrets) }}
run: |
set -e
set -o pipefail
if [ -n "${{ github.event.inputs.url }}" ] && [ -n "${{ github.event.inputs.username }}" ] && [ -n "${{ github.event.inputs.token }}" ]; then
# Use provided URL, Username, and Token
URL="${{ github.event.inputs.url }}"
USERNAME="${{ github.event.inputs.username }}"
TOKEN="${{ github.event.inputs.token }}"
echo "Processing specified control plane with provided token."
curl -s https://facets-cloud.github.io/facets-schemas/scripts/module_register.sh | bash -s -- -c "$URL" -u "$USERNAME" -t "$TOKEN" -p "$MODULE_DIR_PATH"
else
echo "Processing all control planes"
for key in $(jq -r 'keys[]' control_planes.json); do
URL=$(jq -r ".$key.URL" control_planes.json)
USERNAME=$(jq -r ".$key.Username" control_planes.json)
TOKEN_REF_NAME=$(jq -r ".$key.TokenRef" control_planes.json)
TOKEN=$(echo "$ALL_SECRETS" | jq -r ".\"$TOKEN_REF_NAME\"")
echo "Registering to control plane $key"
curl -s https://facets-cloud.github.io/facets-schemas/scripts/module_register.sh | bash -s -- -c "$URL" -u "$USERNAME" -t "$TOKEN" -p "$MODULE_DIR_PATH"
done

# Wait for all background processes and check for errors
wait
fi
44 changes: 44 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Publish Modules to S3

on:
push:
branches:
- master
workflow_dispatch:

concurrency:
group: publish-module-zips

jobs:
publish:
runs-on: iac-arc

steps:
- name: Set BRANCH_NAME variable
run: echo "BRANCH_NAME=${{ github.ref }}" >> $GITHUB_ENV

- name: Checkout repository
uses: actions/checkout@v2
with:
ref: ${{ env.BRANCH_NAME }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r .github/workflows/zip_modules/requirements.txt

- name: Generate Module Zips
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
S3_BUCKET_NAME: ${{ vars.FACETS_MODULES_BUCKET_NAME }}
run: python .github/workflows/zip_modules/zip_modules.py

- name: Post Success to a Slack channel
id: slack
uses: slackapi/[email protected]
with:
channel-id: ${{ secrets.CHANNEL_ID }}
slack-message: 'Facets Modules have been successfully synced! <https://github.com/${{ github.repository }}/tree/${{ github.sha }}|View Commit>'
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_TOKEN }}
49 changes: 49 additions & 0 deletions .github/workflows/validate-bootstrapper.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import requests
import os
from requests.auth import HTTPBasicAuth

# Configuration
url = "https://root.console.facets.cloud/cc-ui/v1/modules/bootstrap"

def post(url, username, password, payload):
"""Makes a POST API call and returns the response data or prints an error if the response is non-200."""
try:
response = requests.post(url, auth=HTTPBasicAuth(username, password), json=payload)

# Check if the response status code is not 200
if response.status_code != 200:
print(f"Error: Received status code {response.status_code}.")
print("Response message:", response.text) # Print the error message from the response
return None

return response.json()
except requests.exceptions.RequestException as e:
print(f"Error during API call: {e}")
return None

def check_for_errors(data):
"""Checks for errors in the data and prints the full response body if errors exist."""
error_found = False
for key, value in data.items():
if isinstance(value, list) and value:
print("Errors found in bootstrap modules:")
print(data) # Print the full response body
error_found = True
break # Break the loop after printing the response

if not error_found:
print("No errors found.")

if __name__ == "__main__":
# Take username and password from environment variables
USERNAME = os.getenv('ROOT_USER') # Get the username from environment variable
PASSWORD = os.getenv('ROOT_TOKEN') # Get the password from environment variable

# Define the payload you want to send with the POST request
payload = {
# Add your key-value pairs here as needed for the API
}

data = post(url, USERNAME, PASSWORD, payload)
if data:
check_for_errors(data)
52 changes: 52 additions & 0 deletions .github/workflows/validate-bootstrapper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Validate Bootstrapper

on:
workflow_dispatch:
workflow_run:
workflows: ["Publish Modules to S3"]
types:
- completed

concurrency:
group: validate-bootstrapper

jobs:
validate-bootstrapper:
runs-on: iac-arc
if: ${{ github.event.workflow_run.conclusion == 'success' }}
outputs:
script_output: ${{ steps.run.outputs.script_output }}
exit_status: ${{ steps.run.outputs.exit_status }}

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Run validate-bootstrapper script
id: run
env:
ROOT_USER: ${{ secrets.ROOT_USER }}
ROOT_TOKEN: ${{ secrets.ROOT_TOKEN }}
run: |
set +e
output=$(python .github/workflows/validate-bootstrapper.py)
exit_status=${PIPESTATUS[0]}
echo "script_output<<EOF" >> $GITHUB_OUTPUT
echo "$output" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
echo "exit_status=$exit_status" >> $GITHUB_OUTPUT
on-failure:
needs: validate-bootstrapper
runs-on: iac-arc
if: ${{ needs.validate-bootstrapper.outputs.exit_status != '0' }}
steps:
- name: Post Failure to a Slack channel
id: slack
uses: slackapi/[email protected]
with:
channel-id: ${{ secrets.CHANNEL_ID }}
slack-message: ':alert-siren:Bootstrap Module Failed: ${{needs.validate-bootstrapper.outputs.script_output}}'
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_TOKEN }}
- name: Exiting with error
run: exit 1
2 changes: 2 additions & 0 deletions .github/workflows/zip_modules/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
boto3
pyyaml
Loading