Skip to content

Commit

Permalink
feat: rework when docker builds and have main builds use release prof…
Browse files Browse the repository at this point in the history
…ile. (#25826)
  • Loading branch information
jacksonrnewhouse authored Jan 13, 2025
1 parent 624e67e commit 5b73485
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 24 deletions.
47 changes: 24 additions & 23 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ nofork_filter: &nofork_filter
branches:
ignore: /pull\/[0-9]+/

docker_filter: &docker_filter
filters:
branches:
only:
- main
- /.*docker.*/

commands:
rust_components:
description: Verify installed components
Expand Down Expand Up @@ -447,9 +454,6 @@ jobs:
type: string
resource_class:
type: string
profile:
type: string
default: release
image_name:
type: string
default: influxdb3-core
Expand All @@ -458,6 +462,14 @@ jobs:
resource_class: << parameters.resource_class >>
steps:
- checkout
- run:
name: "Set Cargo profile based on branch"
command: |
if [ "$CIRCLE_BRANCH" = "main" ]; then
echo "export DOCKER_PROFILE=release" >> "$BASH_ENV"
else
echo "export DOCKER_PROFILE=quick-release" >> "$BASH_ENV"
fi
- run:
name: Build the docker image
command: |
Expand All @@ -466,7 +478,7 @@ jobs:
"aws,gcp,azure,jemalloc_replacing_malloc,tokio_console,system-py" \
"<< parameters.image_name >>:latest-<< parameters.platform >>" \
"<< parameters.platform >>" \
"<< parameters.profile >>"
"$DOCKER_PROFILE"
# linking might take a while and doesn't produce CLI output
no_output_timeout: 60m
Expand Down Expand Up @@ -513,7 +525,7 @@ workflows:
matrix:
parameters:
profile:
- quick-release
- release
target:
- aarch64-apple-darwin
- aarch64-unknown-linux-gnu
Expand Down Expand Up @@ -622,28 +634,17 @@ workflows:
- fmt
- cargo-audit
- build-docker:
<<: *nofork_filter
<<: *docker_filter
name: build-docker-amd64
matrix:
parameters:
platform: [amd64]
resource_class: [2xlarge+]
profile: [quick-release]
platform: amd64
resource_class: 2xlarge+
- build-docker:
<<: *nofork_filter
<<: *docker_filter
name: build-docker-arm64
matrix:
parameters:
platform: [arm64]
resource_class: [arm.2xlarge]
profile: [quick-release]
platform: arm64
resource_class: arm.2xlarge
- publish-docker:
<<: *main_filter
requires:
- build-docker-amd64
- build-docker-arm64
- wait-for-docker:
<<: *docker_filter
requires:
- build-docker-amd64
- build-docker-arm64
- publish-docker
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ RUN \
FROM debian:bookworm-slim

RUN apt update \
&& apt install --yes ca-certificates gettext-base libssl3 python3 python3-dev python3-pip --no-install-recommends \
&& apt install --yes ca-certificates gettext-base libssl3 python3 python3-dev python3-pip wget curl --no-install-recommends \
&& rm -rf /var/lib/{apt,dpkg,cache,log} \
&& groupadd --gid 1500 influxdb3 \
&& useradd --uid 1500 --gid influxdb3 --shell /bin/bash --create-home influxdb3
Expand Down

0 comments on commit 5b73485

Please sign in to comment.