From 38dac4eaf3b9ddc4cff6f386e55534190b705ace Mon Sep 17 00:00:00 2001 From: Molly Karcher Date: Fri, 16 Jun 2023 14:38:30 -0400 Subject: [PATCH] Pinning and updates golang and ubuntu images --- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/go.yml | 14 +++++++------- .github/workflows/golangci-lint.yml | 2 +- .github/workflows/horizon-master.yml | 2 +- .github/workflows/horizon-release.yml | 4 ++-- .github/workflows/horizon.yml | 6 +++--- exp/services/recoverysigner/docker/Dockerfile | 4 ++-- exp/services/webauth/docker/Dockerfile | 4 ++-- services/friendbot/docker/Dockerfile | 4 ++-- services/horizon/docker/Dockerfile.dev | 4 ++-- services/horizon/docker/verify-range/Dockerfile | 4 +--- services/horizon/docker/verify-range/start | 4 ++-- .../internal/scripts/check_release_hash/Dockerfile | 2 +- 13 files changed, 27 insertions(+), 29 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index f0033bba61..9fbf83bbd7 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -15,7 +15,7 @@ on: jobs: analyze: name: Analyze - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: fail-fast: false diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 795ff54318..84db2f5848 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -9,7 +9,7 @@ jobs: complete: if: always() needs: [check, build, test] - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') run: exit 1 @@ -17,8 +17,8 @@ jobs: check: strategy: matrix: - os: [ubuntu-20.04] - go: [1.20.1] + os: [ubuntu-22.04] + go: ["1.20"] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 @@ -37,8 +37,8 @@ jobs: build: strategy: matrix: - os: [ubuntu-20.04] - go: [1.19.6, 1.20.1] + os: [ubuntu-22.04] + go: ["1.19", "1.20"] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 @@ -55,8 +55,8 @@ jobs: test: strategy: matrix: - os: [ubuntu-20.04] - go: [1.19.6, 1.20.1] + os: [ubuntu-22.04] + go: ["1.19", "1.20"] pg: [9.6.5, 10] runs-on: ${{ matrix.os }} services: diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 4f48b972a2..fbf7423bdb 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -12,7 +12,7 @@ permissions: jobs: golangci: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Checkout uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # version v3.0.2 diff --git a/.github/workflows/horizon-master.yml b/.github/workflows/horizon-master.yml index 556c481b20..e2487a0d64 100644 --- a/.github/workflows/horizon-master.yml +++ b/.github/workflows/horizon-master.yml @@ -8,7 +8,7 @@ jobs: push-state-diff-image: name: Push stellar/ledger-state-diff:{sha,latest} to DockerHub - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/horizon-release.yml b/.github/workflows/horizon-release.yml index aacdcea849..f8dda0ceac 100644 --- a/.github/workflows/horizon-release.yml +++ b/.github/workflows/horizon-release.yml @@ -7,7 +7,7 @@ on: jobs: publish-artifacts: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 name: Upload artifacts to GitHub release steps: - name: Run deprecation tests @@ -22,7 +22,7 @@ jobs: - uses: ./.github/actions/setup-go with: - go-version: 1.20.1 + go-version: "1.20" - name: Check dependencies run: ./gomod.sh diff --git a/.github/workflows/horizon.yml b/.github/workflows/horizon.yml index 68fa123de3..6f02ce4bd3 100644 --- a/.github/workflows/horizon.yml +++ b/.github/workflows/horizon.yml @@ -11,8 +11,8 @@ jobs: name: Integration tests strategy: matrix: - os: [ubuntu-20.04] - go: [1.19.6, 1.20.1] + os: [ubuntu-20.04, ubuntu-22.04] + go: ["1.19", "1.20"] pg: [9.6.5] ingestion-backend: [db, captive-core, captive-core-remote-storage] protocol-version: [19] @@ -106,7 +106,7 @@ jobs: verify-range: name: Test (and push) verify-range image - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 env: STELLAR_CORE_VERSION: 19.11.0-1323.7fb6d5e88.focal CAPTIVE_CORE_STORAGE_PATH: /tmp diff --git a/exp/services/recoverysigner/docker/Dockerfile b/exp/services/recoverysigner/docker/Dockerfile index fed1d7c190..8cd9a72ae6 100644 --- a/exp/services/recoverysigner/docker/Dockerfile +++ b/exp/services/recoverysigner/docker/Dockerfile @@ -1,11 +1,11 @@ -FROM golang:1.19 as build +FROM golang:1.20-bullseye as build ADD . /src/recoverysigner WORKDIR /src/recoverysigner RUN go build -o /bin/recoverysigner ./exp/services/recoverysigner -FROM ubuntu:20.04 +FROM ubuntu:22.04 RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates COPY --from=build /bin/recoverysigner /app/ diff --git a/exp/services/webauth/docker/Dockerfile b/exp/services/webauth/docker/Dockerfile index 4acd1ebf2b..c6bc287d5b 100644 --- a/exp/services/webauth/docker/Dockerfile +++ b/exp/services/webauth/docker/Dockerfile @@ -1,11 +1,11 @@ -FROM golang:1.19 as build +FROM golang:1.20-bullseye as build ADD . /src/webauth WORKDIR /src/webauth RUN go build -o /bin/webauth ./exp/services/webauth -FROM ubuntu:20.04 +FROM ubuntu:22.04 RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates COPY --from=build /bin/webauth /app/ diff --git a/services/friendbot/docker/Dockerfile b/services/friendbot/docker/Dockerfile index 24c0ca3120..dc1c74b93f 100644 --- a/services/friendbot/docker/Dockerfile +++ b/services/friendbot/docker/Dockerfile @@ -1,10 +1,10 @@ -FROM golang:1.19.1 as build +FROM golang:1.20-bullseye as build ADD . /src/friendbot WORKDIR /src/friendbot RUN go build -o /bin/friendbot ./services/friendbot -FROM ubuntu:20.04 +FROM ubuntu:22.04 RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates COPY --from=build /bin/friendbot /app/ diff --git a/services/horizon/docker/Dockerfile.dev b/services/horizon/docker/Dockerfile.dev index ab0b9cd301..1d1be8d688 100644 --- a/services/horizon/docker/Dockerfile.dev +++ b/services/horizon/docker/Dockerfile.dev @@ -1,4 +1,4 @@ -FROM golang:1.20 AS builder +FROM golang:1.20-bullseye AS builder ARG VERSION="devel" WORKDIR /go/src/github.com/stellar/go @@ -8,7 +8,7 @@ COPY . ./ ENV GOFLAGS="-ldflags=-X=github.com/stellar/go/support/app.version=${VERSION}-(built-from-source)" RUN go install github.com/stellar/go/services/horizon -FROM ubuntu:20.04 +FROM ubuntu:22.04 ARG STELLAR_CORE_VERSION ENV STELLAR_CORE_VERSION=${STELLAR_CORE_VERSION:-*} ENV STELLAR_CORE_BINARY_PATH /usr/bin/stellar-core diff --git a/services/horizon/docker/verify-range/Dockerfile b/services/horizon/docker/verify-range/Dockerfile index 499f86881e..56f8c84796 100644 --- a/services/horizon/docker/verify-range/Dockerfile +++ b/services/horizon/docker/verify-range/Dockerfile @@ -1,6 +1,4 @@ -FROM ubuntu:20.04 - -MAINTAINER Bartek Nowotarski +FROM ubuntu:22.04 ARG STELLAR_CORE_VERSION ENV STELLAR_CORE_VERSION=${STELLAR_CORE_VERSION:-*} diff --git a/services/horizon/docker/verify-range/start b/services/horizon/docker/verify-range/start index 3402670ac2..7d29ab886b 100644 --- a/services/horizon/docker/verify-range/start +++ b/services/horizon/docker/verify-range/start @@ -8,8 +8,8 @@ fi rm -rf "$PGDATA"/* sudo chown -R postgres "$PGDATA" sudo chmod -R 775 "$PGDATA" -sudo -u postgres --preserve-env=PGDATA /usr/lib/postgresql/12/bin/initdb -sudo -u postgres --preserve-env=PGDATA /usr/lib/postgresql/12/bin/pg_ctl start +sudo -u postgres --preserve-env=PGDATA /usr/lib/postgresql/14/bin/initdb +sudo -u postgres --preserve-env=PGDATA /usr/lib/postgresql/14/bin/pg_ctl start sudo -u postgres createdb horizon sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';" diff --git a/services/horizon/internal/scripts/check_release_hash/Dockerfile b/services/horizon/internal/scripts/check_release_hash/Dockerfile index a323a4eb6d..b0b1666a41 100644 --- a/services/horizon/internal/scripts/check_release_hash/Dockerfile +++ b/services/horizon/internal/scripts/check_release_hash/Dockerfile @@ -1,5 +1,5 @@ # Change to Go version used in CI or rebuild with --build-arg. -ARG GO_IMAGE=golang:1.19.1 +ARG GO_IMAGE=golang:1.20-bullseye FROM $GO_IMAGE WORKDIR /go/src/github.com/stellar/go