Skip to content

Commit

Permalink
circleci: Move away from centos:7 as a base image
Browse files Browse the repository at this point in the history
For the build jobs we can directly use the target images and avoid the
nested docker invocation. For other jobs or Dockerfiles where centos:7
is used we can switch to a self-updating fedora:latest image.

Better diff with the --ignore-all-space option.
  • Loading branch information
dridi committed Jun 21, 2024
1 parent 68ab84a commit a98ce4f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 32 deletions.
9 changes: 4 additions & 5 deletions .circleci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
FROM centos:7
FROM fedora-latest

RUN set -e;\
yum install -y epel-release; \
yum install -y \
RUN set -e; \
dnf -y install \
automake \
git \
jemalloc-devel \
Expand All @@ -12,4 +11,4 @@ RUN set -e;\
make \
pcre2-devel \
python3 \
python-sphinx
python3-sphinx
42 changes: 15 additions & 27 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,12 @@ jobs:
dist:
description: Build or download varnish-x.y.z.tar.gz that is used later for the packaging jobs
docker:
- image: centos:7
- image: fedora:latest
steps:
- run:
name: Install deps
command: |
yum install -y epel-release
yum install -y \
dnf -y install \
automake \
jemalloc-devel \
git \
Expand All @@ -46,7 +45,7 @@ jobs:
make \
pcre2-devel \
python3 \
python-sphinx
python3-sphinx
- checkout
- when:
condition: << pipeline.parameters.dist-url >>
Expand Down Expand Up @@ -98,15 +97,15 @@ jobs:
tar_pkg_tools:
description: Builds archives with the packaging tools from https://github.com/varnishcache/pkg-varnish-cache
docker:
- image: centos:7
- image: fedora:latest
steps:
- add_ssh_keys:
fingerprints:
- "11:ed:57:75:32:81:9d:d0:a4:5e:af:15:4b:d8:74:27"
- run:
name: Grab the pkg repo
command: |
yum install -y git
dnf -y install git
mkdir -p ~/.ssh
ssh-keyscan -H github.com >> ~/.ssh/known_hosts
echo ${CIRCLE_REPOSITORY_URL}
Expand Down Expand Up @@ -219,21 +218,14 @@ jobs:
default: medium
type: string
docker:
- image: centos:7
- image: << parameters.prefix >><< parameters.dist >>:<< parameters.release >>
resource_class: << parameters.rclass >>
working_directory: /workspace
steps:
- setup_remote_docker
- run:
name: Install docker
command: yum install -y docker
- checkout
- run:
name: Extract and build
command: |
docker create --name workspace -v /workspace << parameters.prefix >><< parameters.dist >>:<< parameters.release >> /bin/true
docker cp /workspace workspace:/
docker run --volumes-from workspace -w /workspace << parameters.prefix >><< parameters.dist >>:<< parameters.release >> sh -c '
case "<< parameters.dist >>" in
almalinux|fedora)
dnf -y groupinstall "Development Tools"
Expand Down Expand Up @@ -337,27 +329,23 @@ jobs:
chown -R varnish:varnish .
export ASAN_OPTIONS=abort_on_error=1,detect_odr_violation=1,detect_leaks=1,detect_stack_use_after_return=1,detect_invalid_pointer_pairs=1,handle_segv=0,handle_sigbus=0,use_sigaltstack=0,disable_coredump=0
export LSAN_OPTIONS=abort_on_error=1,use_sigaltstack=0,suppressions=$(pwd)/tools/lsan.suppr
export TSAN_OPTIONS=abort_on_error=1,halt_on_error=1,use_sigaltstack=0,suppressions=$(pwd)/tools/tsan.suppr
export UBSAN_OPTIONS=halt_on_error=1,print_stacktrace=1,use_sigaltstack=0,suppressions=$(pwd)/tools/ubsan.suppr
sudo -u varnish \
sudo -u varnish sh -c '
export ASAN_OPTIONS=abort_on_error=1,detect_odr_violation=1,detect_leaks=1,detect_stack_use_after_return=1,detect_invalid_pointer_pairs=1,handle_segv=0,handle_sigbus=0,use_sigaltstack=0,disable_coredump=0
export LSAN_OPTIONS=abort_on_error=1,use_sigaltstack=0,suppressions=$(pwd)/tools/lsan.suppr
export TSAN_OPTIONS=abort_on_error=1,halt_on_error=1,use_sigaltstack=0,suppressions=$(pwd)/tools/tsan.suppr
export UBSAN_OPTIONS=halt_on_error=1,print_stacktrace=1,use_sigaltstack=0,suppressions=$(pwd)/tools/ubsan.suppr
autoreconf -i -v
sudo -u varnish \
./configure \
<< pipeline.parameters.configure_args >> \
<< parameters.extra_conf >>
sudo -u varnish \
--preserve-env=ASAN_OPTIONS,LSAN_OPTIONS,TSAN_OPTIONS,UBSAN_OPTIONS \
<< pipeline.parameters.configure_args >> \
<< parameters.extra_conf >>
make -j 4 -k << parameters.make_target >> VERBOSE=1 \
DISTCHECK_CONFIGURE_FLAGS="<< pipeline.parameters.configure_args >> \
DISTCHECK_CONFIGURE_FLAGS="<< pipeline.parameters.configure_args >> \
<< parameters.extra_conf >>"
'
collect_packages:
docker:
- image: centos:7
- image: fedora:latest
steps:
- attach_workspace:
at: ~/project
Expand Down

0 comments on commit a98ce4f

Please sign in to comment.