feat: add Timeweb Cloud provider for Woodpecker CI autoscaler
- Implement timewebcloud provider with DeployAgent, RemoveAgent, ListDeployedAgentNames - Add minimal HTTP API client for Timeweb Cloud (create/list/delete servers) - Register provider in main.go with CLI flags - Add timeweb-list and timeweb-tester utilities - Include Dockerfile and docker-compose.yml for deployment - Update DEPLOY.md with verified OS/preset IDs
This commit is contained in:
18
docker/Dockerfile
Normal file
18
docker/Dockerfile
Normal file
@@ -0,0 +1,18 @@
|
||||
FROM --platform=$BUILDPLATFORM golang:1.26 AS build
|
||||
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
ARG TARGETOS TARGETARCH
|
||||
RUN --mount=type=cache,target=/root/.cache/go-build \
|
||||
--mount=type=cache,target=/go/pkg \
|
||||
make build
|
||||
|
||||
FROM --platform=$BUILDPLATFORM scratch
|
||||
ENV GODEBUG=netdns=go
|
||||
|
||||
# copy certs from build image
|
||||
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||||
# copy agent binary
|
||||
COPY --from=build /src/dist/woodpecker-autoscaler /bin/
|
||||
|
||||
ENTRYPOINT ["/bin/woodpecker-autoscaler"]
|
||||
27
docker/Dockerfile.make
Normal file
27
docker/Dockerfile.make
Normal file
@@ -0,0 +1,27 @@
|
||||
# docker build --rm -f docker/Dockerfile.make -t woodpecker/make:local .
|
||||
FROM docker.io/golang:1.26-alpine AS golang_image
|
||||
FROM docker.io/node:24-alpine
|
||||
|
||||
RUN apk add --no-cache --update make gcc binutils-gold musl-dev && \
|
||||
apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main protoc && \
|
||||
corepack enable
|
||||
|
||||
# Build packages.
|
||||
COPY --from=golang_image /usr/local/go /usr/local/go
|
||||
COPY Makefile /
|
||||
ENV PATH=$PATH:/usr/local/go/bin
|
||||
ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0
|
||||
ENV COREPACK_ENABLE_AUTO_PIN=0
|
||||
|
||||
# Cache tools
|
||||
RUN GOBIN=/usr/local/go/bin make install-tools && \
|
||||
rm -rf /Makefile
|
||||
|
||||
ENV GOPATH=/tmp/go
|
||||
ENV HOME=/tmp/home
|
||||
ENV PATH=$PATH:/usr/local/go/bin:/tmp/go/bin
|
||||
|
||||
WORKDIR /build
|
||||
RUN chmod -R 777 /root
|
||||
|
||||
CMD [ "/bin/sh" ]
|
||||
Reference in New Issue
Block a user