226 lines
No EOL
5 KiB
YAML
226 lines
No EOL
5 KiB
YAML
include:
|
|
- project: 'iwa/adm/ci/cicd_extra'
|
|
ref: $cicd_branch
|
|
file:
|
|
- 'ymls/header.yml'
|
|
- 'ymls/save_env_vars.yml'
|
|
- 'ymls/templates/template_version_upload.yml'
|
|
|
|
variables:
|
|
|
|
actions:
|
|
value: ""
|
|
description: "Keys: unit (unit tests), integ (integration tests), fw (live.firewall tests), build. default:''(all jobs)"
|
|
|
|
|
|
stages:
|
|
- save_env_vars
|
|
- test
|
|
- build
|
|
- build_deb_pkg
|
|
- version_upload
|
|
|
|
|
|
core_unit_test_job:
|
|
stage: test
|
|
needs:
|
|
- job: save_env_vars_job
|
|
artifacts: false
|
|
variables:
|
|
GIT_STRATEGY: clone
|
|
GIT_SUBMODULE_STRATEGY: recursive
|
|
image:
|
|
name: nexus.iwarma.ru:8123/iwarma-docker/python_go:3.9-1.16.15-alpine.gitlab
|
|
rules:
|
|
- if: !reference [.rulesTemplate, testRuleUnit]
|
|
- if: !reference [.rulesTemplate, testRuleAlways]
|
|
script:
|
|
- /bin/sh ./cicd/unit_tests.sh
|
|
artifacts:
|
|
when: always
|
|
paths:
|
|
- ./public/test_coverage/index.html
|
|
- ./*.log
|
|
expire_in: 1 day
|
|
tags:
|
|
- docker-debian11
|
|
|
|
core_integ_test_job:
|
|
stage: test
|
|
needs:
|
|
- job: save_env_vars_job
|
|
artifacts: false
|
|
rules:
|
|
- if: !reference [.rulesTemplate, testRuleInteg]
|
|
- if: !reference [.rulesTemplate, testRuleAlways]
|
|
variables:
|
|
GIT_STRATEGY: clone
|
|
GIT_SUBMODULE_STRATEGY: recursive
|
|
|
|
POSTGRES_PASSWORD: 'postgres'
|
|
|
|
ES_JAVA_OPTS: "-Xmx512m -Xms512m"
|
|
ELASTIC_PASSWORD: changeme
|
|
REDIS_PORT: '6379'
|
|
image:
|
|
name: nexus.iwarma.ru:8123/iwarma-docker/python_go:3.9-1.16.15-alpine.gitlab
|
|
#entrypoint: ["/bin/sh"]
|
|
services:
|
|
- name: registry.iwarma.ru/iwa/dev/console-docker/console-elasticsearch:latest
|
|
alias: elasticsearch
|
|
command: [ "bin/elasticsearch", "-Ediscovery.type=single-node" ]
|
|
- name: postgres:12-alpine3.16
|
|
alias: db
|
|
- name: redis:alpine3.16
|
|
alias: redis
|
|
script:
|
|
- /bin/sh ./cicd/integration_tests.sh
|
|
artifacts:
|
|
when: always
|
|
paths:
|
|
- ./public/test_coverage/index.html
|
|
- ./*.log
|
|
expire_in: 1 day
|
|
tags:
|
|
- docker-debian11
|
|
|
|
core_live_fw_test_job:
|
|
stage: test
|
|
needs:
|
|
- job: save_env_vars_job
|
|
artifacts: false
|
|
rules:
|
|
- if: !reference [.rulesTemplate, testRuleFW]
|
|
- if: !reference [.rulesTemplate, testRuleAlways]
|
|
variables:
|
|
GIT_STRATEGY: clone
|
|
GIT_SUBMODULE_STRATEGY: recursive
|
|
image:
|
|
name: nexus.iwarma.ru:8123/iwarma-docker/python_go:3.9-1.16.15-alpine.gitlab
|
|
script:
|
|
- /bin/sh ./cicd/live_fw_tests.sh
|
|
artifacts:
|
|
when: always
|
|
paths:
|
|
- ./public/test_coverage/index.html
|
|
- ./*.log
|
|
expire_in: 1 day
|
|
tags:
|
|
- docker-debian11-fw
|
|
|
|
checker_test_job:
|
|
stage: test
|
|
variables:
|
|
GIT_STRATEGY: clone
|
|
needs:
|
|
- job: save_env_vars_job
|
|
artifacts: false
|
|
rules:
|
|
- if: !reference [.rulesTemplate, testRuleUnit]
|
|
- if: !reference [.rulesTemplate, testRuleAlways]
|
|
script:
|
|
- cd checker
|
|
- /bin/bash ../cicd/go_test.sh
|
|
tags:
|
|
- shell-debian11
|
|
|
|
core_build_job:
|
|
stage: build
|
|
needs:
|
|
- job: core_unit_test_job
|
|
artifacts: false
|
|
optional: true
|
|
- job: core_integ_test_job
|
|
artifacts: false
|
|
optional: true
|
|
- job: core_live_fw_test_job
|
|
artifacts: false
|
|
optional: true
|
|
rules:
|
|
- if: !reference [.rulesTemplate, buildRule]
|
|
variables:
|
|
GIT_STRATEGY: clone
|
|
GIT_SUBMODULE_STRATEGY: recursive
|
|
script:
|
|
- python3 ./cicd_extra/build_job.py -n amccore
|
|
artifacts:
|
|
paths:
|
|
- console/static/react
|
|
- console/templates/console/index.html
|
|
- console/settings/base.py
|
|
expire_in: 1 day
|
|
tags:
|
|
- shell-debian11
|
|
|
|
checker_build_job:
|
|
stage: build
|
|
needs:
|
|
- job: checker_test_job
|
|
artifacts: false
|
|
optional: true
|
|
rules:
|
|
- if: !reference [.rulesTemplate, buildRule]
|
|
variables:
|
|
GIT_STRATEGY: clone
|
|
script:
|
|
- python3 ./cicd_extra/build_go_job.py -n amcchecker
|
|
artifacts:
|
|
paths:
|
|
- ./checker/checker
|
|
expire_in: 1 day
|
|
tags:
|
|
- shell-debian11
|
|
|
|
core_deb_pkg_job:
|
|
stage: build_deb_pkg
|
|
variables:
|
|
GIT_STRATEGY: clone
|
|
GIT_SUBMODULE_STRATEGY: recursive
|
|
needs:
|
|
- job: core_build_job
|
|
artifacts: true
|
|
rules:
|
|
- if: !reference [.rulesTemplate, buildRule]
|
|
script:
|
|
- python3 ./cicd_extra/pack_job.py -p amccore
|
|
artifacts:
|
|
paths:
|
|
- artifact.json
|
|
expire_in: 1 day
|
|
tags:
|
|
- shell-debian11
|
|
|
|
checker_deb_pkg_job:
|
|
stage: build_deb_pkg
|
|
variables:
|
|
GIT_STRATEGY: clone
|
|
needs:
|
|
- job: checker_build_job
|
|
artifacts: true
|
|
rules:
|
|
- if: !reference [.rulesTemplate, buildRule]
|
|
script:
|
|
- python3 ./cicd_extra/pack_job.py -p amcchecker
|
|
artifacts:
|
|
paths:
|
|
- artifact.json
|
|
expire_in: 1 day
|
|
tags:
|
|
- shell-debian11
|
|
|
|
core_ver_upload_job:
|
|
extends: .version_upload
|
|
rules:
|
|
- if: !reference [.rulesTemplate, buildRule]
|
|
needs:
|
|
- job: core_deb_pkg_job
|
|
artifacts: true
|
|
|
|
checker_ver_upload_job:
|
|
extends: .version_upload
|
|
rules:
|
|
- if: !reference [.rulesTemplate, buildRule]
|
|
needs:
|
|
- job: checker_deb_pkg_job
|
|
artifacts: true
|
|
|