Skip to content

Commit

Permalink
настройки для гитлаба
Browse files Browse the repository at this point in the history
  • Loading branch information
artbear committed Nov 7, 2020
1 parent d3a3c36 commit afe9563
Show file tree
Hide file tree
Showing 2 changed files with 265 additions and 0 deletions.
221 changes: 221 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,221 @@
variables:
CI_VRUNNER_SETTINGS: "--settings ./tools/JSON/gitlab-ci.env.json"

stages:
- Подготовка
- Сборка пакета
- Статический анализ
- Тестирование
- Allure

Проверка окружения:

stage: Подготовка
variables:
GIT_STRATEGY: none
# LOGOS_LEVEL: "DEBUG"
tags:
- vanessa-add
script:
- chcp 65001
- set PATH
- set
- where oscript
- oscript -version
- where opm
- call opm version
- call opm list
- where vrunner
- call vrunner version
tags:
- vanessa-add
only:
refs:
- develop
changes:
- epf/**/*
- lib/**/*
- plugins/**/*
- features/**/*
- ospx/**/*
- tests/**/*
- tools/**/*
- vendor/**/*
- .gitlab-ci.yml

Сборка файлов:
stage: Подготовка
script:
- chcp 65001
- opm run init file --v8version 8.3.10
artifacts:
paths:
- .\build\ib\1Cv8.1CD
- .\*.epf
- .\epf\**\*.*
- .\lib\**\*.*
- .\plugins\**\*.*
- .\features\**\*.*
- .\ospx\**\*.*
- .\tests\**\*.*
- .\tools\**\*.*
- .\vendor\**\*.*
tags:
- vanessa-add
only:
refs:
- develop
changes:
- epf/**/*
- lib/**/*
- plugins/**/*
- features/**/*
- ospx/**/*
- tests/**/*
- tools/**/*
- vendor/**/*
- .gitlab-ci.yml

Сборка пакета:
stage: Сборка пакета
script:
- chcp 65001
- opm build .
artifacts:
paths:
- .\add-*.zip
- .\add-*.ospx
tags:
- vanessa-add
only:
refs:
- develop
changes:
- epf/**/*
- lib/**/*
- plugins/**/*
- features/libraries/**/*
- ospx/**/*
- tests/smoke/**/*
- tools/**/*
# - vendor/**/*
- .gitlab-ci.yml

Модульные тесты:
stage: Тестирование
script:
- chcp 65001
- call vrunner xunit tests %CI_VRUNNER_SETTINGS% --reportsxunit "ГенераторОтчетаJUnitXML{build/junit-tdd/junit-tdd.xml};ГенераторОтчетаAllureXMLВерсия2{build/allure-tdd/allure.xml}"
artifacts:
when: always
paths:
- build/junit-tdd/*.xml
- build/allure-tdd/*.*
reports:
junit:
- build/junit-tdd/*.xml
allow_failure: true
tags:
- vanessa-add
only:
refs:
- develop
changes:
- epf/**/*
- lib/**/*
- plugins/**/*
# - features/**/*
# - ospx/**/*
- tests/**/*
- tools/**/*
# - vendor/**/*
- .gitlab-ci.yml

Дымовые тесты:
stage: Тестирование
script:
- chcp 65001
- call vrunner xunit tests/smoke %CI_VRUNNER_SETTINGS% --reportsxunit "ГенераторОтчетаJUnitXML{build/junit-smoke/junit-smoke.xml};ГенераторОтчетаAllureXMLВерсия2{build/allure-smoke/allure.xml}"
artifacts:
when: always
paths:
- build/junit-smoke/*.xml
- build/allure-smoke/*.*
reports:
junit:
- build/junit-smoke/*.xml
allow_failure: true
tags:
- vanessa-add
only:
refs:
- develop
changes:
- epf/xdd*/**/*
# - lib/**/*
- plugins/**/*
# - features/**/*
# - ospx/**/*
- tests/smoke/**/*
- tools/**/*
# - vendor/**/*
- .gitlab-ci.yml

BDD тестирование (библиотеки):
stage: Тестирование
script:
- chcp 65001
- vrunner vanessa %CI_VRUNNER_SETTINGS% --path features/libraries"
artifacts:
when: always
paths:
- ServiceBases/junitreport/*.xml
- ServiceBases/allurereport/*.*
reports:
junit:
- ServiceBases/junitreport/*.xml
allow_failure: true
tags:
- vanessa-add
only:
refs:
- develop
changes:
- epf/bdd*/**/*
- lib/**/*
- plugins/**/*
- features/**/*
# - ospx/**/*
# - tests/smoke/**/*
- tools/**/*
- vendor/**/*
- .gitlab-ci.yml

Allure:

stage: Allure
variables:
GIT_STRATEGY: none
allow_failure: true
script:
- call allure generate build/allure-tdd build/allure-smoke ServiceBases/allurereport -c -o build/allure-result
- echo Allure results - %CI_JOB_URL%/artifacts/file/build/allure-result/index.html
artifacts:
when: always
paths:
- build/allure-result
tags:
- vanessa-add
only:
refs:
- develop
changes:
- epf/**/*
- lib/**/*
- plugins/**/*
- features/**/*
- ospx/**/*
- tests/**/*
- tools/**/*
- vendor/**/*
- .gitlab-ci.yml
44 changes: 44 additions & 0 deletions tools/JSON/gitlab-ci.env.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
"$schema": "https://github.com/vanessa-opensource/vanessa-runner/blob/develop/vanessa-runner-schema.json",
"default": {
"--ibconnection": "/F./build/ib",
"--db-user": "",
"--db-pwd": "",
"--workspace": ".",
"--v8version": "8.3.10",
"--additional": "/DisplayAllFunctions /Lru /iTaxi"
// "--additional": "/DisplayAllFunctions /Lru /iTaxi /TESTMANAGER /Debug /DebuggerURL tcp://localhost:1561"
},
"vanessa": {
"--vanessasettings": "./tools/JSON/VBParams8310UF.json",
"--pathvanessa": "./bddRunner.epf"
},
"compileepf": {
"--ibconnection": "/F./build/ibservice",
"--db-user": "",
"--db-pwd": "",
"inputPath": "./epf",
"outputPath": ".//."
},
"decompileepf": {
"--ibconnection": "/F./build/ibservice",
"--db-user": "",
"--db-pwd": "",
"inputPath": "./bddRunner.epf",
"outputPath": "./epf"
},
"compile": {
"-s": "./lib/CF/83NoSync",
"-o": "./build/1Cv8.cf"
},
"xunit": {
"--ibconnection": "/F./build/ibservicexdd",
"--db-user": "Admin",
"--db-pwd": "",
"--xddConfig": "./tools/JSON/xUnitParams.json",
"testsPath": "./build/tests/smoke",
"--testclient": "::47001",
"--reportsxunit": "ГенераторОтчетаJUnitXML{build/ServiceBases/junitreport/xdd/xddreport.xml};ГенераторОтчетаAllureXML{build/ServiceBases/allurereport/xdd/allure-testsuite.xml}",
"--xddExitCodePath": "xddExitCodePath.txt",
"--pathxunit": "./xddTestRunner.epf"
}
}

0 comments on commit afe9563

Please sign in to comment.