Commit 1e5e7709 authored by gavin2lee's avatar gavin2lee
Browse files

#2289 add fileset to s3 element

Showing with 100 additions and 32 deletions
+100 -32
package com.webank.wecube.platform.core.service.plugin.xml.register;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "fileSetType", propOrder = {
"file"
})
public class FileSetType {
protected List<FileType> file;
public List<FileType> getFile() {
if (file == null) {
file = new ArrayList<FileType>();
}
return this.file;
}
}
package com.webank.wecube.platform.core.service.plugin.xml.register;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "fileType", propOrder = {
"source","toFile"
})
public class FileType {
@XmlAttribute(name = "source", required = true)
protected String source;
@XmlAttribute(name = "toFile", required = true)
protected String toFile;
public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source;
}
public String getToFile() {
return toFile;
}
public void setToFile(String toFile) {
this.toFile = toFile;
}
}
......@@ -11,8 +11,8 @@ package com.webank.wecube.platform.core.service.plugin.xml.register;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
/**
......@@ -34,38 +34,15 @@ import javax.xml.bind.annotation.XmlValue;
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "s3Type", propOrder = {
"value"
"bucketName","fileSet"
})
public class S3Type {
@XmlValue
protected String value;
@XmlAttribute(name = "bucketName", required = true)
protected String bucketName;
/**
* Gets the value of the value property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setValue(String value) {
this.value = value;
}
@XmlElement(name = "fileSet", required = false)
protected FileSetType fileSet;
/**
* Gets the value of the bucketName property.
......@@ -91,4 +68,13 @@ public class S3Type {
this.bucketName = value;
}
public FileSetType getFileSet() {
return fileSet;
}
public void setFileSet(FileSetType fileSet) {
this.fileSet = fileSet;
}
}
......@@ -110,13 +110,25 @@
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="s3Type">
<xs:complexType name="fileType">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute type="xs:string" name="bucketName" use="required"/>
<xs:attribute type="xs:string" name="source" use="required"/>
<xs:attribute type="xs:string" name="toFile" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="fileSetType">
<xs:sequence>
<xs:element type="fileType" name="file" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="s3Type">
<xs:sequence>
<xs:element type="fileSetType" name="fileSet" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute type="xs:string" name="bucketName" use="required"/>
</xs:complexType>
<xs:complexType name="resourceDependenciesType">
<xs:sequence>
<xs:element type="dockerType" name="docker" maxOccurs="unbounded"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<package name="artifacts" version="{{VERSION}}"
<package name="artifacts" version="v1.5.5.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="plugin-config-v2.xsd">
......@@ -69,7 +69,12 @@
ARTIFACTS_DIFF_CONF_EXTENSION={{ARTIFACTS_DIFF_CONF_EXTENSION}},ARTIFACTS_VARIABLE_EXPRESSION={{ARTIFACTS_VARIABLE_EXPRESSION}},
WECUBE_GATEWAY_URL={{GATEWAY_URL}},WECUBE_JWT_SIGNING_KEY={{JWT_SIGNING_KEY}},ARTIFACTS_NEXUS_SORT_AS_STRING={{NEXUS_SORT_AS_STRING}},
ARTIFACTS_LOCAL_NEXUS_CONNECTOR_PORT=5000,ARTIFACTS_NEXUS_CONNECTOR_PORT={{NEXUS_CONNECTOR_PORT}}"/>
<s3 bucketName="wecube-artifacts"/>
<s3 bucketName="wecube-artifacts">
<fileSet>
<file source="a.conf" toFile="a.conf"/>
<file source="b.conf" toFile="b.conf"/>
</fileSet>
</s3>
</resourceDependencies>
<!-- 7.插件列表 - 描述插件包中单个插件的输入和输出 -->
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment