You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ha...@apache.org on 2021/08/17 09:32:26 UTC
[skywalking-banyandb] branch main updated: Fix docker CI (#41)
This is an automated email from the ASF dual-hosted git repository.
hanahmily pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git
The following commit(s) were added to refs/heads/main by this push:
new 683b724 Fix docker CI (#41)
683b724 is described below
commit 683b724e0521f44cf42f48338c18dabb88ab0ac0
Author: Jiajing LU <lu...@gmail.com>
AuthorDate: Tue Aug 17 17:32:21 2021 +0800
Fix docker CI (#41)
* run docker build for both PR and main branch
Signed-off-by: Megrez Lu <lu...@gmail.com>
* build image before login
Signed-off-by: Megrez Lu <lu...@gmail.com>
* use go install to fetch binary since go 1.16
Signed-off-by: Megrez Lu <lu...@gmail.com>
* fix goimport with version
Signed-off-by: Megrez Lu <lu...@gmail.com>
* setup buildx
Signed-off-by: Megrez Lu <lu...@gmail.com>
* try remove time
Signed-off-by: Megrez Lu <lu...@gmail.com>
* add time
Signed-off-by: Megrez Lu <lu...@gmail.com>
* remove _names fields to check CI status
---
.github/workflows/go.yml | 4 ++--
.github/workflows/publish-docker.yml | 13 +++++++++++--
banyand/liaison/grpc/trace_test.go | 6 ------
scripts/build/docker.mk | 4 ++--
4 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml
index 097658f..fd9b26b 100644
--- a/.github/workflows/go.yml
+++ b/.github/workflows/go.yml
@@ -31,8 +31,8 @@ jobs:
uses: actions/setup-go@v2
with:
go-version: 1.16
- - name: install goimports
- run: GO111MODULE=off go get golang.org/x/tools/cmd/goimports
+ - name: Install goimports
+ run: go install golang.org/x/tools/cmd/goimports@latest
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Check License Header
diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml
index 90119ca..fce0470 100644
--- a/.github/workflows/publish-docker.yml
+++ b/.github/workflows/publish-docker.yml
@@ -17,6 +17,7 @@
name: publish-docker
on:
+ pull_request:
push:
branches:
- main
@@ -41,19 +42,27 @@ jobs:
uses: actions/setup-go@v2
with:
go-version: 1.16
+ - name: Install goimports
+ run: go install golang.org/x/tools/cmd/goimports@latest
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Update dependencies
run: GOPROXY=https://proxy.golang.org go mod download
- name: Generate codes
run: make generate
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v1
+ - name: Build docker image
+ run: |
+ make docker || make docker
- name: Log in to the Container registry
uses: docker/login-action@v1.10.0
+ if: github.ref == 'refs/heads/main'
with:
registry: ${{ env.HUB }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- - name: Build docker image
+ - name: Push docker image
+ if: github.ref == 'refs/heads/main'
run: |
- make docker || make docker
make docker.push || make docker.push
\ No newline at end of file
diff --git a/banyand/liaison/grpc/trace_test.go b/banyand/liaison/grpc/trace_test.go
index 84a2830..ca50a68 100644
--- a/banyand/liaison/grpc/trace_test.go
+++ b/banyand/liaison/grpc/trace_test.go
@@ -162,9 +162,6 @@ func TestTraceService(t *testing.T) {
"webapp_id",
"10.0.0.1_id",
"/home_id",
- "webapp",
- "10.0.0.1",
- "/home",
300,
1622933202000000000).
Timestamp(time.Now()).
@@ -204,9 +201,6 @@ func TestTraceService(t *testing.T) {
"webapp_id",
"10.0.0.1_id",
"/home_id",
- "webapp",
- "10.0.0.1",
- "/home",
300,
1622933202000000000).
Timestamp(time.Now()).
diff --git a/scripts/build/docker.mk b/scripts/build/docker.mk
index 6ab3f91..6b728aa 100644
--- a/scripts/build/docker.mk
+++ b/scripts/build/docker.mk
@@ -34,9 +34,9 @@ BUILD_ARGS := $(BUILD_ARGS) --build-arg CERT_IMAGE=alpine:edge --build-arg BASE_
.PHONY: docker
docker:
@echo "Build Skywalking/BanyanDB Docker Image"
- @time (docker buildx build $(BUILD_ARGS) -t $(HUB):$(TAG) -f Dockerfile ..)
+ @time docker buildx build $(BUILD_ARGS) -t $(HUB):$(TAG) -f Dockerfile ..
.PHONY: docker.push
docker.push:
@echo "Push Skywalking/BanyanDB Docker Image"
- time (docker push $(HUB):$(TAG))
\ No newline at end of file
+ @time docker push $(HUB):$(TAG)
\ No newline at end of file