Skip to content

Commit

Permalink
Upgrade backend deps, base images and GH actions (#3685)
Browse files Browse the repository at this point in the history
Signed-off-by: Sergio Castaño Arteaga <[email protected]>
  • Loading branch information
tegioz authored Mar 4, 2024
1 parent 51e887c commit ecb7a29
Show file tree
Hide file tree
Showing 11 changed files with 383 additions and 476 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/chart-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@v3
uses: azure/setup-helm@v4
with:
version: v3.9.2
- name: Set up Python
Expand All @@ -36,7 +36,7 @@ jobs:
- name: Run chart-testing (lint)
run: ct lint --config .ct.yaml --target-branch ${{ github.event.repository.default_branch }}
- name: Create kind cluster
uses: helm/kind-action@v1.8.0
uses: helm/kind-action@v1.9.0
if: steps.list-changed.outputs.changed == 'true'
- name: Run chart-testing (install)
run: ct install --config .ct.yaml
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
sudo tar -C /usr/local -xzf ${FILENAME}
sudo ldconfig /usr/local/lib
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v4
with:
version: v1.51.2
args: --timeout 10m
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
with:
go-version: "1.20"
- name: Cache Go modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
Expand All @@ -126,7 +126,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Cache node modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ./web/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
Expand All @@ -153,7 +153,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Cache node modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ./widget/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
Expand Down Expand Up @@ -182,7 +182,7 @@ jobs:
with:
go-version: "1.20"
- name: Cache Go modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
Expand Down Expand Up @@ -212,7 +212,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Cache node modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ./web/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
Expand All @@ -233,7 +233,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Cache node modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ./widget/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GHT_RELEASE }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
- name: Set up Helm
uses: azure/setup-helm@v3
uses: azure/setup-helm@v4
- name: Checkout Helm charts repo
uses: actions/checkout@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions cmd/ah/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build ah
FROM golang:1.21.6-alpine3.19 AS ah-builder
FROM golang:1.22.0-alpine3.19 AS ah-builder
ARG VERSION
ARG GIT_COMMIT
WORKDIR /go/src/github.com/artifacthub/ah
Expand All @@ -10,7 +10,7 @@ WORKDIR /go/src/github.com/artifacthub/ah/cmd/ah
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-X main.version=$VERSION -X main.gitCommit=$GIT_COMMIT" -o /ah .

# Final stage
FROM alpine:3.19.0
FROM alpine:3.19.1
RUN apk --no-cache add git && addgroup -S ah -g 1000 && adduser -S ah -u 1000 -G ah
USER 1000
COPY --from=ah-builder /ah /usr/local/bin
4 changes: 2 additions & 2 deletions cmd/hub/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build backend
FROM golang:1.21.6-alpine3.19 AS backend-builder
FROM golang:1.22.0-alpine3.19 AS backend-builder
WORKDIR /go/src/github.com/artifacthub/hub
COPY go.* ./
COPY cmd/hub cmd/hub
Expand Down Expand Up @@ -34,7 +34,7 @@ WORKDIR /docs/www
RUN hugo

# Final stage
FROM alpine:3.19.0
FROM alpine:3.19.1
RUN apk --no-cache add ca-certificates && addgroup -S hub -g 1000 && adduser -S hub -u 1000 -G hub
USER 1000
WORKDIR /home/hub
Expand Down
6 changes: 3 additions & 3 deletions cmd/scanner/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build scanner
FROM golang:1.21.6-alpine3.19 AS scanner-builder
FROM golang:1.22.0-alpine3.19 AS scanner-builder
WORKDIR /go/src/github.com/artifacthub/scanner
COPY go.* ./
COPY cmd/scanner cmd/scanner
Expand All @@ -8,12 +8,12 @@ WORKDIR /go/src/github.com/artifacthub/scanner/cmd/scanner
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /scanner .

# Trivy installer
FROM alpine:3.19.0 AS trivy-installer
FROM alpine:3.19.1 AS trivy-installer
RUN apk --no-cache add curl
RUN curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin v0.44.1

# Final stage
FROM alpine:3.19.0
FROM alpine:3.19.1
RUN apk --no-cache add ca-certificates && addgroup -S scanner -g 1000 && adduser -S scanner -u 1000 -G scanner
USER 1000
WORKDIR /home/scanner
Expand Down
4 changes: 2 additions & 2 deletions cmd/tracker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build tracker
FROM golang:1.21.5-bullseye AS builder
FROM golang:1.22.0-bullseye AS builder
WORKDIR /tmp
ENV LIBTENSORFLOW_TGZ libtensorflow-cpu-linux-x86_64-2.11.0.tar.gz
RUN wget -q --no-check-certificate https://storage.googleapis.com/tensorflow/libtensorflow/$LIBTENSORFLOW_TGZ
Expand All @@ -13,7 +13,7 @@ WORKDIR /go/src/github.com/artifacthub/hub/cmd/tracker
RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -o /tracker .

# OPM installer
FROM golang:1.19-bullseye AS opm-installer
FROM golang:1.22-bullseye AS opm-installer
WORKDIR /tmp
RUN git clone https://github.com/operator-framework/operator-registry
WORKDIR /tmp/operator-registry/cmd/opm
Expand Down
4 changes: 2 additions & 2 deletions database/migrations/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Build tern
FROM golang:1.21.6-alpine3.19 AS tern
FROM golang:1.22.0-alpine3.19 AS tern
RUN apk --no-cache add git
RUN go install github.com/jackc/tern@latest

# Build final image
FROM alpine:3.19.0
FROM alpine:3.19.1
RUN addgroup -S db-migrator -g 1000 && adduser -S db-migrator -u 1000 -G db-migrator
USER 1000
WORKDIR /home/db-migrator
Expand Down
4 changes: 2 additions & 2 deletions database/tests/Dockerfile-db-tests
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Build tern
FROM golang:1.21.6-alpine3.19 AS tern
FROM golang:1.22.0-alpine3.19 AS tern
RUN apk --no-cache add git
RUN go get -u github.com/jackc/tern

# Build final image
FROM alpine:3.19.0
FROM alpine:3.19.1
RUN apk --no-cache add git perl-app-cpanminus postgresql-client
RUN cpanm --no-wget TAP::Parser::SourceHandler::pgTAP
RUN addgroup -S db-tests && adduser -S db-tests -G db-tests
Expand Down
Loading

0 comments on commit ecb7a29

Please sign in to comment.