Add swarm-create-cfg-config-drive in jjb
Related-Prod:PROD-37084
Change-Id: I4ba009fb983466b8ef78baa2e58160dbea39d7dd
diff --git a/jobs/project.yaml b/jobs/project.yaml
index 72b0971..d7d4e40 100644
--- a/jobs/project.yaml
+++ b/jobs/project.yaml
@@ -55,6 +55,7 @@
- generate-report
- swarm-testrail-report-jjb
- swarm-bootstrap-salt-cluster-heat-jjb
+ - swarm-create-cfg-config-drive-jjb
# - mark-reports - can't moved to JJB, a lot of parameters is not supported like Inject environment variables
# - diff_params_reclass_system - can't moved to JJB, unsupported parameters
# - diff_params_reclass_system - can't moved to JJB, unsupported parameters
diff --git a/jobs/templates/swarm-create-cfg-config-drive-jjb.yaml b/jobs/templates/swarm-create-cfg-config-drive-jjb.yaml
new file mode 100644
index 0000000..979ce74
--- /dev/null
+++ b/jobs/templates/swarm-create-cfg-config-drive-jjb.yaml
@@ -0,0 +1,147 @@
+- job-template:
+ project-type: pipeline
+ description: '{job-description}'
+ concurrent: true
+ disabled: false
+ name: swarm-create-cfg-config-drive-jjb
+ properties:
+ - throttle:
+ option: project
+ max-per-node: 3
+ max-total: 3
+ parameters:
+ - string:
+ name: CLUSTER_NAME
+ default: ''
+ description: 'CLUSTER_NAME'
+ trim: 'false'
+ - string:
+ name: MODEL_URL
+ default: ''
+ description: 'Url to model.tar.gz with cluster model generated by cookiecutter'
+ trim: 'false'
+ - choice:
+ choices:
+ - tar.gz
+ - git
+ description: ''
+ name: MODEL_URL_OBJECT_TYPE
+ - bool:
+ name: DOWNLOAD_CONFIG_DRIVE
+ default: false
+ description: ''
+ - string:
+ name: MCP_VERSION
+ default: 'proposed'
+ description: ''
+ trim: 'false'
+ - string:
+ name: COMMON_SCRIPTS_COMMIT
+ default: '2018.4.0'
+ description: 'COMMON_SCRIPTS_COMMIT'
+ trim: 'false'
+ - string:
+ name: NODE_NAME
+ default: 'offline-deploy'
+ description: 'Node name or label to run the stages'
+ trim: 'false'
+ - string:
+ name: CONFIG_DRIVE_ISO_NAME
+ default: ''
+ description: 'If empty, it will be set to: cfg01.${{DOMAIN_NAME}}-config-${{dateFormat.format(date)}}.iso'
+ trim: 'false'
+ - string:
+ name: SALT_MASTER_DEPLOY_IP
+ default: '10.10.0.15'
+ description: ''
+ trim: 'false'
+ - string:
+ name: DEPLOY_NETWORK_GW
+ default: '10.10.0.1'
+ description: ''
+ trim: 'false'
+ - string:
+ name: DEPLOY_NETWORK_NETMASK
+ default: '255.255.0.0'
+ description: ''
+ trim: 'false'
+ - string:
+ name: DNS_SERVERS
+ default: '172.18.176.6'
+ description: ''
+ trim: 'false'
+ - string:
+ name: PIPELINE_REPO_URL
+ default: 'http://10.10.0.14:8088'
+ description: ''
+ trim: 'false'
+ - bool:
+ name: PIPELINES_FROM_ISO
+ default: false
+ description: |
+ If true: will be used pipeline repositories included in this ISO
+ If false: will be used PIPELINE_REPO_URL during cfg01 node bootstrap
+ - string:
+ name: MCP_SALT_REPO_URL
+ default: ''
+ description: |
+ If empty: use default from mcp-common-scripts config-drive/master_config.yaml
+ For offline deploy: http://10.10.0.14/ubuntu-xenial
+ For online deploy: http://mirror.mirantis.com/
+ trim: 'false'
+ - string:
+ name: MCP_SALT_REPO_KEY
+ default: ''
+ description: |
+ If empty: use default from mcp-common-scripts config-drive/master_config.yaml
+ For offline deploy: http://10.10.0.14/public.gpg
+ For online deploy: ${{MCP_SALT_REPO_URL}}/${{MCP_VERSION}}/salt-formulas/xenial/archive-salt-formulas.key
+ trim: 'false'
+ - string:
+ name: PIPELINE_LIBRARY_REF
+ default: ''
+ description: ''
+ trim: 'false'
+ - string:
+ name: MK_PIPELINES_REF
+ default: ''
+ description: ''
+ trim: 'false'
+ - string:
+ name: MCP_COMMON_SCRIPTS_REFS
+ default: ''
+ description: ''
+ trim: 'false'
+ - string:
+ name: TCP_QA_REFS
+ default: ''
+ description: |
+ Example: refs/changes/89/411189/36
+ (for now - only one reference allowed)
+ trim: 'false'
+ - string:
+ name: GERRIT_MCP_CREDENTIALS_ID
+ default: 'f4fb9dd6-ba63-4085-82f7-3fa601334d95'
+ description: 'Credentials ID to access gerrit.mcp.mirantis.net'
+ trim: 'false'
+ - string:
+ name: DEPLOY_NETWORK_MTU
+ default: '1450'
+ description: ''
+ trim: 'false'
+ - string:
+ name: MCP_SALT_REPO_UPDATES
+ default: ''
+ description: ''
+ trim: 'false'
+ pipeline-scm:
+ lightweight-checkout: false
+ scm:
+ - git:
+ branches:
+ - FETCH_HEAD
+ refspec: ${{TCP_QA_REFS}}
+ url: https://gerrit.mcp.mirantis.com/mcp/tcp-qa
+ script-path: jobs/pipelines/swarm-create-cfg-config-drive.groovy
+ logrotate:
+ daysToKeep: 30
\ No newline at end of file
diff --git a/jobs/view.yaml b/jobs/view.yaml
index a8bba0e..2709519 100644
--- a/jobs/view.yaml
+++ b/jobs/view.yaml
@@ -179,6 +179,7 @@
filter-queue: true
job-name:
- swarm-bootstrap-salt-cluster-heat-jjb
+ - swarm-create-cfg-config-drive-jjb
columns:
- status
- weather
@@ -186,4 +187,4 @@
- last-success
- last-failure
- last-duration
- - build-button
\ No newline at end of file
+ - build-button
diff --git a/src/com/mirantis/system_qa/SharedPipeline.groovy b/src/com/mirantis/system_qa/SharedPipeline.groovy
index e5f1de3..110d406 100644
--- a/src/com/mirantis/system_qa/SharedPipeline.groovy
+++ b/src/com/mirantis/system_qa/SharedPipeline.groovy
@@ -513,7 +513,7 @@
string(name: 'MCP_COMMON_SCRIPTS_REFS', value: "${mcp_common_scripts_ref}"),
string(name: 'MCP_SALT_REPO_UPDATES', value: "'deb [arch=amd64] http://mirror.mirantis.com/update/${UPDATE_VERSION}/salt-formulas/xenial xenial main'"),
]
- build_pipeline_job('swarm-create-cfg-config-drive', parameters)
+ build_pipeline_job('swarm-create-cfg-config-drive-jjb', parameters)
}
def run_job_on_day01_node(stack_to_install, timeout=2400) {