2023-07-01 23:27:32 +10:00
|
|
|
|
---
|
|
|
|
|
kind: pipeline
|
|
|
|
|
type: exec
|
|
|
|
|
name: default
|
|
|
|
|
|
|
|
|
|
platform:
|
|
|
|
|
os: linux
|
|
|
|
|
arch: amd64
|
|
|
|
|
|
|
|
|
|
clone:
|
|
|
|
|
# убрано так как сейчас не тестим ничего предварительно а сразу тянем в директорию
|
|
|
|
|
disable: true
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
- name: pull into the folduh
|
|
|
|
|
commands:
|
|
|
|
|
- cd /usr/share/repos/$DRONE_REPO_NAME
|
2023-11-16 16:43:05 +10:00
|
|
|
|
- git checkout $DRONE_COMMIT_BRANCH
|
2023-07-01 23:27:32 +10:00
|
|
|
|
- git pull origin $DRONE_COMMIT_BRANCH
|
2023-11-16 16:43:05 +10:00
|
|
|
|
# - 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
|
2023-07-02 01:01:16 +10:00
|
|
|
|
commands:
|
2023-07-01 23:27:32 +10:00
|
|
|
|
- cd /usr/share/repos/$DRONE_REPO_NAME
|
2023-07-02 01:01:16 +10:00
|
|
|
|
- git checkout $DRONE_COMMIT_BRANCH
|
2023-11-16 16:43:05 +10:00
|
|
|
|
#- 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}
|
2023-11-16 17:02:50 +10:00
|
|
|
|
- docker build . -t harbor.guaranteedstruggle.host/library/${DRONE_REPO_NAME}:${DRONE_COMMIT_BRANCH}
|
2023-11-16 16:43:05 +10:00
|
|
|
|
- docker login harbor.guaranteedstruggle.host -u 'robot$drono' -p valgBwMgcB86azvmuezTOC3omjXZ1NZe
|
|
|
|
|
- docker push harbor.guaranteedstruggle.host/library/${DRONE_REPO_NAME}:${DRONE_COMMIT_BRANCH}
|
|
|
|
|
|
2023-07-02 01:05:11 +10:00
|
|
|
|
|
|
|
|
|
- name: restart deployment master
|
|
|
|
|
environment:
|
2023-11-16 16:43:05 +10:00
|
|
|
|
KUBECONFIG: /etc/kubernetes/admin.conf
|
2023-07-02 01:05:11 +10:00
|
|
|
|
commands:
|
2023-11-16 16:43:05 +10:00
|
|
|
|
- kubectl rollout restart -n vdk2ch deployment flask-htmx-master"
|
2023-07-02 01:05:11 +10:00
|
|
|
|
when:
|
|
|
|
|
branch:
|
|
|
|
|
- master-of-slaves
|
|
|
|
|
|
|
|
|
|
- name: restart deployment dev
|
|
|
|
|
environment:
|
2023-11-16 16:43:05 +10:00
|
|
|
|
KUBECONFIG: /etc/kubernetes/admin.conf
|
2023-07-02 01:05:11 +10:00
|
|
|
|
commands:
|
2023-11-16 16:43:05 +10:00
|
|
|
|
- kubectl rollout restart -n vdk2ch deployment flask-htmx-dev"
|
2023-07-02 01:05:11 +10:00
|
|
|
|
when:
|
|
|
|
|
branch:
|
|
|
|
|
- dev
|
2023-07-16 02:26:25 +10:00
|
|
|
|
|
|
|
|
|
- name: restart deployment our-style
|
|
|
|
|
environment:
|
2023-11-16 16:43:05 +10:00
|
|
|
|
KUBECONFIG: /etc/kubernetes/admin.conf
|
2023-07-16 02:26:25 +10:00
|
|
|
|
commands:
|
2023-11-16 16:43:05 +10:00
|
|
|
|
- kubectl rollout restart -n vdk2ch deployment flask-htmx-our-style"
|
2023-07-16 02:26:25 +10:00
|
|
|
|
when:
|
|
|
|
|
branch:
|
2023-11-16 16:43:05 +10:00
|
|
|
|
- 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
|
2023-07-02 01:05:11 +10:00
|
|
|
|
|
2023-07-02 00:05:03 +10:00
|
|
|
|
|