diff --git a/Jenkinsfile b/Jenkinsfile index 57d6bf97..782c32d4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -3,6 +3,7 @@ pipeline { environment { NODE_VERSION = '20.17.0' + PR_NUMBER = "${env.CHANGE_ID}" // PR number comes from webhook payload } stages { @@ -32,6 +33,39 @@ pipeline { sh 'npm run build' } } + + stage('Build and Push Docker Image') { + when { + expression { return env.CHANGE_ID != null } // Only run if it's a PR + } + steps { + withCredentials([string(credentialsId: 'gh-pat', variable: 'GITHUB_PASS')]) { + + // Docker login step + sh ''' + echo "$GITHUB_PASS" | docker login ghcr.io -u "egelhaus" --password-stdin + ''' + + // Set image tag dynamically based on the PR number + sh ''' + IMAGE_TAG="ghcr.io/gitroomhq/postiz-app-pr:$PR_NUMBER" + echo "IMAGE_TAG=$IMAGE_TAG" >> image.env + ''' + + // Build Docker image + sh ''' + source image.env + docker build -f Dockerfile.dev -t $IMAGE_TAG . + ''' + + // Push Docker image to GitHub Container Registry + sh ''' + source image.env + docker push $IMAGE_TAG + ''' + } + } + } } post { success { diff --git a/apps/frontend/src/components/billing/main.billing.component.tsx b/apps/frontend/src/components/billing/main.billing.component.tsx index f51befba..811d8b4d 100644 --- a/apps/frontend/src/components/billing/main.billing.component.tsx +++ b/apps/frontend/src/components/billing/main.billing.component.tsx @@ -506,7 +506,7 @@ export const MainBillingComponent: FC<{ {!!subscription?.id && (
- + {isGeneral && !subscription?.cancelAt && ( ) : ( - + )}
diff --git a/libraries/nestjs-libraries/src/services/stripe.service.ts b/libraries/nestjs-libraries/src/services/stripe.service.ts index 04235b57..83c6e445 100644 --- a/libraries/nestjs-libraries/src/services/stripe.service.ts +++ b/libraries/nestjs-libraries/src/services/stripe.service.ts @@ -348,15 +348,7 @@ export class StripeService { async createBillingPortalLink(customer: string) { return stripe.billingPortal.sessions.create({ customer, - flow_data: { - after_completion: { - type: 'redirect', - redirect: { - return_url: process.env['FRONTEND_URL'] + '/billing', - }, - }, - type: 'payment_method_update', - }, + return_url: process.env['FRONTEND_URL'] + '/billing', }); } diff --git a/version.txt b/version.txt index cbec0de0..f90a7b3c 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -v1.38.1 +v1.39.1