devops - drone test
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Mahdi Abu Yasmine 2023-12-14 01:33:04 +01:00
parent 41cd492201
commit 1c07082967

View File

@ -32,18 +32,28 @@ steps:
- export msg="${msg:0:10}" - export msg="${msg:0:10}"
- /bin/bash -c "curl -s -k -X POST https://zulip.meta-tech.academy/api/v1/messages -u drone-bot@zulip.meta-tech.academy:iIm8Hc2VuvK06iDxUODUIndlRu6As6bO --data-urlencode type=stream --data-urlencode 'to=\"gitea\"' --data-urlencode topic=build --data-urlencode content=\"build n° ${DRONE_BUILD_NUMBER} - ${DRONE_REPO}/${DRONE_REPO_BRANCH}/${DRONE_COMMIT} by ${DRONE_COMMIT_AUTHOR} > ${DRONE_BUILD_STATUS} < $${msg} ...\"" - /bin/bash -c "curl -s -k -X POST https://zulip.meta-tech.academy/api/v1/messages -u drone-bot@zulip.meta-tech.academy:iIm8Hc2VuvK06iDxUODUIndlRu6As6bO --data-urlencode type=stream --data-urlencode 'to=\"gitea\"' --data-urlencode topic=build --data-urlencode content=\"build n° ${DRONE_BUILD_NUMBER} - ${DRONE_REPO}/${DRONE_REPO_BRANCH}/${DRONE_COMMIT} by ${DRONE_COMMIT_AUTHOR} > ${DRONE_BUILD_STATUS} < $${msg} ...\""
- name: deploy code # - name: deploy code
image: appleboy/drone-ssh # image: appleboy/drone-ssh
# volumes:
# - name: ssh_key
# path: /root/.ssh
# settings:
# host: bosub-kub-int.metacoaching.pro
# username: mtc
# port: 21022
# key_path: /root/.ssh/id_rsa.kubehost
# script:
# - echo "Target host name :\ `hostname`"
- name: test volumes
image: alpine
volumes: volumes:
- name: ssh_key - name: ssh_key
path: /root/.ssh path: /root/.ssh
settings: commands:
host: bosub-kub-int.metacoaching.pro - chown 0400 /root/.ssh/id_rsa.kubehost
username: mtc - ls -lah /root/.ssh/id_rsa.kubehost
port: 21022 - ssh -p21022 -i /root/.ssh/id_rsa.kubehost mtc@bosub-kub-int.metacoaching.pro "echo \"Target host name :\ `hostname`\""
key_path: /root/.ssh/id_rsa.kubehost
script:
- echo "Target host name :\ `hostname`"
volumes: volumes:
- name: deps - name: deps