diff --git a/.github/actions/free-disk-space/action.yml b/.github/actions/free-disk-space/action.yml new file mode 100644 index 00000000000..4becebd4ed3 --- /dev/null +++ b/.github/actions/free-disk-space/action.yml @@ -0,0 +1,28 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: Free Disk Space +description: Remove unnecessary software to free disk space for Docker builds +runs: + using: composite + steps: + - run: | + sudo rm -rf /usr/share/dotnet + sudo rm -rf /usr/local/lib/android + sudo rm -rf /opt/ghc + sudo rm -rf /opt/hostedtoolcache/CodeQL + docker system prune -af + docker volume prune -f + shell: bash diff --git a/.github/workflows/NOTICE-year-check.yml b/.github/workflows/NOTICE-year-check.yml index 2fff55c63f1..d2e701ee912 100644 --- a/.github/workflows/NOTICE-year-check.yml +++ b/.github/workflows/NOTICE-year-check.yml @@ -17,11 +17,13 @@ name: NOTICE-year-check on: [pull_request] - +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: notice-year-check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: check the NOTICE file run: grep $(date +"%Y") NOTICE diff --git a/.github/workflows/asf-header-check.yml b/.github/workflows/asf-header-check.yml index c47e94402eb..82a643d1f85 100644 --- a/.github/workflows/asf-header-check.yml +++ b/.github/workflows/asf-header-check.yml @@ -20,14 +20,16 @@ name: check-Apache-license-header on: pull_request: branches: [ main ] - +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: check-ASF-header: name: check Apache license header runs-on: ubuntu-24.04 steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Check License Header uses: apache/skywalking-eyes@main diff --git a/.github/workflows/auto-cherry-pick.yml b/.github/workflows/auto-cherry-pick.yml index 39de99faa64..2d6f82b1264 100644 --- a/.github/workflows/auto-cherry-pick.yml +++ b/.github/workflows/auto-cherry-pick.yml @@ -28,7 +28,7 @@ jobs: if: github.event.pull_request.merged == true runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Auto Cherry Pick diff --git a/.github/workflows/build-builder.yml b/.github/workflows/build-builder.yml index abdc25f2ca4..52bd3add0fc 100644 --- a/.github/workflows/build-builder.yml +++ b/.github/workflows/build-builder.yml @@ -25,8 +25,8 @@ jobs: name: Build lake-builder image runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 - - uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + - uses: actions/checkout@v4 + - uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_REGISTRY_USERNAME }} password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 34e9f284586..f3d023d346b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,26 +33,19 @@ jobs: name: Build and Push devlake builder runs-on: ubuntu-latest steps: - - name: Free Disk Space - run: | - sudo rm -rf /usr/share/dotnet - sudo rm -rf /usr/local/lib/android - sudo rm -rf /opt/ghc - sudo rm -rf /opt/hostedtoolcache/CodeQL - docker system prune -af - docker volume prune -f - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - uses: ./.github/actions/free-disk-space - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ env.DOCKERHUB_USERNAME }} password: ${{ env.DOCKERHUB_TOKEN }} - name: Build and push lake image - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v6 with: context: ./backend push: true @@ -65,26 +58,19 @@ jobs: name: Build and Push devlake base runs-on: ubuntu-latest steps: - - name: Free Disk Space - run: | - sudo rm -rf /usr/share/dotnet - sudo rm -rf /usr/local/lib/android - sudo rm -rf /opt/ghc - sudo rm -rf /opt/hostedtoolcache/CodeQL - docker system prune -af - docker volume prune -f - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - uses: ./.github/actions/free-disk-space - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ env.DOCKERHUB_USERNAME }} password: ${{ env.DOCKERHUB_TOKEN }} - name: Build and push lake image - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v6 with: context: ./backend push: true @@ -101,33 +87,26 @@ jobs: matrix: platform: ["arm64", "amd64"] steps: - - name: Free Disk Space - run: | - sudo rm -rf /usr/share/dotnet - sudo rm -rf /usr/local/lib/android - sudo rm -rf /opt/ghc - sudo rm -rf /opt/hostedtoolcache/CodeQL - docker system prune -af - docker volume prune -f - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - uses: ./.github/actions/free-disk-space - name: Get short sha id: get_short_sha run: echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ env.DOCKERHUB_USERNAME }} password: ${{ env.DOCKERHUB_TOKEN }} - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: /tmp/devlake-build-cache-${{ matrix.platform }} key: buildx-devlake-build-cache-${{ github.run_id }}-${{ matrix.platform }} - name: Build and cache lake build - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v6 with: context: ./backend push: false @@ -153,32 +132,25 @@ jobs: name: Build and Push devlake image runs-on: ubuntu-latest steps: - - name: Free Disk Space - run: | - sudo rm -rf /usr/share/dotnet - sudo rm -rf /usr/local/lib/android - sudo rm -rf /opt/ghc - sudo rm -rf /opt/hostedtoolcache/CodeQL - docker system prune -af - docker volume prune -f - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - uses: ./.github/actions/free-disk-space - name: Get short sha id: get_short_sha run: echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ env.DOCKERHUB_USERNAME }} password: ${{ env.DOCKERHUB_TOKEN }} - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: /tmp/devlake-build-cache-amd64 key: buildx-devlake-build-cache-${{ github.run_id }}-amd64 - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: /tmp/devlake-build-cache-arm64 key: buildx-devlake-build-cache-${{ github.run_id }}-arm64 @@ -194,7 +166,7 @@ jobs: echo "TAGS=${image_name}:${{ github.ref_name }}_${{ needs.get-timestamp.outputs.timestamp }}_${{ steps.get_short_sha.outputs.SHORT_SHA }}" >> $GITHUB_OUTPUT fi - name: Build and push lake image - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v6 with: context: ./backend push: true @@ -209,7 +181,7 @@ jobs: TAG=${{ github.ref_name }} SHA=${{ steps.get_short_sha.outputs.SHORT_SHA }} - name: Clear cache - uses: actions/github-script@v6 + uses: actions/github-script@v7 if: always() with: script: | @@ -240,24 +212,17 @@ jobs: image: devlake-dashboard context: grafana steps: - - name: Free Disk Space - run: | - sudo rm -rf /usr/share/dotnet - sudo rm -rf /usr/local/lib/android - sudo rm -rf /opt/ghc - sudo rm -rf /opt/hostedtoolcache/CodeQL - docker system prune -af - docker volume prune -f - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - uses: ./.github/actions/free-disk-space - name: Get short sha id: get_short_sha run: echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ env.DOCKERHUB_USERNAME }} password: ${{ env.DOCKERHUB_TOKEN }} @@ -273,7 +238,7 @@ jobs: echo "TAGS=${image_name}:${{ github.ref_name }}_${{ needs.get-timestamp.outputs.timestamp }}_${{ steps.get_short_sha.outputs.SHORT_SHA }}" >> $GITHUB_OUTPUT fi - name: Build and push ${{ matrix.build.name }} image - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v6 with: context: ${{ matrix.build.context }} push: true diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml index 7697e7bd09f..6efb66163e6 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/codespell.yml @@ -26,7 +26,9 @@ on: permissions: contents: read - +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: codespell: name: Check for spelling errors diff --git a/.github/workflows/commit-msg.yml b/.github/workflows/commit-msg.yml index 18fefb2b3de..9a79cb8099e 100644 --- a/.github/workflows/commit-msg.yml +++ b/.github/workflows/commit-msg.yml @@ -17,17 +17,19 @@ name: lint-commit-message on: [pull_request] - +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: commit-msg: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Cache lint-commit-message id: cache-lint-commit-message - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: lint-commit-message key: ${{ runner.os }}-lint-commit-message diff --git a/.github/workflows/config-ui.yml b/.github/workflows/config-ui.yml index d4152860d65..4f9e5d67a6c 100644 --- a/.github/workflows/config-ui.yml +++ b/.github/workflows/config-ui.yml @@ -21,13 +21,16 @@ on: branches: [ main ] paths: - 'config-ui/**' +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: '18' cache: 'yarn' diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 7084ba598eb..af75f3908e7 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -23,16 +23,20 @@ on: branches: - main pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: golangci: name: lint runs-on: ubuntu-latest + # TODO: Pin to specific version tag for reproducibility (e.g., mericodev/lake-builder:builder-vX.X.X) container: mericodev/lake-builder:latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Cache golangci-lint id: cache-golangci-lint - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: golangci-lint key: ${{ runner.os }}-backend-golangci-lint @@ -44,5 +48,5 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v6 with: - version: v1.53.3 + version: v1.63.4 working-directory: ./backend diff --git a/.github/workflows/grafana-dashboards-check.yml b/.github/workflows/grafana-dashboards-check.yml index a25bf4b1d67..7f44a690f49 100644 --- a/.github/workflows/grafana-dashboards-check.yml +++ b/.github/workflows/grafana-dashboards-check.yml @@ -21,14 +21,16 @@ on: branches: - main - release-* - +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: check-grafana-dashboards: name: check grafana dashboards runs-on: ubuntu-24.04 steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Check grafana dashboards whether using mysql uid run: | if grep '"type": "mysql"' grafana/dashboards/*; then diff --git a/.github/workflows/migration-script-lint.yml b/.github/workflows/migration-script-lint.yml index 0429f03796d..fa752079914 100644 --- a/.github/workflows/migration-script-lint.yml +++ b/.github/workflows/migration-script-lint.yml @@ -23,13 +23,17 @@ on: branches: - main pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: migration-script-lint: name: migration-script-lint runs-on: ubuntu-latest + # TODO: Pin to specific version tag for reproducibility (e.g., mericodev/lake-builder:builder-vX.X.X) container: mericodev/lake-builder:latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: migration script linting run: | go version diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 17fcb20b5f1..016ad8f6817 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -27,7 +27,7 @@ jobs: stale: runs-on: ubuntu-latest steps: - - uses: actions/stale@v4 + - uses: actions/stale@v9 with: # Stale Issues days-before-issue-stale: 60 diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/test-e2e.yml index 4b078f8f6c3..1effa975196 100644 --- a/.github/workflows/test-e2e.yml +++ b/.github/workflows/test-e2e.yml @@ -34,6 +34,9 @@ on: - "test/**" - "e2e/**" - "devops/**" +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: e2e-mysql: runs-on: ubuntu-latest @@ -45,11 +48,13 @@ jobs: MYSQL_USER: merico MYSQL_PASSWORD: merico MYSQL_ROOT_PASSWORD: root + # TODO: Pin to specific version tag for reproducibility (e.g., mericodev/lake-builder:builder-vX.X.X) container: mericodev/lake-builder:latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - run: git config --global --add safe.directory $(pwd) + # TODO: Consider including pre-built Python in the lake-builder image to avoid duplicating this step across jobs - name: Build Python run: | cd backend @@ -57,7 +62,7 @@ jobs: make build-python - name: Cache test-e2e id: cache-test-e2e - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.cache/go-build @@ -85,10 +90,11 @@ jobs: POSTGRES_DB: lake POSTGRES_USER: merico POSTGRES_PASSWORD: merico + # TODO: Pin to specific version tag for reproducibility (e.g., mericodev/lake-builder:builder-vX.X.X) container: mericodev/lake-builder:latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - run: git config --global --add safe.directory $(pwd) - name: Build Python run: | @@ -97,7 +103,7 @@ jobs: make build-python - name: Cache test-e2e-pg id: cache-test-e2e-pg - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.cache/go-build diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2ef9da145c4..ecafdc92c2c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,17 +34,20 @@ on: - 'test/**' schedule: - cron: '0 0 * * *' # run ci every night - +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: test: strategy: matrix: os: [ubuntu-latest] runs-on: ${{ matrix.os }} + # TODO: Pin to specific version tag for reproducibility (e.g., mericodev/lake-builder:builder-vX.X.X) container: mericodev/lake-builder:latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set git config run: git config --global --add safe.directory $(pwd) - name: Build Python @@ -54,7 +57,7 @@ jobs: make build-python - name: Cache unit-test id: cache-unit-test - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.cache/go-build diff --git a/.github/workflows/yaml-lint.yml b/.github/workflows/yaml-lint.yml index 6c9dde504df..2064af256d7 100644 --- a/.github/workflows/yaml-lint.yml +++ b/.github/workflows/yaml-lint.yml @@ -21,13 +21,20 @@ on: branches: - main pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: yaml-lint: name: lint for yamls runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: github/super-linter/slim@v4 + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: github/super-linter/slim@v7 env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} FILTER_REGEX_INCLUDE: workspace/(docker-compose.yml|deployment/k8s/k8s-deploy.yaml) + VALIDATE_YAML: true diff --git a/backend/.dockerignore b/backend/.dockerignore new file mode 100644 index 00000000000..2835af06545 --- /dev/null +++ b/backend/.dockerignore @@ -0,0 +1,6 @@ +mocks/ +bin/ +*.test +.env +.env.* +logs/ diff --git a/backend/Dockerfile b/backend/Dockerfile index 69cbeca7add..b67cea96c25 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -24,14 +24,16 @@ #it does indicate that the project has yet to be fully endorsed by the ASF. FROM --platform=linux/amd64 debian:bookworm as debian-amd64 -RUN apt-get update -RUN apt-get install -y libssh2-1-dev libssl-dev zlib1g-dev +RUN apt-get update && \ + apt-get install -y libssh2-1-dev libssl-dev zlib1g-dev && \ + rm -rf /var/lib/apt/lists/* FROM --platform=linux/arm64 debian:bookworm as debian-arm64 -RUN apt-get update -RUN apt-get install -y libssh2-1-dev libssl-dev zlib1g-dev +RUN apt-get update && \ + apt-get install -y libssh2-1-dev libssl-dev zlib1g-dev && \ + rm -rf /var/lib/apt/lists/* -FROM --platform=$BUILDPLATFORM golang:1.20.5-bookworm as builder +FROM --platform=$BUILDPLATFORM golang:1.22-bookworm as builder # docker build --build-arg GOPROXY=https://goproxy.io,direct -t mericodev/lake . ARG GOPROXY= @@ -39,8 +41,9 @@ ARG GOPROXY= ARG HTTP_PROXY= ARG HTTPS_PROXY= -RUN apt-get update -RUN apt-get install -y gcc binutils libfindbin-libs-perl cmake libssh2-1-dev libssl-dev zlib1g-dev +RUN apt-get update && \ + apt-get install -y gcc binutils libfindbin-libs-perl cmake libssh2-1-dev libssl-dev zlib1g-dev && \ + rm -rf /var/lib/apt/lists/* RUN if [ "$(arch)" != "aarch64" ] ; then \ apt-get install -y gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu ; \ @@ -91,6 +94,7 @@ ARG SHA= ARG GO_PLUGINS= RUN --mount=type=cache,target=/root/.cache/go-build \ + --mount=type=cache,target=/go/pkg/mod \ if [ "$TARGETPLATFORM" = "linux/arm64" ] ; then \ ln -s /usr/local/deps/aarch64 /usr/local/deps/target && \ export CC=aarch64-linux-gnu-gcc && \ diff --git a/backend/core/migration/linter/main.go b/backend/core/migration/linter/main.go index bf9190b72e1..11aae870ce9 100644 --- a/backend/core/migration/linter/main.go +++ b/backend/core/migration/linter/main.go @@ -51,7 +51,7 @@ func firstLineFromFile(path string) string { for scanner.Scan() { return scanner.Text() } - panic(fmt.Errorf("empty file: " + path)) + panic(fmt.Errorf("empty file: %s", path)) } const ( diff --git a/backend/go.mod b/backend/go.mod index b744729e1d5..5f4deab12e2 100644 --- a/backend/go.mod +++ b/backend/go.mod @@ -1,6 +1,6 @@ module github.com/apache/incubator-devlake -go 1.20 +go 1.22 require ( github.com/aws/aws-sdk-go v1.55.6 diff --git a/backend/impls/logruslog/logger.go b/backend/impls/logruslog/logger.go index 857d75ac263..88287c9f553 100644 --- a/backend/impls/logruslog/logger.go +++ b/backend/impls/logruslog/logger.go @@ -72,11 +72,11 @@ func (l *DefaultLogger) Info(format string, a ...interface{}) { } func (l *DefaultLogger) Warn(err error, format string, a ...interface{}) { - l.Log(log.LOG_WARN, formatMessage(err, format, a...)) + l.Log(log.LOG_WARN, "%s", formatMessage(err, format, a...)) } func (l *DefaultLogger) Error(err error, format string, a ...interface{}) { - l.Log(log.LOG_ERROR, formatMessage(err, format, a...)) + l.Log(log.LOG_ERROR, "%s", formatMessage(err, format, a...)) } func (l *DefaultLogger) SetStream(config *log.LoggerStreamConfig) { diff --git a/config-ui/Dockerfile b/config-ui/Dockerfile index 7fadb956bda..a8fda0f0407 100644 --- a/config-ui/Dockerfile +++ b/config-ui/Dockerfile @@ -26,9 +26,9 @@ FROM node:18-bookworm-slim as builder WORKDIR /home/node/code +COPY package.json yarn.lock ./ +RUN yarn install --frozen-lockfile COPY . . - -RUN yarn install RUN yarn build FROM nginxinc/nginx-unprivileged:1.29 diff --git a/devops/docker/lake-builder/Dockerfile b/devops/docker/lake-builder/Dockerfile index 61363f0bcff..27be950c119 100644 --- a/devops/docker/lake-builder/Dockerfile +++ b/devops/docker/lake-builder/Dockerfile @@ -18,7 +18,7 @@ FROM --platform=linux/amd64 debian:bullseye as debian-amd64 RUN apt-get -y update && apt -y upgrade &&\ apt-get install -y libssh2-1-dev libssl-dev zlib1g-dev -FROM golang:1.20.4-bullseye as builder +FROM golang:1.22-bullseye as builder # Base dependencies RUN apt-get -y update && apt -y upgrade &&\ @@ -55,7 +55,7 @@ COPY --from=builder /tmp/deps/include/ /usr/include/ ENV PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig # Install Golang -RUN curl -L https://git.io/vQhTU | bash -s -- --version 1.20.4 +RUN curl -L https://git.io/vQhTU | bash -s -- --version 1.22 RUN mv /root/go /go &&\ mv /root/.go /usr/local/go &&\ ln -sf /usr/local/go/bin/* /usr/bin