Compare commits

..

3 Commits

Author SHA1 Message Date
Simple_Not
90522346ac upd drone dev
All checks were successful
continuous-integration/drone/push Build is passing
2023-11-16 17:05:19 +10:00
Simple_Not
d5f4fd3989 upd drone dev 2023-11-16 17:03:03 +10:00
Simple_Not
6b3ae65d73 upd drone dev 2023-11-16 16:42:09 +10:00

View File

@ -17,63 +17,91 @@ steps:
- cd /usr/share/repos/$DRONE_REPO_NAME - cd /usr/share/repos/$DRONE_REPO_NAME
- git checkout $DRONE_COMMIT_BRANCH - git checkout $DRONE_COMMIT_BRANCH
- git pull origin $DRONE_COMMIT_BRANCH - git pull origin $DRONE_COMMIT_BRANCH
- name: build # - name: build
environment: # environment:
DOCKER_TLS_VERIFY: 1 # DOCKER_TLS_VERIFY: 1
DOCKER_HOST: "tcp://192.168.49.2:2376" # DOCKER_HOST: "tcp://192.168.49.2:2376"
DOCKER_CERT_PATH: "/home/hogweed1/.minikube/certs" # DOCKER_CERT_PATH: "/home/hogweed1/.minikube/certs"
MINIKUBE_ACTIVE_DOCKERD: "minikube" # MINIKUBE_ACTIVE_DOCKERD: "minikube"
commands: # commands:
- cd /usr/share/repos/$DRONE_REPO_NAME # - cd /usr/share/repos/$DRONE_REPO_NAME
- git checkout $DRONE_COMMIT_BRANCH # - git checkout $DRONE_COMMIT_BRANCH
- docker build . -t ${DRONE_REPO_NAME}:${DRONE_COMMIT_BRANCH}-"$(git rev-parse --short HEAD)" # - docker build . -t ${DRONE_REPO_NAME}:${DRONE_COMMIT_BRANCH}-"$(git rev-parse --short HEAD)"
- docker tag ${DRONE_REPO_NAME}:${DRONE_COMMIT_BRANCH}-"$(git rev-parse --short HEAD)" ${DRONE_REPO_NAME}:latest # - docker tag ${DRONE_REPO_NAME}:${DRONE_COMMIT_BRANCH}-"$(git rev-parse --short HEAD)" ${DRONE_REPO_NAME}:latest
- docker tag ${DRONE_REPO_NAME}:${DRONE_COMMIT_BRANCH}-"$(git rev-parse --short HEAD)" ${DRONE_REPO_NAME}:${DRONE_COMMIT_BRANCH} # - docker tag ${DRONE_REPO_NAME}:${DRONE_COMMIT_BRANCH}-"$(git rev-parse --short HEAD)" ${DRONE_REPO_NAME}:${DRONE_COMMIT_BRANCH}
- name: build to harbor - name: build to harbor
commands: commands:
- cd /usr/share/repos/$DRONE_REPO_NAME - cd /usr/share/repos/$DRONE_REPO_NAME
- git checkout $DRONE_COMMIT_BRANCH - git checkout $DRONE_COMMIT_BRANCH
- docker build . -t ${DRONE_REPO_NAME}:${DRONE_COMMIT_BRANCH}-"$(git rev-parse --short HEAD)" #- docker build . -t ${DRONE_REPO_NAME}:${DRONE_COMMIT_BRANCH}-"$(git rev-parse --short HEAD)"
- docker tag ${DRONE_REPO_NAME}:${DRONE_COMMIT_BRANCH}-"$(git rev-parse --short HEAD)" harbor.guaranteedstruggle.host/library/${DRONE_REPO_NAME}:latest #- docker tag ${DRONE_REPO_NAME}:${DRONE_COMMIT_BRANCH}-"$(git rev-parse --short HEAD)" harbor.guaranteedstruggle.host/library/${DRONE_REPO_NAME}:latest
- docker tag ${DRONE_REPO_NAME}:${DRONE_COMMIT_BRANCH}-"$(git rev-parse --short HEAD)" harbor.guaranteedstruggle.host/library/${DRONE_REPO_NAME}:${DRONE_COMMIT_BRANCH} #- docker tag ${DRONE_REPO_NAME}:${DRONE_COMMIT_BRANCH}-"$(git rev-parse --short HEAD)" harbor.guaranteedstruggle.host/library/${DRONE_REPO_NAME}:${DRONE_COMMIT_BRANCH}
- docker build . -t harbor.guaranteedstruggle.host/library/${DRONE_REPO_NAME}:${DRONE_COMMIT_BRANCH}
- docker login harbor.guaranteedstruggle.host -u 'robot$drono' -p valgBwMgcB86azvmuezTOC3omjXZ1NZe - docker login harbor.guaranteedstruggle.host -u 'robot$drono' -p valgBwMgcB86azvmuezTOC3omjXZ1NZe
- docker push harbor.guaranteedstruggle.host/library/${DRONE_REPO_NAME}:${DRONE_COMMIT_BRANCH} - docker push harbor.guaranteedstruggle.host/library/${DRONE_REPO_NAME}:${DRONE_COMMIT_BRANCH}
- name: restart deployment master - name: restart deployment master
environment: environment:
DOCKER_TLS_VERIFY: 1 KUBECONFIG: /etc/kubernetes/admin.conf
DOCKER_HOST: "tcp://192.168.49.2:2376"
DOCKER_CERT_PATH: "/home/hogweed1/.minikube/certs"
MINIKUBE_ACTIVE_DOCKERD: "minikube"
commands: commands:
- su - hogweed1 -c "minikube kubectl -- rollout restart -n vdk2ch deployment flask-htmx-master" - kubectl rollout restart -n vdk2ch deployment flask-htmx-master
when: when:
branch: branch:
- master-of-slaves - master-of-slaves
- name: restart deployment dev - name: restart deployment dev
environment: environment:
DOCKER_TLS_VERIFY: 1 KUBECONFIG: /etc/kubernetes/admin.conf
DOCKER_HOST: "tcp://192.168.49.2:2376"
DOCKER_CERT_PATH: "/home/hogweed1/.minikube/certs"
MINIKUBE_ACTIVE_DOCKERD: "minikube"
commands: commands:
- su - hogweed1 -c "minikube kubectl -- rollout restart -n vdk2ch deployment flask-htmx-dev" - kubectl rollout restart -n vdk2ch deployment flask-htmx-dev
when: when:
branch: branch:
- dev - dev
- name: restart deployment our-style - name: restart deployment our-style
environment: environment:
DOCKER_TLS_VERIFY: 1 KUBECONFIG: /etc/kubernetes/admin.conf
DOCKER_HOST: "tcp://192.168.49.2:2376"
DOCKER_CERT_PATH: "/home/hogweed1/.minikube/certs"
MINIKUBE_ACTIVE_DOCKERD: "minikube"
commands: commands:
- su - hogweed1 -c "minikube kubectl -- rollout restart -n vdk2ch deployment flask-htmx-our-style" - kubectl rollout restart -n vdk2ch deployment flask-htmx-our-style
when: when:
branch: branch:
- our-style - our-style
# - name: restart deployment master
# environment:
# DOCKER_TLS_VERIFY: 1
# DOCKER_HOST: "tcp://192.168.49.2:2376"
# DOCKER_CERT_PATH: "/home/hogweed1/.minikube/certs"
# MINIKUBE_ACTIVE_DOCKERD: "minikube"
# commands:
# - su - hogweed1 -c "minikube kubectl -- rollout restart -n vdk2ch deployment flask-htmx-master"
# when:
# branch:
# - master-of-slaves
# - name: restart deployment dev
# environment:
# DOCKER_TLS_VERIFY: 1
# DOCKER_HOST: "tcp://192.168.49.2:2376"
# DOCKER_CERT_PATH: "/home/hogweed1/.minikube/certs"
# MINIKUBE_ACTIVE_DOCKERD: "minikube"
# commands:
# - su - hogweed1 -c "minikube kubectl -- rollout restart -n vdk2ch deployment flask-htmx-dev"
# when:
# branch:
# - dev
# - name: restart deployment our-style
# environment:
# DOCKER_TLS_VERIFY: 1
# DOCKER_HOST: "tcp://192.168.49.2:2376"
# DOCKER_CERT_PATH: "/home/hogweed1/.minikube/certs"
# MINIKUBE_ACTIVE_DOCKERD: "minikube"
# commands:
# - su - hogweed1 -c "minikube kubectl -- rollout restart -n vdk2ch deployment flask-htmx-our-style"
# when:
# branch:
# - our-style