{"id":1498,"date":"2015-12-28T15:05:55","date_gmt":"2015-12-28T20:05:55","guid":{"rendered":"http:\/\/www.jaimerios.com\/?p=1498"},"modified":"2015-12-28T15:05:55","modified_gmt":"2015-12-28T20:05:55","slug":"using-p4plugin-with-jenkins-to-publish-assets","status":"publish","type":"post","link":"https:\/\/jaimerios.com\/?p=1498","title":{"rendered":"Using P4Plugin with Jenkins to publish assets"},"content":{"rendered":"<p><a href=\"http:\/\/www.perforce.com\" rel=\"attachment wp-att-1503\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-1503\" src=\"https:\/\/jaimerios.com\/wp-content\/uploads\/2015\/12\/perforcelogo.png\" alt=\"perforce\" width=\"234\" height=\"27\" \/><\/a><\/p>\n<p>I was previously using the <a href=\"https:\/\/wiki.jenkins-ci.org\/display\/JENKINS\/Perforce+Plugin\" target=\"_blank\" rel=\"noopener\">Perforce Plugin<\/a> in Jenkins to handle my tasks with Perforce, including adding files that needed to be released from a build, but in the past year, I&#8217;ve experienced some weirdness that lead me to evaluate the <a href=\"https:\/\/wiki.jenkins-ci.org\/display\/JENKINS\/P4+Plugin\" target=\"_blank\" rel=\"noopener\">P4Plugin by Perforce<\/a>.<\/p>\n<p>All of the weirdness that I saw in the prior plugin went away, but I couldn&#8217;t figure out how to publish only certain files from a build.<\/p>\n<p>There wasn&#8217;t anything in the documentation instructing you on how to do this feature and when I would use the Publish Assets feature, all of the extra files created in a build would be potentially added to my project, which was not the intent of the build.<\/p>\n<p>It wasn&#8217;t until I found a <a href=\"https:\/\/issues.jenkins-ci.org\/browse\/JENKINS-28780\" target=\"_blank\" rel=\"noopener\">bug report<\/a> that said the following:<\/p>\n<blockquote><p>The shelve publish step <strong>should use a different workspace<\/strong> from the populate step. The view for this <em>workspace should be very narrow<\/em> (a Virtual stream, if using streams). Typically the view should be one or two files, limiting the files it will run the reconcile over.<\/p><\/blockquote>\n<p>\nBy the way, I still haven&#8217;t figured out how to get Virtual streams to work in the P4Plugin as the plugin won&#8217;t recognize them.<\/p>\n<p>\nSo, to be able and isolate what you want published back to your Perforce server, you have to create another workspace to isolate the files, or directories, in question.<\/p>\n<p>Hopefully, Perforce will include this text in their plugin documentation sometime soon.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was previously using the Perforce Plugin in Jenkins to handle my tasks with Perforce, including adding files that needed to be released from a build, but in the past year, I&#8217;ve experienced some weirdness that lead me to evaluate the P4Plugin by Perforce. All of the weirdness that I saw in the prior plugin &#8230; <a title=\"Using P4Plugin with Jenkins to publish assets\" class=\"read-more\" href=\"https:\/\/jaimerios.com\/?p=1498\" aria-label=\"Read more about Using P4Plugin with Jenkins to publish assets\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[349],"class_list":["post-1498","post","type-post","status-publish","format-standard","hentry","category-devops","tag-perforce"],"_links":{"self":[{"href":"https:\/\/jaimerios.com\/index.php?rest_route=\/wp\/v2\/posts\/1498","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jaimerios.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jaimerios.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jaimerios.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jaimerios.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1498"}],"version-history":[{"count":0,"href":"https:\/\/jaimerios.com\/index.php?rest_route=\/wp\/v2\/posts\/1498\/revisions"}],"wp:attachment":[{"href":"https:\/\/jaimerios.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1498"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jaimerios.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1498"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jaimerios.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1498"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}