<commit_before>stages:
- test
- analyze
- build
- deploy

###########################
# Templates               #
#                         #
# make sure all jobs use  #
# architecture tags.      #
###########################
.job: &job
  before_script:
  - ./.gitlab-ci/$CI_JOB_STAGE/$CI_JOB_NAME.sh setup
  dependencies: []
  except: [schedules]
  tags:
  - amd64
  script:
  - ./.gitlab-ci/$CI_JOB_STAGE/$CI_JOB_NAME.sh

.dind: &dind
  <<: *job
  tags:
  - amd64-dind
  image: docker:stable
  variables:
    DOCKER_DRIVER: overlay2
  services:
  - docker:stable-dind

########
# Test #
########
.test: &test
  <<: *job
  stage: test
  tags: [amd64]
  before_script:
  - apt-get update -qq
  - apt-get install --no-install-recommends -y python3 python3-pytest python3-sqlalchemy python3-setproctitle python3-setuptools python3-yaml python3-zmq
  script:
  - py.test-3 -v --junitxml=reactobus.xml tests
  artifacts:
    reports:
      junit:
      - reactobus.xml

test-debian-9:
  <<: *test
  image: debian:9
test-debian-10:
  <<: *test
  image: debian:buster
test-ubuntu-18.04:
  <<: *test
  image: ubuntu:18.04
test-ubuntu-18.10:
  <<: *test
  image: ubuntu:18.10
test-ubuntu-19.04:
  <<: *test
  image: ubuntu:19.04

###########
# Analyze #
###########
black:
  <<: *job
  stage: analyze
  image: hub.lavasoftware.org/lava/ci-images/amd64/analyze

# static analysis with bandit
include:
  template: SAST.gitlab-ci.yml
sast:
  tags: [amd64-dind]
  stage: analyze
  variables:
    DOCKER_DRIVER: overlay2
    SAST_DEFAULT_ANALYZERS: "bandit"

#########
# Build #
#########
docker:  <<: *dind
  stage: build

##########
# Deploy #
##########
reactobus:
  <<: *job
  stage: deploy
  tags: [deploy]
  only:
    refs:
    - master
  variables:
    CONTAINER_NAME: "reactobus"
  environment:
    name: reactobus
<commit_msg>CI: fix yaml syntax<commit_after>stages:
- test
- analyze
- build
- deploy

###########################
# Templates               #
#                         #
# make sure all jobs use  #
# architecture tags.      #
###########################
.job: &job
  before_script:
  - ./.gitlab-ci/$CI_JOB_STAGE/$CI_JOB_NAME.sh setup
  dependencies: []
  except: [schedules]
  tags:
  - amd64
  script:
  - ./.gitlab-ci/$CI_JOB_STAGE/$CI_JOB_NAME.sh

.dind: &dind
  <<: *job
  tags:
  - amd64-dind
  image: docker:stable
  variables:
    DOCKER_DRIVER: overlay2
  services:
  - docker:stable-dind

########
# Test #
########
.test: &test
  <<: *job
  stage: test
  tags: [amd64]
  before_script:
  - apt-get update -qq
  - apt-get install --no-install-recommends -y python3 python3-pytest python3-sqlalchemy python3-setproctitle python3-setuptools python3-yaml python3-zmq
  script:
  - py.test-3 -v --junitxml=reactobus.xml tests
  artifacts:
    reports:
      junit:
      - reactobus.xml

test-debian-9:
  <<: *test
  image: debian:9
test-debian-10:
  <<: *test
  image: debian:buster
test-ubuntu-18.04:
  <<: *test
  image: ubuntu:18.04
test-ubuntu-18.10:
  <<: *test
  image: ubuntu:18.10
test-ubuntu-19.04:
  <<: *test
  image: ubuntu:19.04

###########
# Analyze #
###########
black:
  <<: *job
  stage: analyze
  image: hub.lavasoftware.org/lava/ci-images/amd64/analyze

# static analysis with bandit
include:
  template: SAST.gitlab-ci.yml
sast:
  tags: [amd64-dind]
  stage: analyze
  variables:
    DOCKER_DRIVER: overlay2
    SAST_DEFAULT_ANALYZERS: "bandit"

#########
# Build #
#########
docker:
  <<: *dind
  stage: build

##########
# Deploy #
##########
reactobus:
  <<: *job
  stage: deploy
  tags: [deploy]
  only:
    refs:
    - master
  variables:
    CONTAINER_NAME: "reactobus"
  environment:
    name: reactobus

{'fraction_non_alphanumeric': 0.19419337167899206, 'fraction_numerical': 0.02629416598192276, 'mean_word_length': 2.9395900755124056, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2430178', 'n_tokens_mistral': 1503, 'n_tokens_neox': 1407, 'n_words': 271}