Add python generation
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
itzaname 2022-07-17 02:34:29 -04:00
parent e40204fc1c
commit 0bb43a49b1
2 changed files with 38 additions and 0 deletions

View File

@ -33,3 +33,38 @@ trigger:
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

3
scripts/python-gen.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
python -m grpc_tools.protoc -I./ --python_out=./python-grpc --grpc_python_out=./python-grpc *.proto