Correct nexus url and set new pass for user. Also add new tags to deployment.

This commit is contained in:
2025-03-28 12:51:52 +03:00
parent 9344da6363
commit f4ba112ca9
4 changed files with 14 additions and 7 deletions
+9 -5
View File
@@ -37,12 +37,16 @@ node("docker") {
stage("Build image") {
println "Start building image ${env.registryContainerName}:${env.version}"
if (registryRepoPath)
env.imageName = "${registryRepoPath}/${env.registryContainerName}"
else
env.imageName = "${env.registryContainerName}"
app = docker.build("${env.imageName}:${env.version}", "--no-cache -f ./build/Dockerfile .")
app = docker.build("${env.registryContainerName}:${env.version}", "--no-cache -f ./build/Dockerfile .")
println "Start uploading image ${env.registryContainerName}:${env.version} to Nexus"
docker.withRegistry("https://${registryUrl}", "nexus-jenkins-cred") {
docker.withRegistry("https://${registryUrl}/${registryRepoPath}", "registry-jenkins-cred") {
app.push("${env.version}")
app.push("latest")
}
@@ -68,8 +72,8 @@ node("docker") {
-f ./helm/values.yaml \
${env.appName} ./helm/
"""
sh "kubectl --kubeconfig=auth.config get pods --namespace ${env.namespace}"
sh "kubectl --kubeconfig=auth.config get pods --env.namespace ${env.namespace}"
}
}
+2
View File
@@ -16,6 +16,8 @@ spec:
labels:
app: "{{ .Chart.Name }}"
stand: "{{ .Values.stand }}"
contragentCode: 'WZ01112'
billingObject: 'None'
spec:
{{- if .Values.vault.enabled }}
serviceAccountName: "{{ .Values.vault.serviceAccountName }}"
+1 -1
View File
@@ -8,7 +8,7 @@ stand: {{ stand }}
mainContainer:
###### Репозиторий
image:
repository: {{ registryUrl }}/{{ registryContainerName }}
repository: "{{ registryUrl }}/{{ imageName }}"
tag: {{ version }}
containerPort: {{ appPort }}
###### Ресурсы
+2 -1
View File
@@ -1,5 +1,6 @@
main:
registryUrl: "drn.tst.nubes.ru" # Где хранится приложение
registryUrl: 'registry.ngcloud.ru' # Где хранится приложение
registryRepoPath: 'deck' # Где хранится приложение (registry.ngcloud.ru/deck)
appName: "svc-api" # наименование контейнера в K8S
registryContainerName: "deck-{{ appName }}" # Наименование приложения в Nexus
vaultPath: "config.deck-{{ appName }}-{{ stand }}" # Путь где лежит инфраструктурный kubeconfig для установки Helm-чарта