automated terminal push

This commit is contained in:
lenape
2025-07-12 09:23:38 +00:00
parent 7894a43bca
commit ccaedec0b4

9
Jenkinsfile vendored
View File

@@ -19,16 +19,15 @@ pipeline {
TF_VAR_public_subnets = '10.0.1.0/24,10.0.2.0/24'
TF_VAR_instance_type = 't2.micro'
TF_VAR_key_pair_name = 'nvhi-atsila-deployer'
// Injected from Jenkins Global Env
TF_VAR_jenkins_ip_cidr = "${JENKINS_SSH_CIDR}"
IMAGE_NAME = 'lenape/nvhi-atsila-microservice'
IMAGE_TAG = "v1.0.${env.BUILD_NUMBER}"
IMAGE_TAG = "v1.0.${BUILD_NUMBER}"
}
stages {
stage('Checkout') {
steps {
git url: env.GITEA_REPO, credentialsId: env.GITEA_CREDS
checkout scm
}
}
stage('SonarQube Scan') {
@@ -42,7 +41,7 @@ pipeline {
steps {
script {
docker.withRegistry(env.ARTIFACTORY_URL, env.ARTIFACTORY_CREDS) {
def img = docker.build("${env.IMAGE_NAME}:${env.IMAGE_TAG}")
def img = docker.build("${IMAGE_NAME}:${IMAGE_TAG}")
img.push()
}
}
@@ -95,7 +94,7 @@ pipeline {
--network-mode bridge \
--container-definitions '[{
"name":"health-workload",
"image":"${env.ARTIFACTORY_URL}/${env.IMAGE_NAME}:${env.IMAGE_TAG}",
"image":"${ARTIFACTORY_URL}/${IMAGE_NAME}:${IMAGE_TAG}",
"essential":true,
"portMappings":[{"containerPort":8080,"hostPort":8080}]
}]' \