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

[main] Removing gsad from gsa repository #3197

Merged
merged 4 commits into from
Oct 21, 2021
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 1 addition & 4 deletions .docker/build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,4 @@ WORKDIR /usr/local/src

# clone and install gsa
RUN cd gsa && \
mkdir build && \
cd build && \
cmake -DCMAKE_BUILD_TYPE=Release .. && \
make install
yarn install
3 changes: 0 additions & 3 deletions .docker/testing/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ ARG VERSION=main
ARG BUILD_TYPE=Debug
ARG COMPILER=gcc

# We want gvm-libs to be ready so we use the build docker image of gvm-libs
FROM greenbone/gvm-libs-$VERSION-$COMPILER-build

# This will make apt-get install without question
ARG DEBIAN_FRONTEND=noninteractive

Expand Down
60 changes: 0 additions & 60 deletions .github/workflows/ci-c.yml

This file was deleted.

46 changes: 7 additions & 39 deletions .github/workflows/ci-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,15 @@ on:
jobs:
testing:
env:
WORKSPACE: ${{ github.workspace }}/gsa
REPORT_DIR: reports
name: Testing and upload coverage
runs-on: 'ubuntu-latest'
strategy:
matrix:
#node-version: [10.x, 12.x, 14.x, 15.x]
# 10.x for debian: https://packages.debian.org/buster/nodejs
# ubuntu lts: https://packages.ubuntu.com/focal/nodejs
# 12.x for ubuntu-latest: https://packages.ubuntu.com/hirsute/nodejs
# 14.x is recommended by https://nodejs.org/en/
node-version: [14.x]
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v2
- name: Set up node ${{ matrix.python-version }}
uses: actions/setup-node@v2
with:
Expand All @@ -40,34 +35,31 @@ jobs:
# `--prefer-offline` gives cache priority
- name: Install dependencies
run: yarn install --prefer-offline
working-directory: ${{ env.WORKSPACE }}

- name: Run JavaScript tests
working-directory: ${{ env.WORKSPACE }}
env:
JEST_JUNIT_OUTPUT_DIR: ${{ env.WORKSPACE }}/${{ env.REPORT_DIR }}
JEST_JUNIT_OUTPUT_DIR: ${{ env.REPORT_DIR }}
run: yarn test:coverage --reporters=default --reporters=jest-junit
- name: Load Lint Results
uses: actions/download-artifact@v2
with:
name: lint
directory: .
- name: Submit test coverage to codecov.io
uses: codecov/codecov-action@v1.5.0
uses: codecov/codecov-action@v2
with:
directory: ${{ env.WORKSPACE }}
fail_ci_if_error: true

linting:
env:
WORKSPACE: ${{ github.workspace }}/gsa
REPORT_DIR: reports
name: Linting
runs-on: 'ubuntu-latest'
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v2
- name: Set up node ${{ matrix.python-version }}
uses: actions/setup-node@v2
with:
Expand All @@ -85,34 +77,10 @@ jobs:
# `--prefer-offline` gives cache priority
- name: Install dependencies
run: yarn install --prefer-offline
working-directory: ${{ env.WORKSPACE }}
- name: Lint JavaScript files
working-directory: ${{ env.WORKSPACE }}
run: yarn lint --format junit -o ${{ env.WORKSPACE }}/${{ env.REPORT_DIR }}
run: yarn lint --format junit -o ${{ env.REPORT_DIR }}
- name: Store Lint Results
uses: actions/upload-artifact@v2
with:
name: lint
path: ${{ env.WORKSPACE }}/${{ env.REPORT_DIR }}

build_gsa:
env:
WORKSPACE: ${{ github.workspace }}/gsa
name: Build gsa
runs-on: 'ubuntu-latest'
container: greenbone/gsa-main-gcc-testing
steps:
- uses: actions/[email protected]
- name: Get Yarn cache directory
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Use Yarn cache
uses: actions/cache@v2
id: yarn-cache
with:
key: ${{ runner.os }}-yarn-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
- name: Configure and compile gsa
run: mkdir build && cd build/ && cmake -DCMAKE_BUILD_TYPE=Release ../gsa && make install
working-directory: ${{ github.WORKSPACE }}
path: ${{ env.REPORT_DIR }}
23 changes: 14 additions & 9 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,12 @@ jobs:
actions: read
contents: read
security-events: write
container: greenbone/gsa-main-gcc-testing
container: greenbone/gsa-gcc-testing:main

strategy:
fail-fast: false
matrix:
language: [ 'c', 'javascript' ]
env:
WORKSPACE: ${{ github.workspace }}/gsad
language: [ 'javascript' ]

steps:
- name: Checkout repository
Expand All @@ -37,10 +35,17 @@ jobs:
with:
languages: ${{ matrix.language }}
# build between init and analyze ...
- name: Configure and compile gsad
run: |
mkdir build && rm -rf .git && cd build/ \
&& cmake -DCMAKE_BUILD_TYPE=Debug .. && make install
working-directory: ${{ env.WORKSPACE }}
- name: Get Yarn cache directory
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Use Yarn cache
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
# `--prefer-offline` gives cache priority
- name: Install dependencies
run: yarn install --prefer-offline
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
34 changes: 9 additions & 25 deletions .github/workflows/docker-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,9 @@ jobs:
echo $GITHUB_BASE_REF
echo $GITHUB_REF
if [ -n "$GITHUB_BASE_REF" ]; \
then echo "BRANCH=${GITHUB_BASE_REF##*/}" >> $GITHUB_ENV; \
else echo "BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV; \
then echo "VERSION=${GITHUB_BASE_REF##*/}" >> $GITHUB_ENV; \
else echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV; \
fi; \
- name: Find version
run: |
echo $BRANCH
if [ $BRANCH = "main" ]; \
then VERSION=main; \
else VERSION=$(echo "$BRANCH" | sed 's/gsa-//g' -); \
fi;
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
Expand All @@ -40,13 +32,13 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# this only works with github.ref on push not on pull_request. ;)
- run: echo "Build and push ${{ github.repository }}-${{ env.VERSION }}-${{matrix.compiler}}-testing"
- run: echo "Build and push ${{ github.repository }}-${{matrix.compiler}}-testing:${{ env.VERSION }"
- name: Build and push
uses: docker/[email protected]
with:
context: .
push: true
tags: ${{ github.repository }}-${{ env.VERSION }}-${{matrix.compiler}}-testing
tags: ${{ github.repository }}-${{matrix.compiler}}-testing:${{ env.VERSION }
file: .docker/testing/Dockerfile
build-args: |
VERSION=${{ env.VERSION }}
Expand All @@ -68,17 +60,9 @@ jobs:
echo $GITHUB_BASE_REF
echo $GITHUB_REF
if [ -n "$GITHUB_BASE_REF" ]; \
then echo "BRANCH=${GITHUB_BASE_REF##*/}" >> $GITHUB_ENV; \
else echo "BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV; \
then echo "VERSION=${GITHUB_BASE_REF##*/}" >> $GITHUB_ENV; \
else echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV; \
fi; \
- name: Find version
run: |
echo $BRANCH
if [ $BRANCH = "main" ]; \
then VERSION=main; \
else VERSION=$(echo "$BRANCH" | sed 's/gsa-//g' -); \
fi;
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
Expand All @@ -87,14 +71,14 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# this only works with github.ref on push not on pull_request. ;)
- run: echo "Build and push ${{ github.repository }}-${{ env.VERSION }}-${{matrix.compiler}}-build"
- run: echo "Build and push ${{ github.repository }}-${{ matrix.compiler }}-build:${{ env.VERSION }}"
- name: Build and push
uses: docker/[email protected]
with:
context: .
push: true
tags: ${{ github.repository }}-${{ env.VERSION }}-${{matrix.compiler}}-build
tags: ${{ github.repository }}-${{ matrix.compiler }}-build:${{ env.VERSION }
file: .docker/build/Dockerfile
build-args: |
VERSION=${{ env.VERSION }}
COMPILER=${{matrix.compiler}}
COMPILER=${{ matrix.compiler }}
80 changes: 0 additions & 80 deletions CMakeLists.txt

This file was deleted.

Loading