Update some env related apis
ci/woodpecker/push/documentation Pipeline failed Details
ci/woodpecker/push/golang Pipeline failed Details
ci/woodpecker/push/lint Pipeline was successful Details

This commit is contained in:
Nikolai Rodionov 2024-04-19 16:45:26 +02:00
parent c6df6964e8
commit f4ea64a224
Signed by: allanger
GPG Key ID: 0AA46A90E25592AD
3 changed files with 36 additions and 6 deletions

31
.woodpecker/golang.yaml Normal file
View File

@ -0,0 +1,31 @@
---
when:
event:
- push
branch: main
steps:
lint:
name: Generate docs
image: pseudomuto/protoc-gen-doc
secrets:
- softplayer_bot_ssh_key
- git_known_hosts
commands:
- mkdir -p ~/.ssh
- apk update && apk add git openssh
- echo $SOFTPLAYER_BOT_SSH_KEY | base64 -d > ~/.ssh/id_ed25519
- echo $GIT_KNOWN_HOSTS > ~/.ssh/known_hosts
- cat ~/.ssh/id_ed25519
- chmod 0600 ~/.ssh/id_ed25519
- protoc --proto_path=./proto --doc_out=. --doc_opt=markdown,readme.md $(find ./proto -type f -iname "*.proto")
- eval `ssh-agent`
- ssh-add ~/.ssh/id_ed25519
- git config --global user.email "allanger@badhouseplants.net"
- git config --global user.name "Softplayer Bot"
- git clone git@git.badhouseplants.net:softplayer/softplayer-proto.git /tmp/repo
- git -C /tmp/repo checkout generated-documentation
- mv README.md /tmp/repo/README.md
- git -C /tmp/repo add .
- git -C /tmp/repo commit -m "Update documentation"
- git -C /tmp/repo push

View File

@ -19,7 +19,7 @@ docker-docs-gen:
docker-lint:
$(CONTAINER_TOOL) run --rm \
-v $$(pwd):/workspace:z \
-v $$(pwd):/workspace \
--workdir /workspace \
yoheimuta/protolint lint \
$$(find . -type f -iname "*.proto")

View File

@ -11,20 +11,19 @@ service Environments {
rpc Create(EnvironmentData) returns (EnvironmentFull) {}
rpc Update(EnvironmentFull) returns (EnvironmentFull) {}
rpc Delete(EnvironmentFull) returns (google.protobuf.Empty) {}
rpc Get(EnvironmentId) returns (EnvironmentFull) {}
rpc List(google.protobuf.Empty) returns (stream EnvironmentFull) {}
rpc Get(EnvironmentName) returns (EnvironmentFull) {}
rpc List(google.protobuf.Empty) returns (stream EnvironmentName) {}
}
/**
* Represents a environment UUID only
* I don't think we need it
*/
message EnvironmentId {
string id = 1; // Contour ID: UUID
message EnvironmentName {
string name = 1; // Contour ID: UUID
}
message EnvironmentData {
string name = 1; // Environment name
Provider provider = 2; // Provide
Kubernetes kubernetes = 3;
HetznerOptions hetzner_options = 4;