Rename cmd agent and server folders and binaries (#330)

Renamed `cmd/drone-agent` to `cmd/agent` and `cmd/drone-server` to `cmd/server` and binaries to get rid of the drone name.
This commit is contained in:
Anbraten 2021-09-21 17:06:13 +02:00 committed by GitHub
parent 188b9e6eb5
commit b3d40024a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 20 additions and 24 deletions

View file

@ -8,6 +8,6 @@ ENV DATABASE_CONFIG=/var/lib/drone/drone.sqlite
ENV GODEBUG=netdns=go ENV GODEBUG=netdns=go
ENV XDG_CACHE_HOME /var/lib/drone ENV XDG_CACHE_HOME /var/lib/drone
ADD release/drone-server /bin/ ADD release/woodpecker-server /bin/
ENTRYPOINT ["/bin/drone-server"] ENTRYPOINT ["/bin/woodpecker-server"]

View file

@ -2,9 +2,9 @@
FROM drone/ca-certs FROM drone/ca-certs
ENV GODEBUG=netdns=go ENV GODEBUG=netdns=go
ADD release/drone-agent /bin/ ADD release/woodpecker-agent /bin/
EXPOSE 3000 EXPOSE 3000
HEALTHCHECK CMD ["/bin/drone-agent", "ping"] HEALTHCHECK CMD ["/bin/woodpecker-agent", "ping"]
ENTRYPOINT ["/bin/drone-agent"] ENTRYPOINT ["/bin/woodpecker-agent"]

View file

@ -3,10 +3,10 @@ FROM alpine:3.9.4
RUN apk add -U --no-cache ca-certificates RUN apk add -U --no-cache ca-certificates
ENV GODEBUG=netdns=go ENV GODEBUG=netdns=go
ADD release/drone-agent /bin/ ADD release/woodpecker-agent /bin/
EXPOSE 3000 EXPOSE 3000
HEALTHCHECK CMD ["/bin/drone-agent", "ping"] HEALTHCHECK CMD ["/bin/woodpecker-agent", "ping"]
ENTRYPOINT ["/bin/drone-agent"] ENTRYPOINT ["/bin/woodpecker-agent"]

View file

@ -8,6 +8,6 @@ ENV DATABASE_CONFIG=/var/lib/drone/drone.sqlite
ENV GODEBUG=netdns=go ENV GODEBUG=netdns=go
ENV XDG_CACHE_HOME /var/lib/drone ENV XDG_CACHE_HOME /var/lib/drone
ADD release/drone-server /bin/ ADD release/woodpecker-server /bin/
ENTRYPOINT ["/bin/drone-server"] ENTRYPOINT ["/bin/woodpecker-server"]

View file

@ -40,10 +40,10 @@ vet:
@go vet $(GO_PACKAGES) @go vet $(GO_PACKAGES)
test-agent: test-agent:
$(DOCKER_RUN) go test -race -timeout 30s github.com/woodpecker-ci/woodpecker/cmd/drone-agent $(GO_PACKAGES) $(DOCKER_RUN) go test -race -timeout 30s github.com/woodpecker-ci/woodpecker/cmd/agent $(GO_PACKAGES)
test-server: test-server:
$(DOCKER_RUN) go test -race -timeout 30s github.com/woodpecker-ci/woodpecker/cmd/drone-server $(DOCKER_RUN) go test -race -timeout 30s github.com/woodpecker-ci/woodpecker/cmd/server
test-frontend: test-frontend:
(cd web/; yarn run test) (cd web/; yarn run test)
@ -54,10 +54,10 @@ test-lib:
test: test-lib test-agent test-server test: test-lib test-agent test-server
build-agent: build-agent:
$(DOCKER_RUN) go build -o build/drone-agent github.com/woodpecker-ci/woodpecker/cmd/drone-agent $(DOCKER_RUN) go build -o build/woodpecker-agent github.com/woodpecker-ci/woodpecker/cmd/agent
build-server: build-server:
$(DOCKER_RUN) go build -o build/drone-server github.com/woodpecker-ci/woodpecker/cmd/drone-server $(DOCKER_RUN) go build -o build/woodpecker-server github.com/woodpecker-ci/woodpecker/cmd/server
build-frontend: build-frontend:
(cd web/; yarn run build) (cd web/; yarn run build)
@ -65,10 +65,10 @@ build-frontend:
build: build-agent build-server build: build-agent build-server
release-agent: release-agent:
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags '${LDFLAGS}' -o release/drone-agent github.com/woodpecker-ci/woodpecker/cmd/drone-agent GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags '${LDFLAGS}' -o release/woodpecker-agent github.com/woodpecker-ci/woodpecker/cmd/agent
release-server: release-server:
GOOS=linux GOARCH=amd64 CGO_ENABLED=1 go build -ldflags '${LDFLAGS}' -o release/drone-server github.com/woodpecker-ci/woodpecker/cmd/drone-server GOOS=linux GOARCH=amd64 CGO_ENABLED=1 go build -ldflags '${LDFLAGS}' -o release/woodpecker-server github.com/woodpecker-ci/woodpecker/cmd/server
release-cli: release-cli:
# disable CGO for cross-compiling # disable CGO for cross-compiling
@ -89,7 +89,3 @@ release-cli:
sha256sum cli/release/*.tar.gz > cli/release/woodpecker_checksums.txt sha256sum cli/release/*.tar.gz > cli/release/woodpecker_checksums.txt
release: release-agent release-server release: release-agent release-server
install:
go install github.com/woodpecker-ci/woodpecker/cmd/drone-agent
go install github.com/woodpecker-ci/woodpecker/cmd/drone-server

View file

@ -26,9 +26,9 @@ import (
func main() { func main() {
app := cli.NewApp() app := cli.NewApp()
app.Name = "drone-agent" app.Name = "woodpecker-agent"
app.Version = version.String() app.Version = version.String()
app.Usage = "drone agent" app.Usage = "woodpecker agent"
app.Action = loop app.Action = loop
app.Commands = []cli.Command{ app.Commands = []cli.Command{
{ {

View file

@ -28,9 +28,9 @@ import (
func main() { func main() {
godotenv.Load(".env") godotenv.Load(".env")
app := cli.NewApp() app := cli.NewApp()
app.Name = "drone-server" app.Name = "woodpecker-server"
app.Version = version.String() app.Version = version.String()
app.Usage = "drone server" app.Usage = "woodpecker server"
app.Action = server app.Action = server
app.Flags = flags app.Flags = flags
app.Before = before app.Before = before