Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
124 changes: 122 additions & 2 deletions engine/schema/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,10 @@
</build>
<profiles>
<profile>
<id>template-create</id>
<id>download-kvm-systemvm-template</id>
<activation>
<property>
<name>noredist</name>
<name>systemvm-kvm</name>
</property>
</activation>
<build>
Expand All @@ -186,6 +186,30 @@
<md5>${kvm.checksum}</md5>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>download-vmware-systemvm-template</id>
<activation>
<property>
<name>systemvm-vmware</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>${cs.resources-plugin.version}</version>
</plugin>
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>1.6.3</version>
<executions>
<execution>
<id>download-vmware-template</id>
<goals>
Expand All @@ -198,6 +222,30 @@
<md5>${vmware.checksum}</md5>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>download-xenserver-systemvm-template</id>
<activation>
<property>
<name>systemvm-xen</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>${cs.resources-plugin.version}</version>
</plugin>
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>1.6.3</version>
<executions>
<execution>
<id>download-xenserver-template</id>
<goals>
Expand All @@ -215,5 +263,77 @@
</plugins>
</build>
</profile>
<profile>
<id>download-ovm-systemvm-template</id>
<activation>
<property>
<name>systemvm-ovm</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>${cs.resources-plugin.version}</version>
</plugin>
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>1.6.3</version>
<executions>
<execution>
<id>download-ovm-template</id>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<checkSignature>true</checkSignature>
<url>https://download.cloudstack.org/systemvm/${cs.version}/systemvmtemplate-${cs.version}.${patch.version}-ovm.raw.bz2</url>
<outputDirectory>${basedir}/dist/systemvm-templates/</outputDirectory>
<md5>${ovm.checksum}</md5>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>download-hyperv-systemvm-template</id>
<activation>
<property>
<name>systemvm-hyperv</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>${cs.resources-plugin.version}</version>
</plugin>
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>1.6.3</version>
<executions>
<execution>
<id>download-hyperv-template</id>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<checkSignature>true</checkSignature>
<url>https://download.cloudstack.org/systemvm/${cs.version}/systemvmtemplate-${cs.version}.${patch.version}-hyperv.vhd.zip</url>
<outputDirectory>${basedir}/dist/systemvm-templates/</outputDirectory>
<md5>${hyperv.checksum}</md5>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
5 changes: 5 additions & 0 deletions packaging/centos7/cloud.spec
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,11 @@ if [ "%{_sim}" == "SIMULATOR" -o "%{_sim}" == "simulator" ] ; then
FLAGS="$FLAGS -Dsimulator"
fi

if [ \"%{_temp}\" != "" ]; then
echo "Adding flags to package requested templates"
FLAGS="$FLAGS `rpm --eval %{?_temp}`"
fi

mvn -Psystemvm,developer $FLAGS clean package
cd ui && npm install && npm run build && cd ..

Expand Down
5 changes: 5 additions & 0 deletions packaging/centos8/cloud.spec
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,11 @@ if [ "%{_sim}" == "SIMULATOR" -o "%{_sim}" == "simulator" ] ; then
FLAGS="$FLAGS -Dsimulator"
fi

if [ \"%{_temp}\" != "" ]; then
echo "Adding flags to package requested templates"
FLAGS="$FLAGS `rpm --eval %{?_temp}`"
fi

mvn -Psystemvm,developer $FLAGS clean package
cd ui && npm install && npm run build && cd ..

Expand Down
19 changes: 18 additions & 1 deletion packaging/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Optional arguments:
-s, --simulator string Build package for Simulator ("default"|"DEFAULT"|"simulator"|"SIMULATOR") (default "default")
-b, --brand string Set branding to be used in package name (it will override any branding string in POM version)
-T, --use-timestamp Use epoch timestamp instead of SNAPSHOT in the package name (if not provided, use "SNAPSHOT")
-t --templates Passes necessary flag to package the required templates. Comma separated string - kvm,xen,vmware,ovm,hyperv

Other arguments:
-h, --help Display this help message and exit
Expand All @@ -44,6 +45,7 @@ Examples:
package.sh --distribution centos7
package.sh --distribution centos7 --pack oss
package.sh --distribution centos7 --pack noredist
package.sh --distribution centos7 --pack noredist -t "kvm,xen"
package.sh --distribution centos7 --release 42
package.sh --distribution centos7 --pack noredist --release 42

Expand Down Expand Up @@ -143,6 +145,16 @@ function packaging() {
fi
fi

DEFTEMP="-D_temp ''"
if [ "$TEMPLATES" != "" ]; then
if [[ ",$TEMPLATES," = *",all,"* ]]; then
DEFTEMP="-D_temp '-Dsystemvm-kvm -Dsystemvm-xen -Dsystemvm-vmware'"
else
TEMP=-Dsystemvm-"${TEMPLATES//,/" -Dsystemvm-"}"
DEFTEMP="-D_temp ${TEMP}"
fi
fi

DEFFULLVER="-D_fullver $VERSION"
DEFVER="-D_ver $REALVER"

Expand All @@ -161,7 +173,7 @@ function packaging() {
echo ". executing rpmbuild"
cp "$PWD/$DISTRO/cloud.spec" "$RPMDIR/SPECS"

(cd "$RPMDIR"; rpmbuild --define "_topdir ${RPMDIR}" "${DEFVER}" "${DEFFULLVER}" "${DEFREL}" ${DEFPRE+"$DEFPRE"} ${DEFOSSNOSS+"$DEFOSSNOSS"} ${DEFSIM+"$DEFSIM"} -bb SPECS/cloud.spec)
(cd "$RPMDIR"; rpmbuild --define "_topdir ${RPMDIR}" "${DEFVER}" "${DEFFULLVER}" "${DEFREL}" ${DEFPRE+"$DEFPRE"} ${DEFOSSNOSS+"$DEFOSSNOSS"} ${DEFSIM+"$DEFSIM"} ${DEFTEMP+"$DEFTEMP"} -bb SPECS/cloud.spec)
if [ $? -ne 0 ]; then
if [ "$USE_TIMESTAMP" == "true" ]; then
(cd $PWD/../; git reset --hard)
Expand Down Expand Up @@ -246,6 +258,11 @@ while [ -n "$1" ]; do
shift 1
;;

-t | --templates)
TEMPLATES=$2
shift 1
;;

-*)
unrecognized_flags="${unrecognized_flags}$1 "
shift 1
Expand Down
5 changes: 5 additions & 0 deletions packaging/suse15/cloud.spec
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,11 @@ if [ "%{_sim}" == "SIMULATOR" -o "%{_sim}" == "simulator" ] ; then
FLAGS="$FLAGS -Dsimulator"
fi

if [ \"%{_temp}\" != "" ]; then
echo "Adding flags to package requested templates"
FLAGS="$FLAGS `rpm --eval %{?_temp}`"
fi

mvn -Psystemvm,developer $FLAGS clean package
cd ui && npm install && npm run build && cd ..

Expand Down