Compare commits
9 commits
ca1a3b458d
...
85af0ef6f5
| Author | SHA1 | Date | |
|---|---|---|---|
| 85af0ef6f5 | |||
| 033461cf7e | |||
| 31deb05118 | |||
| 95b3b55fc0 | |||
| 7dafa029b5 | |||
| f8387e7d68 | |||
| 98637d1fdb | |||
| f656191979 | |||
| 5665f72481 |
1 changed files with 9 additions and 39 deletions
48
Jenkinsfile
vendored
48
Jenkinsfile
vendored
|
|
@ -1,49 +1,19 @@
|
|||
pipeline {
|
||||
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 {
|
||||
stage('Checkout (with submodules)') {
|
||||
stage('Stage Test')
|
||||
{
|
||||
steps {
|
||||
checkout(scmGit(
|
||||
branches: [[name: '*/main']],
|
||||
userRemoteConfigs: [[
|
||||
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()
|
||||
}
|
||||
}
|
||||
echo 'Un día me preguntaron qué es lo que quería...'
|
||||
echo 'les contesté que Racing el domingo me dé una alegría...'
|
||||
echo 'para poder festejar con toda la gente...'
|
||||
echo 'Racing, mi buen amigo...'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue