Skip to content

Commit

Permalink
use common go image (#243)
Browse files Browse the repository at this point in the history
  • Loading branch information
chimanjain authored and cbartoszDell committed Mar 19, 2024
1 parent 9d62c1e commit 6082d99
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download Go
uses: actions/setup-go@v2
with:
go-version: "1.21"
uses: actions/setup-go@v5
- name: Checkout the code
uses: actions/checkout@v4
- name: Vendor packages
Expand All @@ -52,4 +50,4 @@ jobs:
- name: Test
env:
GOPROXY: "https://proxy.golang.org"
run: cd service; go clean -cache; go test -v .
run: cd service; go clean -cache; go test -v ./...
2 changes: 1 addition & 1 deletion .github/workflows/linters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
name: golangci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version: "1.22"
cache: false
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.podman
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@

# some arguments that must be supplied
ARG GOPROXY
ARG GOVERSION
ARG GOIMAGE
ARG BASEIMAGE

# Stage to build the driver
FROM golang:${GOVERSION} as builder
FROM $GOIMAGE as builder
ARG GOPROXY
RUN mkdir -p /go/src
COPY ./ /go/src/
Expand Down
3 changes: 2 additions & 1 deletion docker.mk
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ podman-build: download-csm-common
bash ./buildubimicro.sh $(DEFAULT_BASEIMAGE)
@echo "Base image build: SUCCESS" $(eval BASEIMAGE=localhost/csipowerscale-ubimicro:latest)
@echo "Building: $(REGISTRY)/$(IMAGENAME):$(IMAGETAG)"
$(BUILDER) build -t "$(REGISTRY)/$(IMAGENAME):$(IMAGETAG)" -f Dockerfile.podman --target $(BUILDSTAGE) --build-arg GOPROXY=$(GOPROXY) --build-arg BASEIMAGE=$(BASEIMAGE) --build-arg GOVERSION=$(GOVERSION) .
@echo "Using Golang Image $(DEFAULT_GOIMAGE)"
$(BUILDER) build -t "$(REGISTRY)/$(IMAGENAME):$(IMAGETAG)" -f Dockerfile.podman --target $(BUILDSTAGE) --build-arg GOPROXY=$(GOPROXY) --build-arg BASEIMAGE=$(BASEIMAGE) --build-arg GOIMAGE=$(DEFAULT_GOIMAGE) .

podman-build-image-push:
@echo "Pushing: $(REGISTRY)/$(IMAGENAME):$(IMAGETAG)"
Expand Down

0 comments on commit 6082d99

Please sign in to comment.