This commit is contained in:
Vendored
+14
-3
@@ -2,18 +2,28 @@ pipeline {
|
|||||||
agent {
|
agent {
|
||||||
docker {
|
docker {
|
||||||
image 'hub.davinti.com.br:443/infra/node:latest'
|
image 'hub.davinti.com.br:443/infra/node:latest'
|
||||||
args '-u root'
|
args '-u 1001:1001 --rm --entrypoint="" -e HOME=${WORKSPACE}'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
environment {
|
environment {
|
||||||
S3_BUCKET = "s3://app-dono-manifests"
|
S3_BUCKET = "s3://app-dono-manifests"
|
||||||
|
GIT_TOKEN = credentials('gitea-pat')
|
||||||
}
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('Install') {
|
stage('Install') {
|
||||||
|
|
||||||
steps {
|
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
|
||||||
|
"""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44,8 +54,8 @@ pipeline {
|
|||||||
|
|
||||||
post {
|
post {
|
||||||
always {
|
always {
|
||||||
|
sh 'rm -rf *'
|
||||||
script {
|
script {
|
||||||
sh 'rm -f ~/.netrc'
|
|
||||||
deleteDir()
|
deleteDir()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -57,3 +67,4 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user