From cf1f4dcde3a8a6e03c68a907d87087c413e95d5d Mon Sep 17 00:00:00 2001 From: tkinaba Date: Fri, 27 Feb 2026 14:14:22 -0300 Subject: [PATCH 1/2] ci: push to s3 --- Jenkinsfile | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3fc90cf..04fdca6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -43,8 +43,17 @@ pipeline { } post { - always { - echo "Finished build for ${env.BRANCH_NAME}" - } - } + always { + script { + sh 'rm -f ~/.netrc' + deleteDir() + } + } + success { + echo "✨ Manifest successfully uploaded to S3!" + } + failure { + echo "❌ Build failed. Check the logs for Jeff's validation errors." + } + } } From 9a894998bf6b3f4dc7e7014c4c4ef85a90a87b6a Mon Sep 17 00:00:00 2001 From: tkinaba Date: Fri, 27 Feb 2026 15:09:23 -0300 Subject: [PATCH 2/2] ci: fix ws permissions --- Jenkinsfile | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 04fdca6..36668d1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -2,18 +2,28 @@ pipeline { agent { docker { image 'hub.davinti.com.br:443/infra/node:latest' - args '-u root' + args '-u 1001:1001 --rm --entrypoint="" -e HOME=${WORKSPACE}' } } environment { S3_BUCKET = "s3://app-dono-manifests" + GIT_TOKEN = credentials('gitea-pat') } stages { stage('Install') { + steps { - sh 'npm install' + sh """ + # Create a .netrc file so Git can find the PAT for your Gitea domain + echo "machine git.davinti.com.br" > ~/.netrc + echo "login jenkins" >> ~/.netrc + echo "password ${GIT_TOKEN}" >> ~/.netrc + chmod 600 ~/.netrc + + npm install + """ } } @@ -43,17 +53,18 @@ pipeline { } post { - always { - script { - sh 'rm -f ~/.netrc' - deleteDir() - } - } - success { + always { + sh 'rm -rf *' + script { + deleteDir() + } + } + success { echo "✨ Manifest successfully uploaded to S3!" } failure { echo "❌ Build failed. Check the logs for Jeff's validation errors." } - } + } } +