Add Schutzbot and Sonarqube

This adds the ability to use our Schutzbot Gitlab CI and run Sonarqube
scan there. We have pretty much the exact same thing in weldr-client
repo and use it only for Sonarqube. This could also be used in the
future if there is any need to use our own CI.

The added scan is just informative and is by no means supposed to be
used to gate PRs, there will be just one more link to
check the results in case anyone is interested.
This commit is contained in:
Jakub Rusz 2022-08-30 13:19:39 +02:00 committed by Sanne Raymaekers
parent c9c75da7ba
commit 4ec5c97758
6 changed files with 127 additions and 0 deletions

33
.github/workflows/trigger-gitlab.yml vendored Normal file
View file

@ -0,0 +1,33 @@
# inspired by rhinstaller/anaconda
name: Trigger GitLab CI
on:
push:
branches:
- main
jobs:
trigger-gitlab:
runs-on: ubuntu-latest
env:
IMAGEBUILDER_BOT_GITLAB_SSH_KEY: ${{ secrets.IMAGEBUILDER_BOT_GITLAB_SSH_KEY }}
steps:
- name: Install Dependencies
run: |
sudo apt install -y jq
- name: Clone repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Push to gitlab
run: |
mkdir -p ~/.ssh
echo "${IMAGEBUILDER_BOT_GITLAB_SSH_KEY}" > ~/.ssh/id_rsa
chmod 400 ~/.ssh/id_rsa
touch ~/.ssh/known_hosts
ssh-keyscan -t rsa gitlab.com >> ~/.ssh/known_hosts
git remote add ci git@gitlab.com:redhat/services/products/image-builder/ci/image-builder-frontend.git
git push -f ci