Compare commits

..

5 commits
stage ... main

Author SHA1 Message Date
0fc3706152 Update Jenkinsfile 2025-10-21 17:30:23 +00:00
3301a1a6af Jenkinsfile
Some checks failed
multi-1/pipeline/head There was a failure building this commit
multibranch.test2/pipeline/head There was a failure building this commit
2025-10-14 15:37:30 -03:00
30529c4938 Jenkinsfile
All checks were successful
multi-1/pipeline/head This commit looks good
multibranch.test2/pipeline/head This commit looks good
2025-10-14 15:24:45 -03:00
7d309caea4 Jenkinsfile
All checks were successful
multi-1/pipeline/head This commit looks good
multibranch.test2/pipeline/head This commit looks good
2025-10-13 16:31:35 -03:00
88ab44a604 Jenkinsfile
All checks were successful
multibranch.test2/pipeline/head This commit looks good
multi-1/pipeline/head This commit looks good
2025-10-13 16:23:41 -03:00

101
Jenkinsfile vendored
View file

@ -1,22 +1,95 @@
pipeline {
agent any
agent {
docker {
image 'docker:27-cli'
args '-v /var/run/docker.sock:/var/run/docker.sock'
}
}
environment {
IMAGE_NAME = 'core-pim-test'
IMAGE_TAG = 'latest'
CONTAINER_NAME = "${IMAGE_NAME}-container"
DOCKERHUB_USER = 'ramonvasquezliesa'
DOCKERHUB_REPO = "${DOCKERHUB_USER}/${IMAGE_NAME}"
DOCKERHUB_IMAGE = "${DOCKERHUB_REPO}:${IMAGE_TAG}"
FORGEJO_URL = 'https://forgejo.test.dev.it.liesa.com.ar'
FORGEJO_OWNER = 'it.dev'
FORGEJO_REPO = 'integrations.core.pim.git'
REQUIRE_VERSION_TAG = 'true'
REMOVE_DANGLING_IMAGES = 'true'
PORTS = '8081:80'
ENV_FILE = ''
VOLUMES = ''
}
stages {
stage('Stage Test')
{
stage('Checkout (with submodules)') {
steps {
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...'
checkout(scmGit(
// branches: [[name: '*/dev']],
userRemoteConfigs: [[
url: "${FORGEJO_URL}/${FORGEJO_OWNER}/${FORGEJO_REPO}",
credentialsId: 'forgejo-token-hermes'
]],
extensions: [
[$class: 'SubmoduleOption',
disableSubmodules: false,
recursiveSubmodules: true,
parentCredentials: true,
trackingSubmodules: true
]
]
))
}
}
stage('Login Docker') {
steps {
sh '''
docker --version
echo "$DOCKERHUB_TOKEN" | docker login -u "$DOCKERHUB_USER" --password-stdin
'''
}
}
stage('Docker Login') {
steps {
withCredentials([
usernamePassword(
credentialsId: 'dockerhub-credentials-hermes',
usernameVariable: 'DOCKERHUB_USER',
passwordVariable: 'DOCKERHUB_PASS'
)
]) {
sh '''
set -eu pipefail
echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USER" --password-stdin
'''
}
}
}
stage('Build Image') {
steps {
script {
docker.build("${DOCKERHUB_REPO}:${TAG}", '-f src/Service/Infrastructure/App/Dockerfile .')
}
}
}
stage('Push Image') {
steps {
script {
docker.withRegistry('https://index.docker.io/v1/', 'dockerhub-credentials-hermes') {
docker.image("${DOCKERHUB_REPO}:${TAG}").push()
}
}
}
}
}
}
//
//
//
//
//
//
//