Save cc-model artifacts to Artifactory

Save artifacts from cc-model-generation jobs to Artifactory:
* test-mk-cookiecutter-templates
* test-mk-cookiecutter-templates-chunk
* generate-salt-model-separated-products

Change-Id: I90d76858dbc9343388fffdebb1e028b7bb7805bf
Related-Prod: PROD-28146 (PROD:28146)
diff --git a/generate-cookiecutter-products.groovy b/generate-cookiecutter-products.groovy
index b672c4e..c407d7c 100644
--- a/generate-cookiecutter-products.groovy
+++ b/generate-cookiecutter-products.groovy
@@ -367,6 +367,19 @@
                 sh(script: 'find . -mindepth 1 -delete > /dev/null || true')
             }
             // common.sendNotification(currentBuild.result,"",["slack"])
+            stage('Save artifacts to Artifactory') {
+                def artifactory = new com.mirantis.mcp.MCPArtifactory()
+                def buildProps = [ "context=${context['cluster_name']}" ]
+                if (RequesterEmail != '' && !RequesterEmail.contains('example')) {
+                    buildProps.add("emailTo=${RequesterEmail}")
+                }
+                def artifactoryLink = artifactory.uploadJobArtifactsToArtifactory([
+                    'artifactory': 'mcp-ci',
+                    'artifactoryRepo': "drivetrain-local/${JOB_NAME}/${context['cluster_name']}-${BUILD_NUMBER}",
+                    'buildProps': buildProps,
+                ])
+                currentBuild.description += "<br/>${artifactoryLink}"
+            }
         }
     }
 }