Anna Arhipova | d2ced49 | 2022-09-28 10:02:56 +0200 | [diff] [blame] | 1 | - job-template: |
| 2 | project-type: freestyle |
Anna Arhipova | b80f23b | 2022-10-05 21:45:35 +0200 | [diff] [blame] | 3 | description: "{job-description} |
Anna Arhipova | d2ced49 | 2022-09-28 10:02:56 +0200 | [diff] [blame] | 4 | WARNING! models are pushed to the same LAB_CONTEXT_NAME repositories under the specified tags! |
Anna Arhipova | b80f23b | 2022-10-05 21:45:35 +0200 | [diff] [blame] | 5 | Fuel-devops environment is erased after the build by default" |
Anna Arhipova | d2ced49 | 2022-09-28 10:02:56 +0200 | [diff] [blame] | 6 | concurrent: true |
| 7 | disabled: false |
| 8 | name: swarm-cookied-model-generator |
| 9 | parameters: |
| 10 | - string: |
| 11 | default: '' |
| 12 | description: 'This name will be used: |
| 13 | - to find the template file tcp_tests/templates/cookied-model-generator/salt_$LAB_CONTEXT_NAME.yaml |
| 14 | - to set the salt model cluster name' |
| 15 | name: LAB_CONTEXT_NAME |
| 16 | trim: 'false' |
| 17 | - string: |
| 18 | default: '' |
| 19 | description: 'Cluster name wich will be used for model creation |
| 20 | Default: LAB_CONFIG_NAME' |
| 21 | name: CLUSTER_NAME |
| 22 | trim: 'false' |
| 23 | - string: |
| 24 | default: '' |
| 25 | description: 'Domain name wich will be used for model creation |
| 26 | Default: LAB_CONFIG_NAME.local' |
| 27 | name: DOMAIN_NAME |
| 28 | trim: 'false' |
| 29 | - string: |
| 30 | default: 'proposed' |
| 31 | description: '' |
| 32 | name: REPOSITORY_SUITE |
| 33 | trim: 'false' |
| 34 | - string: |
| 35 | default: 'proposed' |
| 36 | description: '' |
| 37 | name: SALT_MODELS_SYSTEM_COMMIT |
| 38 | trim: 'false' |
| 39 | - string: |
| 40 | default: 'proposed' |
| 41 | description: '' |
| 42 | name: COOKIECUTTER_TEMPLATE_COMMIT |
| 43 | trim: 'false' |
| 44 | - string: |
| 45 | default: '' |
| 46 | description: '' |
| 47 | name: JENKINS_PIPELINE_BRANCH |
| 48 | trim: 'false' |
| 49 | - string: |
| 50 | default: '' |
| 51 | description: '' |
| 52 | name: SALT_MODELS_SYSTEM_REF_CHANGE |
| 53 | trim: 'false' |
| 54 | - string: |
| 55 | default: 'sre-team-infra' |
| 56 | description: '' |
| 57 | name: NODE_NAME |
| 58 | trim: 'false' |
| 59 | - string: |
| 60 | default: '' |
| 61 | description: '' |
| 62 | name: TCP_QA_REFS |
| 63 | - string: |
| 64 | default: '' |
| 65 | description: 'environment-templates repository ref change' |
| 66 | name: ENVIRONMENT_TEMPLATE_REF_CHANGE |
| 67 | trim: 'false' |
| 68 | - string: |
| 69 | default: false |
| 70 | description: cookiecutter-templates repository ref change |
| 71 | name: COOKIECUTTER_REF_CHANGE |
| 72 | - bool: |
| 73 | default: true |
| 74 | description: '' |
| 75 | name: ERASE_EXISTING_ENVIRONMENT |
| 76 | - bool: |
| 77 | default: true |
| 78 | description: '' |
| 79 | name: SHUTDOWN_ENV_ON_TEARDOWN |
| 80 | - bool: |
| 81 | default: true |
| 82 | description: '' |
| 83 | name: ERASE_ENVIRONMENT_AFTER_BUILD |
| 84 | - string: |
| 85 | default: '192.168.10.0/24' |
| 86 | description: 'Management (admin/PXE) network. For now /24 only.' |
| 87 | name: IPV4_NET_ADMIN |
| 88 | trim: 'false' |
| 89 | - string: |
| 90 | default: '172.16.10.0/24' |
| 91 | description: 'Control (internal cluster communications) network. For now /24 only.' |
| 92 | name: IPV4_NET_CONTROL |
| 93 | trim: 'false' |
| 94 | - string: |
| 95 | default: '10.1.0.0/24' |
| 96 | description: 'OpenStack tenant (transport for user-defined internal networks for instances) network. For now /24 only.' |
| 97 | name: IPV4_NET_TENANT |
| 98 | trim: 'false' |
| 99 | - string: |
| 100 | default: '10.16.0.0/24' |
| 101 | description: 'OpenStack external network (for incoming connections with floating IPs). For now /24 only.' |
| 102 | name: IPV4_NET_EXTERNAL |
| 103 | trim: 'false' |
| 104 | - string: |
| 105 | default: '/home/jenkins/images/cfg01-day01.qcow2' |
| 106 | description: 'Image used for the model generation and validation' |
| 107 | name: IMAGE_PATH_CFG01_DAY01 |
| 108 | trim: 'false' |
| 109 | - string: |
| 110 | default: '' |
| 111 | description: '' |
| 112 | name: UPDATE_REPO_CUSTOM_TAG |
| 113 | trim: 'false' |
| 114 | - string: |
| 115 | default: '' |
| 116 | description: '' |
| 117 | name: UPDATE_VERSION |
| 118 | trim: 'false' |
| 119 | - string: |
Vladimir Khlyunev | 0ca3ba8 | 2022-10-31 12:12:30 +0400 | [diff] [blame^] | 120 | name: UPDATES_MIRANTIS_VERSION |
| 121 | default: '' |
| 122 | description: | |
| 123 | Overwrite subsection of updates.mirantis.com repository. |
| 124 | Effective only if enabled in cookiecutter context! |
| 125 | - string: |
Anna Arhipova | d2ced49 | 2022-09-28 10:02:56 +0200 | [diff] [blame] | 126 | default: '' |
| 127 | description: '' |
| 128 | name: DEPLOY_NETWORK_NETMASK |
| 129 | trim: 'false' |
Vladimir Khlyunev | c770f1b | 2022-10-19 18:04:37 +0400 | [diff] [blame] | 130 | - string: |
| 131 | name: IPMI_USER |
| 132 | default: '' |
| 133 | - string: |
| 134 | name: IPMI_PASS |
| 135 | default: '' |
Anna Arhipova | d2ced49 | 2022-09-28 10:02:56 +0200 | [diff] [blame] | 136 | logrotate: |
| 137 | daysToKeep: 365 |
| 138 | scm: |
| 139 | - git: |
| 140 | branches: |
| 141 | - FETCH_HEAD |
| 142 | refspec: '${{TCP_QA_REFS}}' |
| 143 | url: https://gerrit.mcp.mirantis.com/mcp/tcp-qa |
| 144 | wrappers: |
| 145 | - inject: |
| 146 | properties-content: |- |
| 147 | VENV_PATH=/home/jenkins/fuel-devops30 |
| 148 | ENV_NAME=swarm_model_$BUILD_NUMBER |
| 149 | LAB_CONFIG_NAME=cookied-model-generator |
| 150 | |
| 151 | SALT_STEPS_PATH=templates/$LAB_CONFIG_NAME/salt_$LAB_CONTEXT_NAME.yaml |
| 152 | |
| 153 | TEST_GROUP=test_generate_model |
| 154 | #STORAGE_POOL_NAME=second_pool |
| 155 | PYTHONIOENCODING=UTF-8 |
| 156 | MAKE_SNAPSHOT_STAGES=false |
| 157 | DEVOPS_LOCK_FILE=/run/lock/devops_lock |
| 158 | - credentials-binding: |
| 159 | - ssh-user-private-key: |
| 160 | credential-id: f4fb9dd6-ba63-4085-82f7-3fa601334d95 |
| 161 | key-file-variable: COOKIECUTTER_TEMPLATES_REPOSITORY_KEY_PATH |
Anna Arhipova | d2ced49 | 2022-09-28 10:02:56 +0200 | [diff] [blame] | 162 | builders: |
| 163 | - shell: "chmod +x jobs/pipelines/cookied-model-generator.sh" |
| 164 | - shell: "./jobs/pipelines/cookied-model-generator.sh" |
| 165 | publishers: |
| 166 | - archive: |
| 167 | artifacts: 'tcp_tests/*.log,tcp_tests/*.tar.gz,tcp_tests/*.xml' |
| 168 | allow-empty: false |
| 169 | - post-tasks: |
| 170 | - run-if-job-successful: false |
| 171 | matches: |
| 172 | # Small hack to start post-tasks every time after build |
| 173 | - log-text: test session starts |
| 174 | - operator: OR |
| 175 | script: " . $VENV_PATH/bin/activate; |
| 176 | if [ $SHUTDOWN_ENV_ON_TEARDOWN = 'true' ]; then |
| 177 | dos.py destroy $ENV_NAME || true; |
| 178 | fi; |
| 179 | |
| 180 | if [ $ERASE_ENVIRONMENT_AFTER_BUILD = 'true' ]; then |
| 181 | dos.py erase $ENV_NAME || true; |
| 182 | fi;" |