-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'rc-master-branch' into 'master'
RC 1.10.0 merge to master See merge request automation-toolchain/f5-telemetry!215
- Loading branch information
Showing
148 changed files
with
25,250 additions
and
6,226 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,101 +10,112 @@ stages: | |
- teardown | ||
- publish | ||
|
||
lint: | ||
image: node:8 | ||
stage: lint | ||
############################################################## | ||
# # | ||
# Jobs and commands templates # | ||
# # | ||
############################################################## | ||
.install_unittest_packages_cmd: &install_unittest_packages_cmd | ||
- npm run install-test | ||
|
||
.run_unittest_cmd: &run_unittest_cmd | ||
- npm run test-only | ||
|
||
.job_definition: &job_definition | ||
tags: | ||
- docker-executor | ||
script: | ||
- npm run install-test | ||
- npm run lint | ||
|
||
# BIG-IP 13.x and BIG-IP 14.0, unittests only (without coverage check) | ||
test_node4: | ||
image: node:4 | ||
.test_job_definition: &test_job_definition | ||
extends: | ||
- .job_definition | ||
stage: test | ||
|
||
.harness_deployment_definition: &harness_deployment_definition | ||
image: ${CICD_CONTAINER_DEPLOY} | ||
tags: | ||
- docker-executor | ||
- cm-official-docker-executor | ||
|
||
.run_unittest: | ||
extends: | ||
- .test_job_definition | ||
script: | ||
- npm run install-test | ||
- npm install [email protected] | ||
- npm run test-only | ||
- *install_unittest_packages_cmd | ||
- *run_unittest_cmd | ||
artifacts: | ||
name: ${CI_COMMIT_REF_NAME}_unittests_artifacts | ||
paths: | ||
- test/artifacts | ||
when: on_failure | ||
expire_in: 3 days | ||
|
||
############################################################## | ||
# # | ||
# Jobs # | ||
# # | ||
############################################################## | ||
|
||
lint: | ||
extends: | ||
- .test_job_definition | ||
image: node:8 | ||
stage: lint | ||
script: | ||
- *install_unittest_packages_cmd | ||
- npm run lint | ||
|
||
# BIG-IP 13.x and BIG-IP 14.0, unittests only (without coverage check) | ||
test_node4: | ||
extends: | ||
- .run_unittest | ||
image: node:4 | ||
|
||
# just in case, unittests only (without coverage check) | ||
test_node6: | ||
extends: | ||
- .run_unittest | ||
image: node:6 | ||
stage: test | ||
tags: | ||
- docker-executor | ||
script: | ||
- npm run install-test | ||
- npm run test-only | ||
artifacts: | ||
name: ${CI_COMMIT_REF_NAME}_unittests_artifacts | ||
paths: | ||
- test/artifacts | ||
when: on_failure | ||
expire_in: 3 days | ||
|
||
# BIG-IP 14.1+, unittests only (without coverage check) | ||
test_node8: | ||
stage: test | ||
tags: | ||
- docker-executor | ||
script: | ||
- npm run install-test | ||
- npm run test-only | ||
artifacts: | ||
name: ${CI_COMMIT_REF_NAME}_unittests_artifacts | ||
paths: | ||
- test/artifacts | ||
when: on_failure | ||
expire_in: 3 days | ||
extends: | ||
- .run_unittest | ||
image: node:8 | ||
|
||
# mostly for containers, unittests only (without coverage check) | ||
test_node_latest: | ||
extends: | ||
- .run_unittest | ||
image: node:latest | ||
stage: test | ||
tags: | ||
- docker-executor | ||
script: | ||
- npm run install-test | ||
- npm run test-only | ||
artifacts: | ||
name: ${CI_COMMIT_REF_NAME}_unittests_artifacts | ||
paths: | ||
- test/artifacts | ||
when: on_failure | ||
expire_in: 3 days | ||
|
||
# run tests and check code coverage | ||
coverage: | ||
stage: test | ||
# packages audit | ||
npm_audit: | ||
extends: | ||
- .test_job_definition | ||
allow_failure: true | ||
script: | ||
# install jq | ||
- apt-get update | ||
- apt-get install -y jq | ||
# install node modules | ||
- npm run install-test | ||
- *install_unittest_packages_cmd | ||
# npm audit - install includes audit, but perform specific check and fail if needed | ||
- audit_report=$(npm audit --json) | ||
- echo $audit_report | ||
- audit_report=$(npm audit --json) || echo "" | ||
- echo "$audit_report" | ||
- actions=$(echo $audit_report | jq .actions | jq length) | ||
- if [ $actions -ne 0 ]; then echo 'ERROR! vulnerabilities exist'; exit 1; fi | ||
# unit tests | ||
|
||
# run tests and check code coverage | ||
coverage: | ||
extends: | ||
- .test_job_definition | ||
script: | ||
- *install_unittest_packages_cmd | ||
# run tests with coverage report | ||
- npm test | ||
artifacts: | ||
name: ${CI_COMMIT_REF_NAME}_unittests_coverage | ||
paths: | ||
- coverage | ||
tags: | ||
- cm-official-docker-executor | ||
|
||
build_rpm: | ||
image: f5devcentral/containthedocs:rpmbuild | ||
|
@@ -145,23 +156,10 @@ build_docs: | |
- docs/_build/html | ||
expire_in: 1 month | ||
|
||
# for this job following variables should be defined: | ||
# CICD_AUTH_OS_USERNAME - VIO user | ||
# CICD_AUTH_OS_PASSWORD - VIO password | ||
# CICD_AUTH_OS_PROJECT - VIO project | ||
# or | ||
# CICD_AUTH_OS_TOKEN - VIO auth token | ||
# CICD_AUTH_OS_PROJECT - VIO project | ||
# Also, variable to *enable* device pipeline should exist | ||
# REQ_DEVICE_PIPELINE - boolean | ||
deploy_env: | ||
image: ${CICD_CONTAINER_DEPLOY} | ||
extends: | ||
- .harness_deployment_definition | ||
stage: deploy | ||
tags: | ||
- cm-official-docker-executor | ||
variables: | ||
PROJECT_DECLARATION: ${CI_PROJECT_DIR}/test/functional/deployment/declaration.yml | ||
CUSTOM_DECLARATION: "yes" | ||
artifacts: | ||
name: ${CI_COMMIT_REF_NAME}_bigip.harness_info | ||
paths: | ||
|
@@ -171,24 +169,10 @@ deploy_env: | |
variables: | ||
- $REQ_DEVICE_PIPELINE == "true" | ||
script: | ||
- export PROJECT_NAME=$([ "${CICD_PROJECT_NAME}" == "" ] && echo "test_functional_harness" || echo "${CICD_PROJECT_NAME}") | ||
- export PROJECT_DIR="/root/deploy-projects/${PROJECT_NAME}" | ||
- declaration=$(sed "s/_DEPLOYMENT_NAME_/${PROJECT_NAME}/g" "${PROJECT_DECLARATION}") | ||
- echo "$declaration" > "${PROJECT_DECLARATION}" | ||
- cat "${PROJECT_DECLARATION}" | ||
- cd /root/cicd-bigip-deploy && make configure && | ||
make printvars && | ||
make setup && ls -als ${PROJECT_DIR} && | ||
cp ${PROJECT_DIR}/harness_facts_flat.json ${CI_PROJECT_DIR}/harness_facts_flat.json | ||
- $SHELL ./scripts/functional-testing/setup.sh | ||
|
||
test_functional: | ||
stage: functional test | ||
script: | ||
- export TEST_HARNESS_FILE=${CI_PROJECT_DIR}/harness_facts_flat.json | ||
# really only need dev dependencies | ||
- npm run install-test | ||
- ls ./dist -ls | ||
- npm run test-functional | ||
# troubleshooting functional test failures typically requires looking at logs, one of which is | ||
# the restnoded log that is captured by the functional tests. This saves off the folder | ||
# containing that log as an artifact to speed up the troubleshooting process | ||
|
@@ -204,29 +188,24 @@ test_functional: | |
variables: | ||
# enable this job | ||
- $RUN_FUNCTIONAL_TESTS == "true" | ||
script: | ||
- export TEST_HARNESS_FILE=${CI_PROJECT_DIR}/harness_facts_flat.json | ||
- ls ./dist -ls | ||
# really only need dev dependencies | ||
- *install_unittest_packages_cmd | ||
- npm install [email protected] | ||
- npm run test-functional | ||
|
||
# should be executed manually to remove the harness | ||
teardown_env: | ||
image: ${CICD_CONTAINER_DEPLOY} | ||
extends: | ||
- .harness_deployment_definition | ||
stage: teardown | ||
tags: | ||
- cm-official-docker-executor | ||
variables: | ||
PROJECT_DECLARATION: ${CI_PROJECT_DIR}/test/functional/deployment/declaration.yml | ||
CUSTOM_DECLARATION: "yes" | ||
script: | ||
- export PROJECT_NAME=$([ "${CICD_PROJECT_NAME}" == "" ] && echo "test_functional_harness" || echo "${CICD_PROJECT_NAME}") | ||
- export PROJECT_DIR="/root/deploy-projects/${PROJECT_NAME}" | ||
- declaration=$(sed "s/_DEPLOYMENT_NAME_/${PROJECT_NAME}/g" "${PROJECT_DECLARATION}") | ||
- echo "$declaration" > "${PROJECT_DECLARATION}" | ||
- cat "${PROJECT_DECLARATION}" | ||
- cd /root/cicd-bigip-deploy && make configure && | ||
make printvars && | ||
make teardown | ||
when: manual | ||
only: | ||
variables: | ||
- $REQ_DEVICE_PIPELINE == "true" | ||
script: | ||
- $SHELL ./scripts/functional-testing/teardown.sh | ||
|
||
# Publish to internal artifactory | ||
# Note: Will publish when new tags are pushed and use the current build in dist directory | ||
|
@@ -289,6 +268,7 @@ pages: | |
only: | ||
# only update on designated, stable branch | ||
- develop | ||
- doc-release-branch | ||
|
||
# Publish docs to clouddocs.f5networks.net | ||
publish_docs_to_staging: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.