upd google-cloud-storage plugin support
- add support for pathPrefix support - with tests - defined strip-prefix - undefined strip-prefix Change-Id: I53288da0ad40ec486c2ed00c9d6306abad096992 Signed-off-by: Max Kovgan <kovganm@gmail.com>
This commit is contained in:
parent
8c03c692ec
commit
bd796dbfbc
@ -5157,6 +5157,9 @@ def google_cloud_storage(parser, xml_parent, data):
|
|||||||
share uploaded artifacts with everyone (default false)
|
share uploaded artifacts with everyone (default false)
|
||||||
* **upload-for-failed-jobs** (`bool`) whether to upload
|
* **upload-for-failed-jobs** (`bool`) whether to upload
|
||||||
artifacts even if the build fails (default false)
|
artifacts even if the build fails (default false)
|
||||||
|
* **strip-prefix** (`str`) strip this prefix off the
|
||||||
|
file names (default: not set)
|
||||||
|
|
||||||
* **classic** (`dict`)
|
* **classic** (`dict`)
|
||||||
:params:
|
:params:
|
||||||
* **file-pattern** (`str`) ant style globs to match the
|
* **file-pattern** (`str`) ant style globs to match the
|
||||||
@ -5167,6 +5170,8 @@ def google_cloud_storage(parser, xml_parent, data):
|
|||||||
share uploaded artifacts with everyone (default false)
|
share uploaded artifacts with everyone (default false)
|
||||||
* **upload-for-failed-jobs** (`bool`) whether to upload
|
* **upload-for-failed-jobs** (`bool`) whether to upload
|
||||||
artifacts even if the build fails (default false)
|
artifacts even if the build fails (default false)
|
||||||
|
* **strip-prefix** (`str`) strip this prefix off the
|
||||||
|
file names (default: not set)
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
@ -5227,6 +5232,9 @@ def google_cloud_storage(parser, xml_parent, data):
|
|||||||
XML.SubElement(xml_element, 'forFailedJobs').text = str(
|
XML.SubElement(xml_element, 'forFailedJobs').text = str(
|
||||||
properties.get('upload-for-failed-jobs', False)).lower()
|
properties.get('upload-for-failed-jobs', False)).lower()
|
||||||
|
|
||||||
|
XML.SubElement(xml_element, 'pathPrefix').text = str(
|
||||||
|
properties.get('strip-prefix', ''))
|
||||||
|
|
||||||
if types.count('build-log') > 1:
|
if types.count('build-log') > 1:
|
||||||
XML.SubElement(xml_element, 'module',
|
XML.SubElement(xml_element, 'module',
|
||||||
{'reference': '../../com.google.jenkins.plugins.'
|
{'reference': '../../com.google.jenkins.plugins.'
|
||||||
@ -5257,6 +5265,9 @@ def google_cloud_storage(parser, xml_parent, data):
|
|||||||
XML.SubElement(xml_element, 'forFailedJobs').text = str(
|
XML.SubElement(xml_element, 'forFailedJobs').text = str(
|
||||||
properties.get('upload-for-failed-jobs', False)).lower()
|
properties.get('upload-for-failed-jobs', False)).lower()
|
||||||
|
|
||||||
|
XML.SubElement(xml_element, 'pathPrefix').text = str(
|
||||||
|
properties.get('strip-prefix', ''))
|
||||||
|
|
||||||
if types.count('classic') > 1:
|
if types.count('classic') > 1:
|
||||||
XML.SubElement(xml_element, 'module',
|
XML.SubElement(xml_element, 'module',
|
||||||
{'reference': '../../com.google.jenkins.plugins.'
|
{'reference': '../../com.google.jenkins.plugins.'
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
<bucketNameWithVars>gs://myBucket</bucketNameWithVars>
|
<bucketNameWithVars>gs://myBucket</bucketNameWithVars>
|
||||||
<sharedPublicly>true</sharedPublicly>
|
<sharedPublicly>true</sharedPublicly>
|
||||||
<forFailedJobs>true</forFailedJobs>
|
<forFailedJobs>true</forFailedJobs>
|
||||||
|
<pathPrefix/>
|
||||||
<module/>
|
<module/>
|
||||||
<logName>console.log</logName>
|
<logName>console.log</logName>
|
||||||
</com.google.jenkins.plugins.storage.StdoutUpload>
|
</com.google.jenkins.plugins.storage.StdoutUpload>
|
||||||
@ -22,6 +23,7 @@
|
|||||||
<bucketNameWithVars>gs://myBucket</bucketNameWithVars>
|
<bucketNameWithVars>gs://myBucket</bucketNameWithVars>
|
||||||
<sharedPublicly>false</sharedPublicly>
|
<sharedPublicly>false</sharedPublicly>
|
||||||
<forFailedJobs>true</forFailedJobs>
|
<forFailedJobs>true</forFailedJobs>
|
||||||
|
<pathPrefix/>
|
||||||
<module/>
|
<module/>
|
||||||
<sourceGlobWithVars>target/*.war</sourceGlobWithVars>
|
<sourceGlobWithVars>target/*.war</sourceGlobWithVars>
|
||||||
</com.google.jenkins.plugins.storage.ClassicUpload>
|
</com.google.jenkins.plugins.storage.ClassicUpload>
|
||||||
@ -29,6 +31,7 @@
|
|||||||
<bucketNameWithVars>gs://myBucket/artifacts/</bucketNameWithVars>
|
<bucketNameWithVars>gs://myBucket/artifacts/</bucketNameWithVars>
|
||||||
<sharedPublicly>true</sharedPublicly>
|
<sharedPublicly>true</sharedPublicly>
|
||||||
<forFailedJobs>false</forFailedJobs>
|
<forFailedJobs>false</forFailedJobs>
|
||||||
|
<pathPrefix>path/to/</pathPrefix>
|
||||||
<module reference="../../com.google.jenkins.plugins.storage.ClassicUpload/module"/>
|
<module reference="../../com.google.jenkins.plugins.storage.ClassicUpload/module"/>
|
||||||
<sourceGlobWithVars>**/build/*.iso</sourceGlobWithVars>
|
<sourceGlobWithVars>**/build/*.iso</sourceGlobWithVars>
|
||||||
</com.google.jenkins.plugins.storage.ClassicUpload>
|
</com.google.jenkins.plugins.storage.ClassicUpload>
|
||||||
|
@ -18,3 +18,4 @@ publishers:
|
|||||||
file-pattern: '**/build/*.iso'
|
file-pattern: '**/build/*.iso'
|
||||||
storage-location: 'gs://myBucket/artifacts/'
|
storage-location: 'gs://myBucket/artifacts/'
|
||||||
share-publicly: true
|
share-publicly: true
|
||||||
|
strip-prefix: 'path/to/'
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
<bucketNameWithVars>gs://myBucket</bucketNameWithVars>
|
<bucketNameWithVars>gs://myBucket</bucketNameWithVars>
|
||||||
<sharedPublicly>true</sharedPublicly>
|
<sharedPublicly>true</sharedPublicly>
|
||||||
<forFailedJobs>true</forFailedJobs>
|
<forFailedJobs>true</forFailedJobs>
|
||||||
|
<pathPrefix>path/to/</pathPrefix>
|
||||||
<module/>
|
<module/>
|
||||||
<logName>console.log</logName>
|
<logName>console.log</logName>
|
||||||
</com.google.jenkins.plugins.storage.StdoutUpload>
|
</com.google.jenkins.plugins.storage.StdoutUpload>
|
||||||
@ -22,6 +23,7 @@
|
|||||||
<bucketNameWithVars>gs://myBucket</bucketNameWithVars>
|
<bucketNameWithVars>gs://myBucket</bucketNameWithVars>
|
||||||
<sharedPublicly>false</sharedPublicly>
|
<sharedPublicly>false</sharedPublicly>
|
||||||
<forFailedJobs>false</forFailedJobs>
|
<forFailedJobs>false</forFailedJobs>
|
||||||
|
<pathPrefix>path/to/</pathPrefix>
|
||||||
<module/>
|
<module/>
|
||||||
<sourceGlobWithVars>target/*.war</sourceGlobWithVars>
|
<sourceGlobWithVars>target/*.war</sourceGlobWithVars>
|
||||||
</com.google.jenkins.plugins.storage.ClassicUpload>
|
</com.google.jenkins.plugins.storage.ClassicUpload>
|
||||||
@ -36,6 +38,7 @@
|
|||||||
<bucketNameWithVars>gs://myBucket/artifacts/</bucketNameWithVars>
|
<bucketNameWithVars>gs://myBucket/artifacts/</bucketNameWithVars>
|
||||||
<sharedPublicly>false</sharedPublicly>
|
<sharedPublicly>false</sharedPublicly>
|
||||||
<forFailedJobs>false</forFailedJobs>
|
<forFailedJobs>false</forFailedJobs>
|
||||||
|
<pathPrefix>path/to/</pathPrefix>
|
||||||
<module reference="../../com.google.jenkins.plugins.storage.StdoutUpload/module"/>
|
<module reference="../../com.google.jenkins.plugins.storage.StdoutUpload/module"/>
|
||||||
<logName>console.log</logName>
|
<logName>console.log</logName>
|
||||||
</com.google.jenkins.plugins.storage.StdoutUpload>
|
</com.google.jenkins.plugins.storage.StdoutUpload>
|
||||||
@ -43,6 +46,7 @@
|
|||||||
<bucketNameWithVars>gs://myBucket/artifacts/</bucketNameWithVars>
|
<bucketNameWithVars>gs://myBucket/artifacts/</bucketNameWithVars>
|
||||||
<sharedPublicly>true</sharedPublicly>
|
<sharedPublicly>true</sharedPublicly>
|
||||||
<forFailedJobs>true</forFailedJobs>
|
<forFailedJobs>true</forFailedJobs>
|
||||||
|
<pathPrefix>path/to/</pathPrefix>
|
||||||
<module reference="../../com.google.jenkins.plugins.storage.ClassicUpload/module"/>
|
<module reference="../../com.google.jenkins.plugins.storage.ClassicUpload/module"/>
|
||||||
<sourceGlobWithVars>target/*.war</sourceGlobWithVars>
|
<sourceGlobWithVars>target/*.war</sourceGlobWithVars>
|
||||||
</com.google.jenkins.plugins.storage.ClassicUpload>
|
</com.google.jenkins.plugins.storage.ClassicUpload>
|
||||||
|
@ -10,17 +10,21 @@ publishers:
|
|||||||
storage-location: 'gs://myBucket'
|
storage-location: 'gs://myBucket'
|
||||||
share-publicly: 'true'
|
share-publicly: 'true'
|
||||||
upload-for-failed-jobs: 'true'
|
upload-for-failed-jobs: 'true'
|
||||||
|
strip-prefix: 'path/to/'
|
||||||
- classic:
|
- classic:
|
||||||
file-pattern: 'target/*.war'
|
file-pattern: 'target/*.war'
|
||||||
storage-location: 'gs://myBucket'
|
storage-location: 'gs://myBucket'
|
||||||
|
strip-prefix: 'path/to/'
|
||||||
- expiring-elements:
|
- expiring-elements:
|
||||||
bucket-name: 'gs://myBucket/artifacts/'
|
bucket-name: 'gs://myBucket/artifacts/'
|
||||||
days-to-retain: 7
|
days-to-retain: 7
|
||||||
- build-log:
|
- build-log:
|
||||||
log-name: 'console.log'
|
log-name: 'console.log'
|
||||||
storage-location: 'gs://myBucket/artifacts/'
|
storage-location: 'gs://myBucket/artifacts/'
|
||||||
|
strip-prefix: 'path/to/'
|
||||||
- classic:
|
- classic:
|
||||||
file-pattern: 'target/*.war'
|
file-pattern: 'target/*.war'
|
||||||
storage-location: 'gs://myBucket/artifacts/'
|
storage-location: 'gs://myBucket/artifacts/'
|
||||||
share-publicly: 'true'
|
share-publicly: 'true'
|
||||||
upload-for-failed-jobs: 'true'
|
upload-for-failed-jobs: 'true'
|
||||||
|
strip-prefix: 'path/to/'
|
||||||
|
Loading…
Reference in New Issue
Block a user