Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: rework when docker builds and have main builds use release profile. #25826

Merged
merged 1 commit into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading