Compare commits

...

5 Commits

Author SHA1 Message Date
Simple_Not
701c5cc6ff upd drone mst
All checks were successful
continuous-integration/drone/push Build is passing
2023-11-16 17:06:19 +10:00
Simple_Not
07b6992295 upd drone oir-stili 2023-11-16 17:05:32 +10:00
Simple_Not
510c19b194 upd drone oir-stili 2023-11-16 17:02:50 +10:00
Simple_Not
45cd3a1d59 upd drone oir-stili 2023-11-16 16:55:12 +10:00
Simple_Not
ca8f8aa510 upd drone oir-stili 2023-11-16 16:43:05 +10:00
2 changed files with 67 additions and 27 deletions

View File

@ -15,55 +15,93 @@ steps:
- name: pull into the folduh
commands:
- cd /usr/share/repos/$DRONE_REPO_NAME
- git checkout $DRONE_COMMIT_BRANCH
- git checkout $DRONE_COMMIT_BRANCH
- git pull origin $DRONE_COMMIT_BRANCH
- name: build
environment:
DOCKER_TLS_VERIFY: 1
DOCKER_HOST: "tcp://192.168.49.2:2376"
DOCKER_CERT_PATH: "/home/hogweed1/.minikube/certs"
MINIKUBE_ACTIVE_DOCKERD: "minikube"
# - name: build
# 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:
# - cd /usr/share/repos/$DRONE_REPO_NAME
# - git checkout $DRONE_COMMIT_BRANCH
# - 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}:${DRONE_COMMIT_BRANCH}
- name: build to harbor
commands:
- cd /usr/share/repos/$DRONE_REPO_NAME
- git checkout $DRONE_COMMIT_BRANCH
- 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}:${DRONE_COMMIT_BRANCH}
#- 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}:${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 push harbor.guaranteedstruggle.host/library/${DRONE_REPO_NAME}:${DRONE_COMMIT_BRANCH}
- 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"
KUBECONFIG: /etc/kubernetes/admin.conf
commands:
- su - hogweed1 -c "minikube kubectl -- rollout restart -n vdk2ch deployment flask-htmx-master"
- 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"
KUBECONFIG: /etc/kubernetes/admin.conf
commands:
- su - hogweed1 -c "minikube kubectl -- rollout restart -n vdk2ch deployment flask-htmx-dev"
- 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"
KUBECONFIG: /etc/kubernetes/admin.conf
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:
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

View File

@ -212,4 +212,6 @@ stateDiagram-v2
Grafana --> dash_join
dash_join --> User : дашборды
```
```