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

multi project build test #1809

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
20 changes: 20 additions & 0 deletions .docker/railguards/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Railguards

As long as openvas is a distributed monolith in
- greenbone/gvm-libs
- greenbone/openvas-smb
- greenbone/openvas-scanner

we need to verify that the dependencies play nicely together on our target:

- debian:stable

as well as the mentioned examples within:

- https://greenbone.github.io/docs/latest/22.4/source-build/index.html#openvas-scanner

Namely:
- fedora
- centos

**WARNING** The Dockerfiles within this folder are not meant to be used outside of this very specific test case.
27 changes: 27 additions & 0 deletions .docker/railguards/debian_stable.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This Dockerfile is not meant to be actually used, it is meant for testing
# the integrity when building:
# - gvm-libs
# - openvas-smb
# - openvas-scanner
#
# together from a main branch.
#
# If it builds without error everything is as expected.
FROM debian:stable
# CLONE gvm-libs
# CLONE openvas-smb
# Install dependencies
# check ld
COPY . /source
RUN apt update && apt install -y git
RUN bash /source/.devcontainer/github-clone.sh greenbone/gvm-libs
RUN bash /source/.devcontainer/github-clone.sh greenbone/openvas-smb
# tests implicitely if there are dependencies conflicts
RUN sh /workspaces/greenbone/gvm-libs/.github/install-dependencies.sh
RUN sh /workspaces/greenbone/openvas-smb/.github/install-openvas-smb-dependencies.sh
RUN sh /source/.github/install-openvas-dependencies.sh
# build everything
RUN sh /source/.devcontainer/build-cmake-project.sh /workspaces/greenbone/gvm-libs
RUN sh /source/.devcontainer/build-cmake-project.sh /workspaces/greenbone/openvas-smb
RUN sh /source/.devcontainer/build-cmake-project.sh /source

15 changes: 15 additions & 0 deletions .github/workflows/functional.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,21 @@ on:
# It depends on build.yml that is controlled via control.yml
#
jobs:
# Tests that gvm-libs, openvas-smb and openvas dependencies work together and
# that openvas is buildable and integrates openvas-smb when available
distributed-monolith-railguard:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
system:
- debian_stable
steps:
- uses: actions/checkout@v4
- run: docker build -t test -f .docker/railguards/${{matrix.system}}.Dockerfile .
- run: docker run --rm test ldd /usr/local/sbin/openvas
- run: docker run --rm test ldd /usr/local/sbin/openvas | grep libopenvas_wmiclient
- run: docker rmi test || true
# TESTS that are possible before pushing an image
tests:
runs-on: ubuntu-latest
Expand Down
Loading