Skip to content

Commit

Permalink
Merge branch 'main' into bugfix/docker/gcc-environment-for-arm
Browse files Browse the repository at this point in the history
  • Loading branch information
hlts2 committed Feb 13, 2024
2 parents 6bc0591 + 818790a commit dc13d9e
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/_docker-image.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# !yamlfmt!:ignore

#
# Copyright (C) 2019-2024 vdaas.org vald team <[email protected]>
#
Expand Down Expand Up @@ -37,7 +39,7 @@ jobs:
- uses: ./.github/actions/dump-context
build:
runs-on: ubuntu-latest
if: |
if: >-
${{ (github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.fork == false) ||
(github.event.pull_request.head.repo.fork == true &&
Expand Down
36 changes: 36 additions & 0 deletions Makefile.d/tools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,42 @@ yamlfmt/install: $(GOPATH)/bin/yamlfmt
$(GOPATH)/bin/yamlfmt:
$(call go-install, github.com/google/yamlfmt/cmd/yamlfmt)

.PHONY: gopls/install
gopls/install: $(GOPATH)/bin/gopls

$(GOPATH)/bin/gopls:
$(call go-install, golang.org/x/tools/gopls)

.PHONY: gomodifytags/install
gomodifytags/install: $(GOPATH)/bin/gomodifytags

$(GOPATH)/bin/gomodifytags:
$(call go-install, github.com/fatih/gomodifytags)

.PHONY: impl/install
impl/install: $(GOPATH)/bin/impl

$(GOPATH)/bin/impl:
$(call go-install, github.com/josharian/impl)

.PHONY: goplay/install
goplay/install: $(GOPATH)/bin/goplay

$(GOPATH)/bin/goplay:
$(call go-install, github.com/haya14busa/goplay/cmd/goplay)

.PHONY: delve/install
delve/install: $(GOPATH)/bin/dlv

$(GOPATH)/bin/dlv:
$(call go-install, github.com/go-delve/delve/cmd/dlv)

.PHONY: staticcheck/install
staticcheck/install: $(GOPATH)/bin/staticcheck

$(GOPATH)/bin/staticcheck:
$(call go-install, honnef.co/go/tools/cmd/staticcheck)

.PHONY: rust/install
rust/install: $(CARGO_HOME)/bin/cargo

Expand Down
13 changes: 10 additions & 3 deletions dockers/dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
ARG MAINTAINER="vdaas.org vald team <[email protected]>"

# skipcq: DOK-DL3026
FROM --platform=${TARGETPLATFORM} ubuntu:devel AS builder
# we should stick to official devcontainers as a base image because it is well tested to be used with the vscode devcontainer extension.
FROM --platform=${BUILDPLATFORM} mcr.microsoft.com/vscode/devcontainers/base:debian
LABEL maintainer="${MAINTAINER}"

ARG GO_VERSION
Expand Down Expand Up @@ -71,7 +72,6 @@ COPY rust rust
COPY hack/go.mod.default hack/go.mod.default
COPY example/client/go.mod.default example/client/go.mod.default

# basic deps
RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \
--mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \
make GOARCH=${TARGETARCH} GOOS=${TARGETOS} deps GO_CLEAN_DEPS=false \
Expand All @@ -89,4 +89,11 @@ RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \
&& make k9s/install \
&& make minikube/install \
&& make stern/install \
&& make telepresence/install
&& make telepresence/install \
&& echo "installing golang vscode extension dependencies" \
&& make gopls/install \
&& make gotests/install \
&& make gomodifytags/install \
&& make impl/install \
&& make delve/install \
&& make staticcheck/install
4 changes: 3 additions & 1 deletion hack/license/gen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,9 @@ func readAndRewrite(path string) error {
line := sc.Text()
if filepath.Ext(path) == ".go" && strings.HasPrefix(line, "//go:") ||
filepath.Ext(path) == ".py" && strings.HasPrefix(line, "# -*-") ||
filepath.Ext(path) == ".sh" && strings.HasPrefix(line, "#!") {
filepath.Ext(path) == ".sh" && strings.HasPrefix(line, "#!") ||
filepath.Ext(path) == ".yaml" && strings.HasPrefix(line, "# !") ||
filepath.Ext(path) == ".yml" && strings.HasPrefix(line, "# !") {
bf = true
_, err = buf.WriteString(line)
if err != nil {
Expand Down

0 comments on commit dc13d9e

Please sign in to comment.