From 0bb43a49b180504d96a677ce14b842d0dcdcb3ff Mon Sep 17 00:00:00 2001 From: itzaname Date: Sun, 17 Jul 2022 02:34:29 -0400 Subject: [PATCH] Add python generation --- .drone.yml | 35 +++++++++++++++++++++++++++++++++++ scripts/python-gen.sh | 3 +++ 2 files changed, 38 insertions(+) create mode 100755 scripts/python-gen.sh diff --git a/.drone.yml b/.drone.yml index 64172ab..fb72034 100644 --- a/.drone.yml +++ b/.drone.yml @@ -31,5 +31,40 @@ trigger: ref: - refs/heads/master +image_pull_secrets: + - dockerconfigjson +--- +kind: pipeline +type: docker +name: generate-python-grpc + +steps: +- name: clone-external + image: alpine/git + commands: + - git clone 'https://${GIT_USER}:${GIT_PASS}@git.itzana.me/StrafesNET/python-grpc.git' + environment: + GIT_USER: + from_secret: GIT_USER + GIT_PASS: + from_secret: GIT_PASS + +- name: generate + image: registry.itzana.me/strafesnet/tools/protobuild:latest + commands: + - scripts/python-gen.sh + +- name: commit + image: alpine/git + commands: + - cd python-grpc + - git add * + - 'git commit -m "Autogenerated update for ${DRONE_COMMIT_LINK}" || true' + - git push 'https://${GIT_USER}:${GIT_PASS}@git.itzana.me/StrafesNET/python-grpc.git' --all + +trigger: + ref: + - refs/heads/master + image_pull_secrets: - dockerconfigjson \ No newline at end of file diff --git a/scripts/python-gen.sh b/scripts/python-gen.sh new file mode 100755 index 0000000..a9df67d --- /dev/null +++ b/scripts/python-gen.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +python -m grpc_tools.protoc -I./ --python_out=./python-grpc --grpc_python_out=./python-grpc *.proto \ No newline at end of file