Skip to content

Commit

Permalink
Merge pull request #2121 from bradrydzewski/master
Browse files Browse the repository at this point in the history
publish arm32 and arm64 agent images
  • Loading branch information
bradrydzewski committed Jul 18, 2017
2 parents 87d51ca + cebe0d2 commit d3966b6
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .drone.sh
Expand Up @@ -23,4 +23,6 @@ git clone git@github.com:drone/drone-enterprise.git extras

# build a static binary with the build number and extra features.
go build -ldflags '-extldflags "-static" -X github.com/drone/drone/version.VersionDev=build.'${DRONE_BUILD_NUMBER} -o release/drone-server github.com/drone/drone/extras/cmd/drone-server
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags '-X github.com/drone/drone/version.VersionDev=build.'${DRONE_BUILD_NUMBER} -o release/drone-agent github.com/drone/drone/cmd/drone-agent
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags '-X github.com/drone/drone/version.VersionDev=build.'${DRONE_BUILD_NUMBER} -o release/drone-agent github.com/drone/drone/cmd/drone-agent
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -ldflags '-X github.com/drone/drone/version.VersionDev=build.'${DRONE_BUILD_NUMBER} -o release/linux/arm64/drone-agent github.com/drone/drone/cmd/drone-agent
GOOS=linux GOARCH=arm CGO_ENABLED=0 GOARM=7 go build -ldflags '-X github.com/drone/drone/version.VersionDev=build.'${DRONE_BUILD_NUMBER} -o release/linux/arm/drone-agent github.com/drone/drone/cmd/drone-agent
20 changes: 20 additions & 0 deletions .drone.yml
Expand Up @@ -56,6 +56,26 @@ pipeline:
branch: master
event: push

publish_agent_arm:
image: plugins/docker
repo: drone/agent
dockerfile: Dockerfile.agent.linux.arm
secrets: [ docker_username, docker_password ]
tag: [ linux-arm ]
when:
branch: master
event: push

publish_agent_arm64:
image: plugins/docker
repo: drone/agent
dockerfile: Dockerfile.agent.linux.arm64
secrets: [ docker_username, docker_password ]
tag: [ linux-arm64 ]
when:
branch: master
event: push

release_server:
image: plugins/docker
repo: drone/drone
Expand Down
8 changes: 8 additions & 0 deletions Dockerfile.agent.linux.arm
@@ -0,0 +1,8 @@
# docker build --rm -t drone/drone .

FROM centurylink/ca-certs
ENV GODEBUG=netdns=go
ENV DRONE_PLATFORM=linux/arm
ADD release/linux/arm/drone-agent /bin/

ENTRYPOINT ["/bin/drone-agent"]
8 changes: 8 additions & 0 deletions Dockerfile.agent.linux.arm64
@@ -0,0 +1,8 @@
# docker build --rm -t drone/drone .

FROM centurylink/ca-certs
ENV GODEBUG=netdns=go
ENV DRONE_PLATFORM=linux/arm64
ADD release/linux/arm64/drone-agent /bin/

ENTRYPOINT ["/bin/drone-agent"]

0 comments on commit d3966b6

Please sign in to comment.