Correct nexus url and set new pass for user. Also add new tags to deployment.
This commit is contained in:
Vendored
+9
-5
@@ -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}"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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 }}"
|
||||
|
||||
@@ -8,7 +8,7 @@ stand: {{ stand }}
|
||||
mainContainer:
|
||||
###### Репозиторий
|
||||
image:
|
||||
repository: {{ registryUrl }}/{{ registryContainerName }}
|
||||
repository: "{{ registryUrl }}/{{ imageName }}"
|
||||
tag: {{ version }}
|
||||
containerPort: {{ appPort }}
|
||||
###### Ресурсы
|
||||
|
||||
@@ -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-чарта
|
||||
|
||||
Reference in New Issue
Block a user