-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
102 changed files
with
5,344 additions
and
7,911 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
|
@@ -32,7 +32,7 @@ jobs: | |
build-push: | ||
name: Build and Push Images and Charts | ||
needs: [compute-sha] | ||
uses: ./.github/workflows/cd.yaml | ||
uses: ./.github/workflows/cd-build.yaml | ||
with: | ||
image_tag: ${{ needs.compute-sha.outputs.sha_short }} | ||
chart_ver: 0.1.0-dev.${{ needs.compute-sha.outputs.sha_short }} | ||
|
@@ -41,7 +41,7 @@ jobs: | |
deploy: | ||
name: SSH and Deploy | ||
needs: [compute-sha, build-push] | ||
uses: ./.github/workflows/deploy.yaml | ||
uses: ./.github/workflows/cd-deploy.yaml | ||
with: | ||
environment: development | ||
name: bt-dev-app-${{ needs.compute-sha.outputs.sha_short }} | ||
|
@@ -51,11 +51,45 @@ jobs: | |
ttl: ${{ inputs.ttl }} | ||
frontend: | ||
image: | ||
tag: ${{ needs.compute-sha.outputs.sha_short }} | ||
tag: "${{ needs.compute-sha.outputs.sha_short }}" | ||
backend: | ||
image: | ||
tag: ${{ needs.compute-sha.outputs.sha_short }} | ||
tag: "${{ needs.compute-sha.outputs.sha_short }}" | ||
host: ${{ needs.compute-sha.outputs.sha_short }}.dev.stanfurdtime.com | ||
mongoUri: mongodb://bt-dev-mongo-mongodb.bt.svc.cluster.local:27017/bt | ||
redisUri: redis://bt-dev-redis-master.bt.svc.cluster.local:6379 | ||
secrets: inherit | ||
|
||
limit-deploy: | ||
name: SSH and Limit Deployments | ||
needs: [deploy] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: SSH and Check Deployments | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.SSH_HOST }} | ||
username: ${{ secrets.SSH_USERNAME }} | ||
key: ${{ secrets.SSH_KEY }} | ||
script: | | ||
set -e # Exit immediately if a command fails | ||
# Get bt-dev-app- deployments sorted by creation timestamp | ||
deployments=$(helm list \ | ||
--namespace=bt \ | ||
--date \ | ||
--short | grep '^bt-dev-app') || true | ||
deployment_count=$(echo "$deployments" | wc -l) | ||
# Check if deployment count > 8 | ||
if [ "$deployment_count" -gt 8 ]; then | ||
echo "Too many deployments. Deleting the oldest deployment." | ||
# Get oldest deployment from first line of deployments | ||
oldest_deployment=$(echo "$deployments" | head -n 1) | ||
# Uninstall deployment | ||
helm uninstall "${oldest_deployment}" | ||
else | ||
echo "Deployment count is <= 8." | ||
fi |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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 @@ | ||
import config from "@repo/eslint-config/index.mjs"; | ||
|
||
export default [...config]; |
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.