Skip to content

Commit

Permalink
Use Go 1.19 for building
Browse files Browse the repository at this point in the history
Triggered by experimenting with log/slog, which requires atomic.Int64. I
would have used Go 1.20 but it is not available via homebrew yet.
  • Loading branch information
michaelsauter committed Feb 17, 2023
1 parent 982989e commit 80c24d3
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ listed in the changelog.
- Node.js 18 is now the default for `ods-build-npm` task ([#585](https://github.com/opendevstack/ods-pipeline/issues/585))
- Images used in tasks are now pulled directly from the GitHub registry. "Wrapping" the images in the OpenShift/K8s cluster is not required anymore. If tasks need to trust a private certificate, it needs to be present as a K8s secret, which will then be mounted as a file in the pods. To add the secret to an existing installation, pass `--private-cert <host>` to `./install.sh`. For more details, see [#621](https://github.com/opendevstack/ods-pipeline/issues/621).
- Remove PVC use protection ([#647](https://github.com/opendevstack/ods-pipeline/issues/647))
- Use Go 1.19 for building ([#659](https://github.com/opendevstack/ods-pipeline/issues/659))

### Fixed

Expand Down
3 changes: 2 additions & 1 deletion build/package/Dockerfile.finish
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
FROM registry.access.redhat.com/ubi8/go-toolset:1.18 AS builder
FROM golang:1.19 as builder

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
USER root
WORKDIR /usr/src/app

# Build Go binary.
COPY go.mod .
Expand Down
3 changes: 2 additions & 1 deletion build/package/Dockerfile.helm
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
FROM registry.access.redhat.com/ubi8/go-toolset:1.18 AS builder
FROM golang:1.19 as builder

ARG TARGETARCH

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
USER root
WORKDIR /usr/src/app

ENV HELM_VERSION=3.5.2 \
SOPS_VERSION=3.7.1 \
Expand Down
3 changes: 2 additions & 1 deletion build/package/Dockerfile.package-image
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
FROM registry.access.redhat.com/ubi8/go-toolset:1.18 AS builder
FROM golang:1.19 as builder

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
USER root
WORKDIR /usr/src/app

# Build Go binary.
COPY go.mod .
Expand Down
3 changes: 2 additions & 1 deletion build/package/Dockerfile.pipeline-manager
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
FROM registry.access.redhat.com/ubi8/go-toolset:1.18 AS builder
FROM golang:1.19 as builder

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
USER root
WORKDIR /usr/src/app

# Build Go binary.
COPY go.mod .
Expand Down
6 changes: 4 additions & 2 deletions build/package/Dockerfile.sonar
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
FROM registry.access.redhat.com/ubi8/go-toolset:1.18 AS builder
FROM golang:1.19 as builder

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
USER root
WORKDIR /usr/src/app

ENV SONAR_SCANNER_VERSION=3.1.0.1141 \
CNES_REPORT_VERSION=3.2.2
Expand All @@ -16,7 +17,8 @@ COPY pkg pkg
RUN cd cmd/sonar && CGO_ENABLED=0 go build -o /usr/local/bin/sonar

# Install Sonar Scanner.
RUN cd /tmp \
RUN apt-get update && apt-get install -y unzip \
&& cd /tmp \
&& curl -LO https://repo1.maven.org/maven2/org/sonarsource/scanner/cli/sonar-scanner-cli/${SONAR_SCANNER_VERSION}/sonar-scanner-cli-${SONAR_SCANNER_VERSION}.zip \
&& unzip sonar-scanner-cli-${SONAR_SCANNER_VERSION}.zip \
&& mv sonar-scanner-${SONAR_SCANNER_VERSION} /usr/local/sonar-scanner-cli
Expand Down
4 changes: 3 additions & 1 deletion build/package/Dockerfile.start
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
FROM registry.access.redhat.com/ubi8/go-toolset:1.18 AS builder
FROM golang:1.19 as builder

ARG TARGETARCH

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
USER root
WORKDIR /usr/src/app

ENV GIT_LFS_VERSION=3.0.2

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/opendevstack/pipeline

go 1.18
go 1.19

require (
github.com/google/go-cmp v0.5.8
Expand Down
2 changes: 1 addition & 1 deletion test/tasks/ods-package-image_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/opendevstack/pipeline/pkg/logging"
"github.com/opendevstack/pipeline/pkg/pipelinectxt"
"github.com/opendevstack/pipeline/pkg/tasktesting"
"k8s.io/utils/strings/slices"
"golang.org/x/exp/slices"
)

func TestTaskODSPackageImage(t *testing.T) {
Expand Down

0 comments on commit 80c24d3

Please sign in to comment.