diff options
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 195 |
1 files changed, 195 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..6c4b312 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,195 @@ +--- +################################################################################ +# +# !! DO NOT EDIT MANUALLY !! +# +# This file is generated by gitlab-ci-generator +# +################################################################################ + +stages: + - lint + - config + # - infra_install + # - virt_install + # - apps + # - check + +variables: + GIT_SUBMODULE_STRATEGY: recursive + VAULT_FILE: .vault + RUNNER_TAG: <SET ME> + +################################################################################ +# Shared parameters +################################################################################ +.runner_tags: &runner_tags + tags: + - $RUNNER_TAG + +.syntax_checking: &syntax_checking + only: + - pushes + stage: lint + +.artifacts_root: &artifacts_root + name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME" + paths: + - vars/ + - inventory/ + +.artifacts: &artifacts + artifacts: + <<: *artifacts_root + expire_in: 15 days + +.artifacts_longexpire: &artifacts_longexpire + artifacts: + <<: *artifacts_root + expire_in: 1 yrs + +.runner_env: &runner_env + CHAINED_CI_SRC: "<SET ME>" # Url to the gitlab chained ci project + # CHAINED_CI_SRC: "https://gitlab.devops.telekom.de/tnap/onapcommunity/integrationproject/onapdeployment/chained-ci.git" + +################################################################################ +# Linting +################################################################################ + +yaml_checking: + <<: *syntax_checking + <<: *runner_tags + variables: + <<: *runner_env + image: sdesbure/yamllint:latest + script: + - > + yamllint -d "line-length: { + max: 80, + allow-non-breakable-words: true, + allow-non-breakable-inline-mappings: true}" + .gitlab-ci.yml + - yamllint *.yml + +ansible_linting: + <<: *syntax_checking + <<: *runner_tags + variables: + <<: *runner_env + image: sdesbure/ansible-lint:latest + script: + - ansible-lint -x ANSIBLE0010,ANSIBLE0013 run-ci.yml + +################################################################################ +# Pages +################################################################################ + +pages: + image: registry.gitlab.com/orange-opensource/lfn/ci_cd/docker_ansible:2.7.10-alpine + stage: lint + <<: *runner_tags + variables: + <<: *runner_env + script: + - ./chained-ci-vue/init.sh ./pod_inventory + artifacts: + paths: + - public + only: + - master + except: + - triggers + - api + - external + - pipelines + - schedules + - web + + +################################################################################ +# Jobs +################################################################################ + +.vault_mgmt: &vault_mgmt + before_script: + - echo ${ANSIBLE_VAULT_PASSWORD} > ${PWD}/${VAULT_FILE} + after_script: + - rm -f $PWD/.vault + +.set_config: &set_config + <<: *runner_tags + <<: *vault_mgmt + image: registry.gitlab.com/orange-opensource/lfn/ci_cd/docker_ansible:2.7.10-alpine + script: + - > + ansible-playbook -i pod_inventory/inventory --limit ${pod} + --vault-password-file ${PWD}/${VAULT_FILE} + ${ansible_verbose} artifacts_init.yml + +.run_ci: &run_ci + <<: *runner_tags + <<: *vault_mgmt + image: registry.gitlab.com/orange-opensource/lfn/ci_cd/docker_ansible:2.7.10-alpine + script: + - > + ansible-playbook -i pod_inventory/inventory --limit ${pod} + --extra-vars "step=${CI_JOB_NAME%:*}" + --vault-password-file ${PWD}/${VAULT_FILE} + ${ansible_verbose} run-ci.yml + +.trigger: &trigger + <<: *runner_tags + <<: *vault_mgmt + image: registry.gitlab.com/orange-opensource/lfn/ci_cd/docker_ansible:2.7.10-alpine + script: + - > + ansible-playbook -i pod_inventory/inventory --limit ${pod} + --vault-password-file ${PWD}/${VAULT_FILE} + ${ansible_verbose} --extra-vars "step=trigger" trigger_myself.yml + +################################################################################ +# onap-daily-unh-oom-master +################################################################################ + +.onap-daily-unh-oom-master_global: &onap-daily-unh-oom-master_global + variables: + pod: onap-daily-unh-oom-master + <<: *runner_env + environment: + name: unh/k8s8-8 + only: + variables: + - $POD == "onap-daily-unh-oom-master" + refs: + - web + - schedules + - triggers + +config:onap-daily-unh-oom-master: + stage: config + <<: *onap-daily-unh-oom-master_global + <<: *set_config + <<: *artifacts_longexpire +# infra_deploy:onap-daily-unh-oom-master: +# stage: infra_install +# <<: *onap-daily-unh-oom-master_global +# <<: *run_ci +# <<: *artifacts_longexpire +# virt_install:onap-daily-unh-oom-master: +# stage: virt_install +# <<: *onap-daily-unh-oom-master_global +# <<: *run_ci +# <<: *artifacts_longexpire +# apps_deploy:onap-daily-unh-oom-master: +# stage: apps +# <<: *onap-daily-unh-oom-master_global +# <<: *run_ci +# <<: *artifacts_longexpire +# apps_test:onap-daily-unh-oom-master: +# stage: check +# <<: *onap-daily-unh-oom-master_global +# <<: *run_ci + +## +# End of generated file +## |