Files
app-dono-modulos/Jenkinsfile
T
tkinaba cf1f4dcde3
davinTI/app-dono-modulos/pipeline/head There was a failure building this commit
ci: push to s3
2026-02-27 14:14:22 -03:00

60 lines
1.1 KiB
Groovy

pipeline {
agent {
docker {
image 'hub.davinti.com.br:443/infra/node:latest'
args '-u root'
}
}
environment {
S3_BUCKET = "s3://app-dono-manifests"
}
stages {
stage('Install') {
steps {
sh 'npm install'
}
}
stage('Vet') {
steps {
echo 'Validating modules (Standard for all branches)...'
sh 'npx jeff vet -i "src/**/*.module.ts" --strict'
}
}
stage('Generate & Upload') {
when {
branch 'main'
}
steps {
echo 'Generating manifest and deploying to S3...'
sh 'npm run generate:output'
withAWS(credentials: 'aws-jeff-credentials-id', region: 'sa-east-1') {
script {
echo "Uploading to S3..."
sh "aws s3 cp dist/manifest.json ${S3_BUCKET}/manifest.json"
}
}
}
}
}
post {
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."
}
}
}