-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1247 from AletheiaFact/stage
Production Release
- Loading branch information
Showing
335 changed files
with
7,944 additions
and
3,926 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
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 |
---|---|---|
|
@@ -38,6 +38,8 @@ env: | |
NEXT_PUBLIC_RECAPTCHA_SITEKEY: ${{ secrets.RECAPTCHA_SITEKEY }} | ||
AGENTS_API_URL: ${{ secrets.DEVELOPMENT_AGENTS_API_URL }} | ||
OPENAI_API_KEY: ${{ secrets.DEVELOPMENT_OPENAI_API_KEY }} | ||
ZENVIA_API_URL: ${{ secrets.DEVELOPMENT_ZENVIA_API_URL }} | ||
ZENVIA_API_TOKEN: ${{ secrets.DEVELOPMENT_ZENVIA_API_URL }} | ||
|
||
jobs: | ||
setup-build-publish: | ||
|
@@ -71,6 +73,8 @@ jobs: | |
echo "NEXT_PUBLIC_ORY_SDK_URL=${{ secrets.ORY_SDK_URL }}" >> $GITHUB_ENV | ||
echo "AGENTS_API_URL=${{ secrets.PRODUCTION_AGENTS_API_URL }}" >> $GITHUB_ENV | ||
echo "OPENAI_API_KEY=${{ secrets.PRODUCTION_OPENAI_API_KEY }}" >> $GITHUB_ENV | ||
echo "ZENVIA_API_URL=${{ secrets.PRODUCTION_ZENVIA_API_URL }}" >> $GITHUB_ENV | ||
echo "ZENVIA_API_TOKEN=${{ secrets.PRODUCTION_ZENVIA_API_TOKEN }}" >> $GITHUB_ENV | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
|
@@ -86,48 +90,50 @@ jobs: | |
# Setting up config.yaml based on environment | ||
- name: Set config.yaml | ||
env: | ||
RECAPTCHA_SECRET: ${{ secrets.RECAPTCHA_SECRETKEY }} | ||
RECAPTCHA_SECRET: ${{ secrets.RECAPTCHA_SECRETKEY }} | ||
run: | | ||
sed -i "s/ENV/$ENVIRONMENT/g" config.$ENVIRONMENT.yaml | ||
sed -i "s%RECAPTCHA_SECRET%$RECAPTCHA_SECRET%g" config.$ENVIRONMENT.yaml | ||
sed -i "s%MONGODB_URI%$MONGODB_URI%g" config.$ENVIRONMENT.yaml | ||
sed -i "s%ORY_SDK_URL%$ORY_SDK_URL%g" config.$ENVIRONMENT.yaml | ||
sed -i "s%GITLAB_FEATURE_FLAG_URL%$GITLAB_FEATURE_FLAG_URL%g" config.$ENVIRONMENT.yaml | ||
sed -i "s%GITLAB_FEATURE_FLAG_INSTANCE_ID%$GITLAB_FEATURE_FLAG_INSTANCE_ID%g" config.$ENVIRONMENT.yaml | ||
sed -i "s/ORY_ACCESS_TOKEN/$ORY_ACCESS_TOKEN/g" config.$ENVIRONMENT.yaml | ||
sed -i "s/ALETHEIA_SCHEMA_ID/$ALETHEIA_SCHEMA_ID/g" config.$ENVIRONMENT.yaml | ||
sed -i "s%AWS_SDK_BUCKET%$AWS_SDK_BUCKET%g" config.$ENVIRONMENT.yaml | ||
sed -i "s%AWS_ACCESS_KEY_ID%$AWS_ACCESS_KEY_ID%g" config.$ENVIRONMENT.yaml | ||
sed -i "s%AWS_SECRET_ACCESS_KEY%$AWS_SECRET_ACCESS_KEY%g" config.$ENVIRONMENT.yaml | ||
sed -i "s%NOVU_API_KEY%$NOVU_API_KEY%g" config.$ENVIRONMENT.yaml | ||
sed -i "s%NOVU_APPLICATION_IDENTIFIER%$NOVU_APPLICATION_IDENTIFIER%g" config.$ENVIRONMENT.yaml | ||
sed -i "s%AGENTS_API_URL%$AGENTS_API_URL%g" config.$ENVIRONMENT.yaml | ||
sed -i "s%OPENAI_API_KEY%$OPENAI_API_KEY%g" config.$ENVIRONMENT.yaml | ||
sed -i "s/ENV/$ENVIRONMENT/g" config.$ENVIRONMENT.yaml | ||
sed -i "s%RECAPTCHA_SECRET%$RECAPTCHA_SECRET%g" config.$ENVIRONMENT.yaml | ||
sed -i "s%MONGODB_URI%$MONGODB_URI%g" config.$ENVIRONMENT.yaml | ||
sed -i "s%ORY_SDK_URL%$ORY_SDK_URL%g" config.$ENVIRONMENT.yaml | ||
sed -i "s%GITLAB_FEATURE_FLAG_URL%$GITLAB_FEATURE_FLAG_URL%g" config.$ENVIRONMENT.yaml | ||
sed -i "s%GITLAB_FEATURE_FLAG_INSTANCE_ID%$GITLAB_FEATURE_FLAG_INSTANCE_ID%g" config.$ENVIRONMENT.yaml | ||
sed -i "s/ORY_ACCESS_TOKEN/$ORY_ACCESS_TOKEN/g" config.$ENVIRONMENT.yaml | ||
sed -i "s/ALETHEIA_SCHEMA_ID/$ALETHEIA_SCHEMA_ID/g" config.$ENVIRONMENT.yaml | ||
sed -i "s%AWS_SDK_BUCKET%$AWS_SDK_BUCKET%g" config.$ENVIRONMENT.yaml | ||
sed -i "s%AWS_ACCESS_KEY_ID%$AWS_ACCESS_KEY_ID%g" config.$ENVIRONMENT.yaml | ||
sed -i "s%AWS_SECRET_ACCESS_KEY%$AWS_SECRET_ACCESS_KEY%g" config.$ENVIRONMENT.yaml | ||
sed -i "s%NOVU_API_KEY%$NOVU_API_KEY%g" config.$ENVIRONMENT.yaml | ||
sed -i "s%NOVU_APPLICATION_IDENTIFIER%$NOVU_APPLICATION_IDENTIFIER%g" config.$ENVIRONMENT.yaml | ||
sed -i "s%AGENTS_API_URL%$AGENTS_API_URL%g" config.$ENVIRONMENT.yaml | ||
sed -i "s%OPENAI_API_KEY%$OPENAI_API_KEY%g" config.$ENVIRONMENT.yaml | ||
sed -i "s%ZENVIA_API_URL%$ZENVIA_API_URL%g" config.$ENVIRONMENT.yaml | ||
sed -i "s%ZENVIA_API_TOKEN%$ZENVIA_API_TOKEN%g" config.$ENVIRONMENT.yaml | ||
- name: Set migrate-mongo-config.ts | ||
run: | | ||
sed -i "s%MONGODB_URI%$MONGODB_URI%g" migrate-mongo-config-example.ts | ||
sed -i "s%MONGODB_NAME%$MONGODB_NAME%g" migrate-mongo-config-example.ts | ||
sed -i "s%MONGODB_URI%$MONGODB_URI%g" migrate-mongo-config-example.ts | ||
sed -i "s%MONGODB_NAME%$MONGODB_NAME%g" migrate-mongo-config-example.ts | ||
# Setting user seed config | ||
- name: Set config.seed.example.yaml | ||
env: | ||
SMTP_HOST: ${{ secrets.SMTP_HOST }} | ||
SMTP_PORT: ${{ secrets.SMTP_PORT }} | ||
SMTP_EMAIL_USER: ${{ secrets.SMTP_EMAIL_USER }} | ||
SMTP_EMAIL_PASS: ${{ secrets.SMTP_EMAIL_PASS }} | ||
TEST_USER_PASS: ${{ secrets.TEST_USER_PASS }} | ||
SMTP_HOST: ${{ secrets.SMTP_HOST }} | ||
SMTP_PORT: ${{ secrets.SMTP_PORT }} | ||
SMTP_EMAIL_USER: ${{ secrets.SMTP_EMAIL_USER }} | ||
SMTP_EMAIL_PASS: ${{ secrets.SMTP_EMAIL_PASS }} | ||
TEST_USER_PASS: ${{ secrets.TEST_USER_PASS }} | ||
|
||
run: | | ||
sed -i "s%SMTP_HOST%$SMTP_HOST%g" config.seed.example.yaml | ||
sed -i "s%SMTP_PORT%$SMTP_PORT%g" config.seed.example.yaml | ||
sed -i "s%SMTP_EMAIL_USER%$SMTP_EMAIL_USER%g" config.seed.example.yaml | ||
sed -i "s%SMTP_EMAIL_PASS%$SMTP_EMAIL_PASS%g" config.seed.example.yaml | ||
sed -i "s/TEST_USER_PASS/$TEST_USER_PASS/g" config.seed.example.yaml | ||
sed -i "s%MONGODB_URI%$MONGODB_URI%g" config.seed.example.yaml | ||
sed -i "s%ORY_SDK_URL%$ORY_SDK_URL%g" config.seed.example.yaml | ||
sed -i "s/ORY_ACCESS_TOKEN/$ORY_ACCESS_TOKEN/g" config.seed.example.yaml | ||
sed -i "s/ALETHEIA_SCHEMA_ID/$ALETHEIA_SCHEMA_ID/g" config.seed.example.yaml | ||
sed -i "s%SMTP_HOST%$SMTP_HOST%g" config.seed.example.yaml | ||
sed -i "s%SMTP_PORT%$SMTP_PORT%g" config.seed.example.yaml | ||
sed -i "s%SMTP_EMAIL_USER%$SMTP_EMAIL_USER%g" config.seed.example.yaml | ||
sed -i "s%SMTP_EMAIL_PASS%$SMTP_EMAIL_PASS%g" config.seed.example.yaml | ||
sed -i "s/TEST_USER_PASS/$TEST_USER_PASS/g" config.seed.example.yaml | ||
sed -i "s%MONGODB_URI%$MONGODB_URI%g" config.seed.example.yaml | ||
sed -i "s%ORY_SDK_URL%$ORY_SDK_URL%g" config.seed.example.yaml | ||
sed -i "s/ORY_ACCESS_TOKEN/$ORY_ACCESS_TOKEN/g" config.seed.example.yaml | ||
sed -i "s/ALETHEIA_SCHEMA_ID/$ALETHEIA_SCHEMA_ID/g" config.seed.example.yaml | ||
# Build the Docker image | ||
- name: Build | ||
|
@@ -174,6 +180,8 @@ jobs: | |
echo "NOVU_API_KEY=${{ secrets.PRODUCTION_NOVU_API_KEY }}" >> $GITHUB_ENV | ||
echo "NOVU_APPLICATION_IDENTIFIER=${{ secrets.PRODUCTION_NOVU_APPLICATION_IDENTIFIER }}" >> $GITHUB_ENV | ||
echo "OPENAI_API_KEY=${{ secrets.PRODUCTION_OPENAI_API_KEY }}" >> $GITHUB_ENV | ||
echo "ZENVIA_API_URL=${{ secrets.PRODUCTION_ZENVIA_API_URL }}" >> $GITHUB_ENV | ||
echo "ZENVIA_API_TOKEN=${{ secrets.PRODUCTION_ZENVIA_API_TOKEN }}" >> $GITHUB_ENV | ||
- name: Set environment | ||
run: | | ||
|
@@ -199,17 +207,17 @@ jobs: | |
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: 'us-east-1' | ||
cluster-name: 'production' | ||
aws-region: "us-east-1" | ||
cluster-name: "production" | ||
command: kubectl apply -f ./deployment/ | ||
|
||
- name: Validation | ||
uses: giovannirossini/[email protected] | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: 'us-east-1' | ||
cluster-name: 'production' | ||
aws-region: "us-east-1" | ||
cluster-name: "production" | ||
command: kubectl rollout status deployments/aletheia -n ${{ env.ENVIRONMENT }} --timeout=360s | ||
if: success() | ||
|
||
|
@@ -218,7 +226,7 @@ jobs: | |
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: 'us-east-1' | ||
cluster-name: 'production' | ||
aws-region: "us-east-1" | ||
cluster-name: "production" | ||
command: kubectl rollout undo deployments/aletheia -n ${{ env.ENVIRONMENT }} | ||
if: failure() |
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
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
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
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
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
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
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
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
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
Oops, something went wrong.