Browse Source

ajusto para que no se borre el ns ni la pvc

main
Celestino Rey 6 months ago
parent
commit
e8b66fa866
3 changed files with 17 additions and 12 deletions
  1. +2
    -2
      Imagen/Dockerfile
  2. +13
    -8
      Makefile
  3. +2
    -2
      jenkins-30-deployment.yaml

+ 2
- 2
Imagen/Dockerfile View File

@ -1,6 +1,6 @@
# Use Jenkins base image
# FROM jenkins/jenkins:latest
FROM jenkins/jenkins:lts
FROM jenkins/jenkins:latest
# FROM jenkins/jenkins:lts
# Switch to root user
USER root


+ 13
- 8
Makefile View File

@ -2,6 +2,13 @@
export REGISTRY=registry.reymota.es
export IMG_VERSION = 1.21
#
# orden de creación:
# si es la primera vez: make imagen; make ns; make pvc; make install
# si lo hemos parado con make clean, ya no hay que volver a crear el ns y la pvc, entonces solo make install
# cambio de imagen: make imagen; make clean; make install
#
# limpia todo
all: imagen clean install
@ -9,13 +16,9 @@ imagen:
cd Imagen/; make
install:
-kubectl create -f jenkins-05-namespace.yaml
-kubectl create -f reg-secret.yaml
-kubectl create -f jenkins-10-serviceAccount.yaml
# -kubectl create -f jenkins-20-storage-class.yaml
-kubectl create -f jenkins-21-pvc.yaml
# -kubectl create -f jenkins-25-volume.yaml
-envsubst < jenkins-30-deployment.yaml |kubectl create -f -
-kubectl create -f jenkins-40-service.yaml
-kubectl create -f jenkins-50-ingress.yaml
@ -24,9 +27,11 @@ clean:
-kubectl delete -f jenkins-50-ingress.yaml
-kubectl delete -f jenkins-40-service.yaml
-envsubst < jenkins-30-deployment.yaml |kubectl delete -f -
# -kubectl delete -f jenkins-25-volume.yaml
-kubectl delete -f jenkins-21-pvc.yaml
# -kubectl delete -f jenkins-20-storage-class.yaml
-kubectl delete -f jenkins-10-serviceAccount.yaml
-kubectl delete -f reg-secret.yaml
-kubectl delete -f jenkins-05-namespace.yaml
pvc:
-kubectl create -f jenkins-21-pvc.yaml
ns:
-kubectl create -f jenkins-05-namespace.yaml

+ 2
- 2
jenkins-30-deployment.yaml View File

@ -19,8 +19,8 @@ spec:
serviceAccountName: jenkins-admin
containers:
- name: jenkins
image: jenkins/jenkins:lts
# image: $REGISTRY/jenkins-docker:$IMG_VERSION
# image: jenkins/jenkins:lts
image: $REGISTRY/jenkins-docker:$IMG_VERSION
# OPTIONAL: check for new floating-tag LTS releases whenever the pod is restarted:
imagePullPolicy: Always
resources:


Loading…
Cancel
Save