publisher

module
v0.0.0-...-69b4764 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 2, 2025 License: MIT

README

Publisher server

It provide the publisher functions:

  • Publish TiUP pacakge from OCI artifact or http file url.
  • Publish tarball to object storage from OCI artifact.

How to design

go to design/design.go

How to generate code from design

we need the goa tool

run:

rm -rf gen cmd tiup.go
goa gen github.com/PingCAP-QE/ee-apps/publisher/design
goa example github.com/PingCAP-QE/ee-apps/publisher/design

How to run

Start the API server
go run ./cmd/publisher -config=config-publisher.yaml --debug --domain 0.0.0.0:8080
Start the worker instance.
go run ./cmd/worker --config=config-worker.yaml --debug
Test with the client CLI
go run ./cmd/publisher-cli -url=http://localhost:8080 tiup request-to-publish -body '{ "artifact_url": "hub.pingcap.net/pingcap/tidb/package:master_linux_amd64" }'
go run ./cmd/publisher-cli -url=http://localhost:8080 fileserver request-to-publish -body '{ "artifact_url": "hub.pingcap.net/pingcap/tidb/package:master_linux_amd64" }'

Directories

Path Synopsis
cmd
You can lean from https://pkgo.dev/goa.design/goa/v3/dsl
You can lean from https://pkgo.dev/goa.design/goa/v3/dsl
gen
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳