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

Clambc compiler 1.4.0 #42

Merged
merged 4 commits into from
May 22, 2024
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
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# SPDX-License-Identifier: GPL-2.0-or-later
#
# Copyright (C) 2021-2023 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
FROM registry.hub.docker.com/library/ubuntu:20.04 AS builder
FROM registry.hub.docker.com/library/ubuntu:23.04 AS builder

LABEL Maintainer="ClamAV bugs <[email protected]>"

WORKDIR /src
COPY . /src

ENV DEBIAN_FRONTEND=noninteractive
ENV CC=clang-8
ENV CXX=clang++-8
ENV CC=clang-16
ENV CXX=clang++-16

RUN apt-get update -y && \
apt-get install -y \
Expand All @@ -19,15 +19,13 @@ RUN apt-get update -y && \
binutils \
git \
python3 \
python3-distutils \
python3-pip \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why, but removing the python3-pip gives me warnings that pytest is not installed.

python3-pytest \
cmake \
make \
clang-8 \
clang-16 \
clamav \
&& \
rm -rf /var/lib/apt/lists/* && \
python3 -m pip install pytest && \
mkdir build && \
cd build && \
cmake .. -G "Unix Makefiles" \
Expand All @@ -39,17 +37,17 @@ RUN apt-get update -y && \
make DESTDIR="/clambc" install && \
ctest -V

FROM registry.hub.docker.com/library/ubuntu:20.04
FROM registry.hub.docker.com/library/ubuntu:23.04

ENV DEBIAN_FRONTEND=noninteractive
ENV CC=clang-8
ENV CXX=clang++-8
ENV CC=clang-16
ENV CXX=clang++-16

COPY --from=builder "/clambc" "/"

RUN apt-get -y update && \
apt install -y \
python3 \
clang-8 \
clang-16 \
&& \
rm -rf /var/lib/apt/lists/*
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ properties([
string(name: 'NAMESPACE', defaultValue: 'clamav', description: 'The docker namespace to use'),
string(name: 'IMAGE_NAME', defaultValue: 'clambc-compiler', description: 'The docker image name to use'),
string(name: 'REPOSITORY', defaultValue: 'https://github.com/Cisco-Talos/clamav-bytecode-compiler.git', description: 'The repository from which to build'),
string(name: 'BRANCH', defaultValue: 'rel/0.105.0', description: 'The repository branch for this build'),
string(name: 'FULL_VERSION', defaultValue: '0.105.0', description: 'Full version in X.Y.Z format'),
string(name: 'FEATURE_VERSION', defaultValue: '0.105', description: 'Feature version in X.Y format'),
string(name: 'BRANCH', defaultValue: 'rel/1.4.0', description: 'The repository branch for this build'),
string(name: 'FULL_VERSION', defaultValue: '1.4.0', description: 'Full version in X.Y.Z format'),
string(name: 'FEATURE_VERSION', defaultValue: '1.4', description: 'Feature version in X.Y format'),
booleanParam(name: 'IS_LATEST', defaultValue: true, description: 'If "true", will also publish to :latest, and :stable tags.'),
]),
disableConcurrentBuilds(),
Expand Down Expand Up @@ -55,7 +55,7 @@ node('docker') {

// Make sure we have the latest base image.
sh """
docker pull ubuntu:20.04
docker pull ubuntu:23.04
"""

// Login to docker hub
Expand Down
20 changes: 9 additions & 11 deletions clamav-bytecode-compiler/unstable/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# SPDX-License-Identifier: GPL-2.0-or-later
#
# Copyright (C) 2021-2023 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
FROM registry.hub.docker.com/library/ubuntu:20.04 AS builder
FROM registry.hub.docker.com/library/ubuntu:23.04 AS builder

LABEL Maintainer="ClamAV bugs <[email protected]>"

WORKDIR /src
COPY . /src

ENV DEBIAN_FRONTEND=noninteractive
ENV CC=clang-8
ENV CXX=clang++-8
ENV CC=clang-16
ENV CXX=clang++-16

RUN apt-get update -y && \
apt-get install -y \
Expand All @@ -19,15 +19,13 @@ RUN apt-get update -y && \
binutils \
git \
python3 \
python3-distutils \
python3-pip \
python3-pytest \
cmake \
make \
clang-8 \
clang-16 \
clamav \
&& \
rm -rf /var/lib/apt/lists/* && \
python3 -m pip install pytest && \
mkdir build && \
cd build && \
cmake .. -G "Unix Makefiles" \
Expand All @@ -39,17 +37,17 @@ RUN apt-get update -y && \
make DESTDIR="/clambc" install && \
ctest -V

FROM registry.hub.docker.com/library/ubuntu:20.04
FROM registry.hub.docker.com/library/ubuntu:23.04

ENV DEBIAN_FRONTEND=noninteractive
ENV CC=clang-8
ENV CXX=clang++-8
ENV CC=clang-16
ENV CXX=clang++-16

COPY --from=builder "/clambc" "/"

RUN apt-get -y update && \
apt install -y \
python3 \
clang-8 \
clang-16 \
&& \
rm -rf /var/lib/apt/lists/*
2 changes: 1 addition & 1 deletion clamav-bytecode-compiler/unstable/ubuntu/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ node('docker') {
[[envVar: 'DOCKER_USER', vaultKey: 'username'],[envVar: 'DOCKER_PASSWD', vaultKey: 'password']]]]]) {
// Make sure we have the latest base image.
sh """
docker pull ubuntu:20.04
docker pull ubuntu:23.04
"""

// Login to docker hub
Expand Down