kind: pipeline
type: kubernetes
name: default-build

steps:
  - name: build
    image: kmaster.ti.unibw-hamburg.de:30808/debianbullseye
    commands:
    - git submodule update --init --recursive --jobs=4
    - mkdir -p build && cd build
    - CC=clang-11 CXX=clang++-11 cmake -DCMAKE_BUILD_TYPE=DEBUG ..
    - make -j

  - name: CodeChecker
    image: kmaster.ti.unibw-hamburg.de:30808/drone-ftewa-codechecker
    pull: always
    settings:
      CODECHECKER_URL: "http://codechecker:8001"
      CODECHECKER_PRODUCT: "kubecontrol"
      CODECHECKER_USER:
        from_secret: CODECHECKER_USER_SECRET
      CODECHECKER_PASS:
        from_secret: CODECHECKER_PASS_SECRET
    when:
      event:
        include:
        - push
        - pull_request

---
kind: secret
name: CODECHECKER_USER_SECRET
get:
  path: codechecker-client
  name: username

---
kind: secret
name: CODECHECKER_PASS_SECRET
get:
  path: codechecker-client
  name: password
