Compare commits
No commits in common. "0706ffc360c0a5ca6ad2df724dd584b09fedbcaa" and "ca1a3b458d43ebd8051200c36c651dbdf92d16a9" have entirely different histories.
0706ffc360
...
ca1a3b458d
1 changed files with 39 additions and 12 deletions
51
Jenkinsfile
vendored
51
Jenkinsfile
vendored
|
|
@ -1,22 +1,49 @@
|
||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
|
|
||||||
|
environment {
|
||||||
|
IMAGE_NAME = 'rd.jenkins'
|
||||||
|
AWS_USER = 'liesa'
|
||||||
|
AWS_REPO = "${AWS_USER}/${IMAGE_NAME}"
|
||||||
|
AWS_URL = '231670719202.dkr.ecr.sa-east-1.amazonaws.com'
|
||||||
|
TAG = 'latest'
|
||||||
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('Stage Test')
|
stage('Checkout (with submodules)') {
|
||||||
{
|
|
||||||
steps {
|
steps {
|
||||||
echo 'Un día me preguntaron qué es lo que quería...'
|
checkout(scmGit(
|
||||||
echo 'les contesté que Racing el domingo me dé una alegría...'
|
branches: [[name: '*/main']],
|
||||||
echo 'para poder festejar con toda la gente...'
|
userRemoteConfigs: [[
|
||||||
echo 'Racing, mi buen amigo...'
|
url: 'https://stalked-noegenetic-amari.ngrok-free.dev/hermes/pl-1.git',
|
||||||
|
credentialsId: 'hermes-forgejo-local'
|
||||||
|
]]
|
||||||
|
))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Build Image') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
docker.build("${AWS_REPO}:${TAG}", '-f Dockerfile .')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Push Image') {
|
||||||
|
steps {
|
||||||
|
sh '''
|
||||||
|
set -eu pipefail
|
||||||
|
aws ecr get-login-password --region sa-east-1 | docker login --username AWS --password-stdin $AWS_URL
|
||||||
|
'''
|
||||||
|
|
||||||
|
script {
|
||||||
|
docker.withRegistry("http://${AWS_URL}", 'ecr:sa-east-1:aws-prod') {
|
||||||
|
docker.image("${AWS_REPO}:${TAG}").push()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue