Skip to content

Commit

Permalink
Release v2.10.0 (#672)
Browse files Browse the repository at this point in the history
Co-authored-by: semantic-release-bot <[email protected]>
Co-authored-by: csehatt741 <[email protected]>
Co-authored-by: kriptonian1 <[email protected]>
Co-authored-by: Allan Joston Fernandes <[email protected]>
Co-authored-by: Sawan Bhattacharya <[email protected]>
  • Loading branch information
6 people authored Jan 28, 2025
1 parent 7b772f8 commit f3dfe25
Show file tree
Hide file tree
Showing 50 changed files with 1,849 additions and 203 deletions.
81 changes: 54 additions & 27 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ jobs:
runs-on: ubuntu-latest
outputs:
environment: ${{ github.ref == 'refs/heads/main' && 'alpha' || 'stage' }}
latestTag: ${{ github.ref == 'refs/heads/main' && 'latest' || 'experimental' }}
version: ${{ steps.fetch-tag.outputs.version }}
steps:
- name: Checkout
Expand Down Expand Up @@ -79,18 +78,17 @@ jobs:
env:
ACR_REGISTRY_URL: ${{ vars.ACR_REGISTRY_URL }}
REPOSITORY_NAME: api
LATEST_TAG: ${{ needs.release.outputs.latestTag }}
VERSION: ${{ needs.release.outputs.version }}
run: |
# Build a docker container and push it to ACR
echo "Building image..."
docker build \
-t $ACR_REGISTRY_URL/$REPOSITORY_NAME:$VERSION \
-t $ACR_REGISTRY_URL/$REPOSITORY_NAME:$LATEST_TAG \
-f ./apps/api/Dockerfile .
-f apps/api/Dockerfile .
# Push the image
echo "Pushing image to ACR..."
docker push $ACR_REGISTRY_URL/$REPOSITORY_NAME:$LATEST_TAG
docker push $ACR_REGISTRY_URL/$REPOSITORY_NAME:$VERSION
echo "name=image::$ACR_REGISTRY_URL/$REPOSITORY_NAME:$LATEST_TAG" >> $GITHUB_OUTPUT
- name: Azure Login action
uses: azure/login@v2
Expand All @@ -105,14 +103,14 @@ jobs:
API_CONTAINER_RG: ${{ vars.API_CONTAINER_RG }}
ACR_REGISTRY_URL: ${{ vars.ACR_REGISTRY_URL }}
REPOSITORY_NAME: api
LATEST_TAG: ${{ needs.release.outputs.latestTag }}
VERSION: ${{ needs.release.outputs.version }}
with:
azcliversion: latest
inlineScript: |
az containerapp update \
--name $API_CONTAINER \
--resource-group $API_CONTAINER_RG \
--image $ACR_REGISTRY_URL/$REPOSITORY_NAME:$LATEST_TAG
--image $ACR_REGISTRY_URL/$REPOSITORY_NAME:$VERSION
migrate-api:
name: Apply Database Migrations
Expand Down Expand Up @@ -152,6 +150,9 @@ jobs:
- name: Install
run: pnpm i

- name: Build
run: pnpm build:api

- name: Install Sentry CLI
run: npm i -g @sentry/cli

Expand All @@ -166,9 +167,8 @@ jobs:
sentry-cli releases new $VERSION
sentry-cli releases set-commits --auto $VERSION
sentry-cli releases deploys $VERSION new -e $ENVIRONMENT
sentry-cli releases files $VERSION upload-sourcemaps apps/api/.dist \
--validate \
--rewrite
sentry-cli sourcemaps inject apps/api/dist
sentry-cli sourcemaps upload --release $VERSION -p $SENTRY_PROJECT apps/api/dist
deploy-platform:
needs: release
Expand All @@ -193,7 +193,6 @@ jobs:
env:
ACR_REGISTRY_URL: ${{ vars.ACR_REGISTRY_URL }}
REPOSITORY_NAME: platform
LATEST_TAG: ${{ needs.release.outputs.latestTag }}
VERSION: ${{ needs.release.outputs.version }}
NEXT_PUBLIC_BACKEND_URL: ${{ vars.NEXT_PUBLIC_BACKEND_URL }}
NEXT_PUBLIC_SENTRY_PLATFORM_DSN: ${{ secrets.NEXT_PUBLIC_SENTRY_PLATFORM_DSN }}
Expand All @@ -202,15 +201,15 @@ jobs:
NEXT_PUBLIC_SENTRY_ENVIRONMENT: ${{ needs.release.outputs.environment }}
run: |
# Build a docker container and push it to ACR
echo "Building image..."
docker build \
-t $ACR_REGISTRY_URL/$REPOSITORY_NAME:$VERSION \
-t $ACR_REGISTRY_URL/$REPOSITORY_NAME:$LATEST_TAG \
--build-arg NEXT_PUBLIC_BACKEND_URL=$NEXT_PUBLIC_BACKEND_URL \
-f ./apps/platform/Dockerfile .
-f apps/platform/Dockerfile .
# Push the image
echo "Pushing image to ACR..."
docker push $ACR_REGISTRY_URL/$REPOSITORY_NAME:$LATEST_TAG
docker push $ACR_REGISTRY_URL/$REPOSITORY_NAME:$VERSION
echo "name=image::$ACR_REGISTRY_URL/$REPOSITORY_NAME:$LATEST_TAG" >> $GITHUB_OUTPUT
- name: Azure Login action
uses: azure/login@v2
Expand All @@ -225,14 +224,14 @@ jobs:
PLATFORM_CONTAINER_RG: ${{ vars.PLATFORM_CONTAINER_RG }}
ACR_REGISTRY_URL: ${{ vars.ACR_REGISTRY_URL }}
REPOSITORY_NAME: platform
LATEST_TAG: ${{ needs.release.outputs.latestTag }}
VERSION: ${{ needs.release.outputs.version }}
with:
azcliversion: latest
inlineScript: |
az containerapp update \
--name $PLATFORM_CONTAINER \
--resource-group $PLATFORM_CONTAINER_RG \
--image $ACR_REGISTRY_URL/$REPOSITORY_NAME:$LATEST_TAG
--image $ACR_REGISTRY_URL/$REPOSITORY_NAME:$VERSION
release-sentry-platform:
name: Sentry Platform
Expand All @@ -243,6 +242,15 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install PNPM
run: npm i -g pnpm

- name: Install
run: pnpm i

- name: Build
run: pnpm build:api

- name: Install Sentry CLI
run: npm i -g @sentry/cli

Expand All @@ -257,7 +265,7 @@ jobs:
sentry-cli releases new $VERSION
sentry-cli releases set-commits --auto $VERSION
sentry-cli releases deploys $VERSION new -e $ENVIRONMENT
sentry-cli releases files $VERSION upload-sourcemaps apps/platform/.next/static \
sentry-cli releases files $VERSION upload-sourcemaps apps/platform/.next/static/chunks \
--url-prefix '~/_next' \
--validate \
--rewrite
Expand Down Expand Up @@ -285,7 +293,6 @@ jobs:
env:
ACR_REGISTRY_URL: ${{ vars.ACR_REGISTRY_URL }}
REPOSITORY_NAME: web
LATEST_TAG: ${{ needs.release.outputs.latestTag }}
VERSION: ${{ needs.release.outputs.version }}
NEXT_PUBLIC_GOOGLE_ANALYTICS_MEASUREMENT_ID: ${{ secrets.NEXT_PUBLIC_GOOGLE_ANALYTICS_MEASUREMENT_ID }}
NEXT_PUBLIC_SENTRY_WEB_DSN: ${{ secrets.NEXT_PUBLIC_SENTRY_WEB_DSN }}
Expand All @@ -294,19 +301,18 @@ jobs:
NEXT_PUBLIC_SENTRY_ENVIRONMENT: ${{ needs.release.outputs.environment }}
run: |
# Build a docker container and push it to ACR
echo "Building image..."
docker build \
-t $ACR_REGISTRY_URL/$REPOSITORY_NAME:$VERSION \
-t $ACR_REGISTRY_URL/$REPOSITORY_NAME:$LATEST_TAG \
--build-arg NEXT_PUBLIC_GOOGLE_ANALYTICS_MEASUREMENT_ID=$NEXT_PUBLIC_GOOGLE_ANALYTICS_MEASUREMENT_ID \
--build-arg NEXT_PUBLIC_SENTRY_WEB_DSN=$NEXT_PUBLIC_SENTRY_WEB_DSN \
--build-arg NEXT_PUBLIC_SENTRY_WEB_PROFILE_SAMPLE_RATE=$NEXT_PUBLIC_SENTRY_WEB_PROFILE_SAMPLE_RATE \
--build-arg NEXT_PUBLIC_SENTRY_WEB_TRACES_SAMPLE_RATE=$NEXT_PUBLIC_SENTRY_WEB_TRACES_SAMPLE_RATE \
--build-arg NEXT_PUBLIC_SENTRY_ENVIRONMENT=$NEXT_PUBLIC_SENTRY_ENVIRONMENT \
-f ./apps/web/Dockerfile .
echo "Pushing image to ACR..."
docker push $ACR_REGISTRY_URL/$REPOSITORY_NAME:$LATEST_TAG
docker push $ACR_REGISTRY_URL/$REPOSITORY_NAME:$VERSION
echo "name=image::$ACR_REGISTRY_URL/$REPOSITORY_NAME:$LATEST_TAG" >> $GITHUB_OUTPUT
- name: Azure Login action
uses: azure/login@v2
Expand All @@ -321,14 +327,14 @@ jobs:
WEB_CONTAINER_RG: ${{ vars.WEB_CONTAINER_RG }}
ACR_REGISTRY_URL: ${{ vars.ACR_REGISTRY_URL }}
REPOSITORY_NAME: web
LATEST_TAG: ${{ needs.release.outputs.latestTag }}
VERSION: ${{ needs.release.outputs.version }}
with:
azcliversion: latest
inlineScript: |
az containerapp update \
--name $WEB_CONTAINER \
--resource-group $WEB_CONTAINER_RG \
--image $ACR_REGISTRY_URL/$REPOSITORY_NAME:$LATEST_TAG
--image $ACR_REGISTRY_URL/$REPOSITORY_NAME:$VERSION
sentry-release-web:
name: Sentry Web
Expand All @@ -341,6 +347,15 @@ jobs:
- name: Install Sentry CLI
run: npm i -g @sentry/cli

- name: Install PNPM
run: npm i -g pnpm

- name: Install
run: pnpm i

- name: Build
run: pnpm build:api

- name: Sentry Release
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
Expand All @@ -352,7 +367,7 @@ jobs:
sentry-cli releases new $VERSION
sentry-cli releases set-commits --auto $VERSION
sentry-cli releases deploys $VERSION new -e $ENVIRONMENT
sentry-cli releases files $VERSION upload-sourcemaps apps/web/.next/static \
sentry-cli releases files $VERSION upload-sourcemaps apps/web/.next/static/chunks \
--url-prefix '~/_next' \
--validate \
--rewrite
Expand Down Expand Up @@ -426,13 +441,25 @@ jobs:
uses: actions/checkout@v4
with:
persist-credentials: false

- name: node
uses: actions/setup-node@v4
with:
node-version: 20.x
registry-url: https://registry.npmjs.org

- name: Install PNPM
run: npm i -g pnpm

- name: Install
run: pnpm i

- name: Build
run: pnpm build:api

- name: Install sentry-cli
run: npm i -g @sentry/cli

- name: Make release
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
Expand All @@ -446,6 +473,6 @@ jobs:
sentry-cli releases new -p $SENTRY_PROJECT $VERSION
sentry-cli releases set-commits --auto $VERSION
sentry-cli releases deploys $VERSION new -e $ENVIRONMENT
sentry-cli releases files $VERSION upload-sourcemaps apps/cli/.dist \
sentry-cli releases files $VERSION upload-sourcemaps apps/cli/dist \
--validate \
--rewrite
78 changes: 78 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,81 @@
## [2.10.0-stage.8](https://github.com/keyshade-xyz/keyshade/compare/v2.10.0-stage.7...v2.10.0-stage.8) (2025-01-28)

### 🚀 Features

* **platform:** Operate on environments ([#670](https://github.com/keyshade-xyz/keyshade/issues/670)) ([f45c5fa](https://github.com/keyshade-xyz/keyshade/commit/f45c5fa81728832f6ff74c5c26d52e00e32fb546))

## [2.10.0-stage.7](https://github.com/keyshade-xyz/keyshade/compare/v2.10.0-stage.6...v2.10.0-stage.7) (2025-01-28)

### 🚀 Features

* **platform:** Implement delete project ([#671](https://github.com/keyshade-xyz/keyshade/issues/671)) ([d243c89](https://github.com/keyshade-xyz/keyshade/commit/d243c89be2358f104ad893b5c955d814835aa8e8))

## [2.10.0-stage.6](https://github.com/keyshade-xyz/keyshade/compare/v2.10.0-stage.5...v2.10.0-stage.6) (2025-01-26)

### 🐛 Bug Fixes

* **Platfrom:** Replace manual date calculation with dayjs to improve better calculation ([#668](https://github.com/keyshade-xyz/keyshade/issues/668)) ([990eb86](https://github.com/keyshade-xyz/keyshade/commit/990eb86aa5bdeb911c3907df6ea7b52c510e64ad))

### 🔧 Miscellaneous Chores

* **ci:** Update API sentry dist folder ([2bc9afb](https://github.com/keyshade-xyz/keyshade/commit/2bc9afb3e790035e7e3ceec6a568eeab6165be9a))
* **CI:** Update pipeline ([fd63b70](https://github.com/keyshade-xyz/keyshade/commit/fd63b7085f2802b440a9c9628cfe8c0fd609bba9))

## [2.10.0-stage.5](https://github.com/keyshade-xyz/keyshade/compare/v2.10.0-stage.4...v2.10.0-stage.5) (2025-01-25)

### 🐛 Bug Fixes

* **platform:** Refactor layout structure to improve Navbar positioning & child component ([#661](https://github.com/keyshade-xyz/keyshade/issues/661)) ([31067f3](https://github.com/keyshade-xyz/keyshade/commit/31067f309914fc8cd4ac2c1b854e4d8039af5494))

## [2.10.0-stage.4](https://github.com/keyshade-xyz/keyshade/compare/v2.10.0-stage.3...v2.10.0-stage.4) (2025-01-25)

### 🐛 Bug Fixes

* **cli:** Workspace membership API client payload fixed ([#614](https://github.com/keyshade-xyz/keyshade/issues/614)) ([#648](https://github.com/keyshade-xyz/keyshade/issues/648)) ([e23057b](https://github.com/keyshade-xyz/keyshade/commit/e23057b382f0f0d407a9d457876868b9cc39dda1))

## [2.10.0-stage.3](https://github.com/keyshade-xyz/keyshade/compare/v2.10.0-stage.2...v2.10.0-stage.3) (2025-01-25)

### 🚀 Features

* **platform:** Improved UI of [secure] listing ([#655](https://github.com/keyshade-xyz/keyshade/issues/655)) ([b19de47](https://github.com/keyshade-xyz/keyshade/commit/b19de47bdbe5c098fd2c256d4d9b65989498786c))

### 🔧 Miscellaneous Chores

* **ci:** Fixed misplaced sentry sourcemaps commands ([fbd6f3b](https://github.com/keyshade-xyz/keyshade/commit/fbd6f3be5924c32c0df49177131acd39a3249076))

### 🔨 Code Refactoring

* **api:** Update getSelf function ([fe752ce](https://github.com/keyshade-xyz/keyshade/commit/fe752ce1f19582da2c5be9c48b0d7ef1a6332284))

## [2.10.0-stage.2](https://github.com/keyshade-xyz/keyshade/compare/v2.10.0-stage.1...v2.10.0-stage.2) (2025-01-24)

### 🐛 Bug Fixes

* **api:** Only user's default workspace returns isDefault: true ([#647](https://github.com/keyshade-xyz/keyshade/issues/647)) ([870b4dc](https://github.com/keyshade-xyz/keyshade/commit/870b4dc7b68f57fbd09a51099f701a57fb0c998d))

### 🔧 Miscellaneous Chores

* Fix prerelease branch config ([7e84021](https://github.com/keyshade-xyz/keyshade/commit/7e8402140e4cefe021fd9269829d38643aa94404))

## [2.10.0-stage.1](https://github.com/keyshade-xyz/keyshade/compare/v2.9.2-stage.1...v2.10.0-stage.1) (2025-01-24)

### 🚀 Features

* **api:** Secret rotation ([#652](https://github.com/keyshade-xyz/keyshade/issues/652)) ([ad9a808](https://github.com/keyshade-xyz/keyshade/commit/ad9a808ac6819c34b67ee77a1c86cb87b962d411))

## [2.9.2-stage.1](https://github.com/keyshade-xyz/keyshade/compare/v2.9.1...v2.9.2-stage.1) (2025-01-24)

### 🐛 Bug Fixes

* Added lockfile ([856eb3c](https://github.com/keyshade-xyz/keyshade/commit/856eb3c1446752b3312854e3b63b60cff223140c))

### 🔧 Miscellaneous Chores

* **ci:** Add missing LATEST_TAG variable ([a2ea2ed](https://github.com/keyshade-xyz/keyshade/commit/a2ea2edc08583ff6a89fed5bb935d3bf12f91c3c))
* **ci:** Fixed scripts ([374f7ed](https://github.com/keyshade-xyz/keyshade/commit/374f7ed31d85d3481af9ccc2ccdb920eee1d463b))
* **ci:** Update sourcemap upload commands ([c7e8e45](https://github.com/keyshade-xyz/keyshade/commit/c7e8e45fdcc1b9bad1785618ff43bf3bf5785783))
* **cli:** Bumped CLI version to 2.5.0 ([7b772f8](https://github.com/keyshade-xyz/keyshade/commit/7b772f83cda360eeff9b69f5f2a76458e5bcd406))

## [2.9.1](https://github.com/keyshade-xyz/keyshade/compare/v2.9.0...v2.9.1) (2025-01-23)

### 🐛 Bug Fixes
Expand Down
3 changes: 2 additions & 1 deletion apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@
"@nestjs/swagger": "^7.3.0",
"@nestjs/throttler": "^6.2.1",
"@nestjs/websockets": "^10.3.7",
"@slack/bolt": "^3.22.0",
"@react-email/components": "^0.0.25",
"@react-email/preview": "0.0.11",
"@react-email/render": "^1.0.1",
"@sentry/cli": "^2.28.6",
"@slack/bolt": "^3.22.0",
"@socket.io/redis-adapter": "^8.3.0",
"@supabase/supabase-js": "^2.39.6",
"class-transformer": "^0.5.1",
Expand Down
39 changes: 39 additions & 0 deletions apps/api/src/common/secret.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { generateSecretValue } from './secret'

describe('generateSecretValue', () => {
test('should generate a string of exactly 20 characters', () => {
const secret = generateSecretValue()
expect(secret).toHaveLength(20)
})

test('should include at least one digit', () => {
const secret = generateSecretValue()
expect(secret).toMatch(/\d/)
})

test('should include at least one lowercase letter', () => {
const secret = generateSecretValue()
expect(secret).toMatch(/[a-z]/)
})

test('should include at least one uppercase letter', () => {
const secret = generateSecretValue()
expect(secret).toMatch(/[A-Z]/)
})

test('should include at least one special character', () => {
const secret = generateSecretValue()
expect(secret).toMatch(/[!@#$%^&*]/)
})

test('should only include allowed characters', () => {
const secret = generateSecretValue()
expect(secret).toMatch(/^[0-9a-zA-Z!@#$%^&*]{20}$/)
})

test('should generate different values for consecutive calls', () => {
const secret1 = generateSecretValue()
const secret2 = generateSecretValue()
expect(secret1).not.toBe(secret2)
})
})
Loading

0 comments on commit f3dfe25

Please sign in to comment.