Commit a98ce4f1 authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

circleci: Move away from centos:7 as a base image

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.
parent 68ab84a1
FROM centos:7 FROM fedora-latest
RUN set -e;\ RUN set -e; \
yum install -y epel-release; \ dnf -y install \
yum install -y \
automake \ automake \
git \ git \
jemalloc-devel \ jemalloc-devel \
...@@ -12,4 +11,4 @@ RUN set -e;\ ...@@ -12,4 +11,4 @@ RUN set -e;\
make \ make \
pcre2-devel \ pcre2-devel \
python3 \ python3 \
python-sphinx python3-sphinx
...@@ -30,13 +30,12 @@ jobs: ...@@ -30,13 +30,12 @@ jobs:
dist: dist:
description: Build or download varnish-x.y.z.tar.gz that is used later for the packaging jobs description: Build or download varnish-x.y.z.tar.gz that is used later for the packaging jobs
docker: docker:
- image: centos:7 - image: fedora:latest
steps: steps:
- run: - run:
name: Install deps name: Install deps
command: | command: |
yum install -y epel-release dnf -y install \
yum install -y \
automake \ automake \
jemalloc-devel \ jemalloc-devel \
git \ git \
...@@ -46,7 +45,7 @@ jobs: ...@@ -46,7 +45,7 @@ jobs:
make \ make \
pcre2-devel \ pcre2-devel \
python3 \ python3 \
python-sphinx python3-sphinx
- checkout - checkout
- when: - when:
condition: << pipeline.parameters.dist-url >> condition: << pipeline.parameters.dist-url >>
...@@ -98,7 +97,7 @@ jobs: ...@@ -98,7 +97,7 @@ jobs:
tar_pkg_tools: tar_pkg_tools:
description: Builds archives with the packaging tools from https://github.com/varnishcache/pkg-varnish-cache description: Builds archives with the packaging tools from https://github.com/varnishcache/pkg-varnish-cache
docker: docker:
- image: centos:7 - image: fedora:latest
steps: steps:
- add_ssh_keys: - add_ssh_keys:
fingerprints: fingerprints:
...@@ -106,7 +105,7 @@ jobs: ...@@ -106,7 +105,7 @@ jobs:
- run: - run:
name: Grab the pkg repo name: Grab the pkg repo
command: | command: |
yum install -y git dnf -y install git
mkdir -p ~/.ssh mkdir -p ~/.ssh
ssh-keyscan -H github.com >> ~/.ssh/known_hosts ssh-keyscan -H github.com >> ~/.ssh/known_hosts
echo ${CIRCLE_REPOSITORY_URL} echo ${CIRCLE_REPOSITORY_URL}
...@@ -219,21 +218,14 @@ jobs: ...@@ -219,21 +218,14 @@ jobs:
default: medium default: medium
type: string type: string
docker: docker:
- image: centos:7 - image: << parameters.prefix >><< parameters.dist >>:<< parameters.release >>
resource_class: << parameters.rclass >> resource_class: << parameters.rclass >>
working_directory: /workspace working_directory: /workspace
steps: steps:
- setup_remote_docker
- run:
name: Install docker
command: yum install -y docker
- checkout - checkout
- run: - run:
name: Extract and build name: Extract and build
command: | 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 case "<< parameters.dist >>" in
almalinux|fedora) almalinux|fedora)
dnf -y groupinstall "Development Tools" dnf -y groupinstall "Development Tools"
...@@ -337,27 +329,23 @@ jobs: ...@@ -337,27 +329,23 @@ jobs:
chown -R varnish:varnish . 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 sudo -u varnish sh -c '
export LSAN_OPTIONS=abort_on_error=1,use_sigaltstack=0,suppressions=$(pwd)/tools/lsan.suppr 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 TSAN_OPTIONS=abort_on_error=1,halt_on_error=1,use_sigaltstack=0,suppressions=$(pwd)/tools/tsan.suppr export LSAN_OPTIONS=abort_on_error=1,use_sigaltstack=0,suppressions=$(pwd)/tools/lsan.suppr
export UBSAN_OPTIONS=halt_on_error=1,print_stacktrace=1,use_sigaltstack=0,suppressions=$(pwd)/tools/ubsan.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 \
autoreconf -i -v autoreconf -i -v
sudo -u varnish \
./configure \ ./configure \
<< pipeline.parameters.configure_args >> \ << pipeline.parameters.configure_args >> \
<< parameters.extra_conf >> << parameters.extra_conf >>
sudo -u varnish \
--preserve-env=ASAN_OPTIONS,LSAN_OPTIONS,TSAN_OPTIONS,UBSAN_OPTIONS \
make -j 4 -k << parameters.make_target >> VERBOSE=1 \ 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 >>" << parameters.extra_conf >>"
' '
collect_packages: collect_packages:
docker: docker:
- image: centos:7 - image: fedora:latest
steps: steps:
- attach_workspace: - attach_workspace:
at: ~/project at: ~/project
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment