Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 958bc04

Browse files
authored
Set up auto publishing of the sourcegraph/lang-go Docker image from master (#351)
1 parent e60a9ef commit 958bc04

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM golang:alpine
2+
3+
COPY . /go/src/github.com/sourcegraph/go-langserver
4+
RUN go install github.com/sourcegraph/go-langserver
5+
RUN apk add --no-cache openssh git curl
6+
CMD ["go-langserver"]

buildkite.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
steps:
2+
# Build & deploy Docker image
3+
- command: ./deploy.sh
4+
branches: master
5+
label: ':rocket:'
6+
concurrency: 1
7+
concurrency_group: deploy

deploy.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
set -ex
3+
cd $(dirname "${BASH_SOURCE[0]}")
4+
5+
# Build image
6+
VERSION=$(printf "%05d" $BUILDKITE_BUILD_NUMBER)_$(date +%Y-%m-%d)_$(git rev-parse --short HEAD)
7+
docker build -t sourcegraph/lang-go:$VERSION .
8+
9+
# Upload to Docker Hub
10+
docker push sourcegraph/lang-go:$VERSION
11+
docker tag sourcegraph/lang-go:$VERSION sourcegraph/lang-go:latest
12+
docker push sourcegraph/lang-go:latest
13+
docker tag sourcegraph/lang-go:$VERSION sourcegraph/lang-go:insiders
14+
docker push sourcegraph/lang-go:insiders

0 commit comments

Comments
 (0)