Skip to content

Commit d60ed1b

Browse files
committed
Add oraclelinux10.v1 for ACS 4.22 and JDK 4.21
1 parent 7744d6f commit d60ed1b

File tree

7 files changed

+109
-3
lines changed

7 files changed

+109
-3
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Contents
2121
|---------------------|-------------------------------|-----------------------|----------------------|
2222
| **ubuntu2404.v2** | 4.22.x | JDK 17, nodejs 20 | DEB packages for Ubuntu distros |
2323
| **rocky9.v1** | 4.22.x | JDK 17, nodejs 20 | RPM packages for RHEL/Rocky Linux/AlmaLinux/OracleLinux 8/9/10 distros |
24+
| **oraclelinux10.v1**| 4.22.x | JDK 21, nodejs 20 | RPM packages for RHEL/Rocky Linux/AlmaLinux/OracleLinux 8/9/10 distros |
2425
| **ubuntu2404.v1** | 4.18.x, 4.19.x, 4.20.x, 4.21 | JDK 11, nodejs 16 | DEB packages for Ubuntu distros |
2526
| **ubuntu2204.v1** | 4.18.x, 4.19.x | JDK 11, nodejs 14 | DEB packages for Ubuntu distros |
2627
| **rocky8.v1** | 4.18.x, 4.19.x | JDK 11, nodejs 14 | RPM packages for RHEL/Rocky Linux/AlmaLinux/OracleLinux 8/9 distros |

centos7.v1/entrypoint.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,12 @@ fi
3838
# Packaging
3939
FLAGS=$BUILD_OPTS packaging/package.sh -d centos7 $PACKAGE_OPTS
4040

41-
mv $SOURCE_DIR/dist/rpmbuild/RPMS/x86_64/cloudstack-*.rpm $OUTPUT_DIR
41+
if [ -d "$SOURCE_DIR/dist/rpmbuild/RPMS/x86_64/" ]; then
42+
mv $SOURCE_DIR/dist/rpmbuild/RPMS/x86_64/cloudstack-*.rpm $OUTPUT_DIR
43+
elif [ -d "$SOURCE_DIR/dist/rpmbuild/RPMS/noarch/" ]; then
44+
mv $SOURCE_DIR/dist/rpmbuild/RPMS/noarch/cloudstack-*.rpm $OUTPUT_DIR
45+
fi
46+
4247
if [[ $SOURCE =~ http.* ]] || [[ $SOURCE =~ git.* ]]; then
4348
rm -rf $SOURCE_DIR
4449
fi

config.oraclelinux10.v1.sample

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
# The repository of the image. Default is weizhouapache/cloudstack-builder
3+
REPO=weizhouapache/cloudstack-builder
4+
5+
# The name of the image
6+
IMAGE=oraclelinux10.v1
7+
8+
# The source directory or git repository
9+
# This will be mounted or cloned to /source the docker container.
10+
SOURCE=https://github.com/apache/cloudstack.git
11+
12+
# The directory where the packages will be.
13+
# This will be mounted to /output the docker container.
14+
OUTPUT=/tmp
15+
16+
# The CloudStack version, branch name or commit SHA.
17+
VERSION=4.22.0.0
18+
19+
# The build options.
20+
# The default value for is "-Dnoredist -DskipTests -Dsystemvm-kvm -Dsystemvm-xen -Dsystemvm-vmware"
21+
# Please refer to https://github.com/weizhouapache/docker-cloudstack-builder/blob/main/README.md
22+
BUILD_OPTS=
23+
24+
# The options for `package.sh` (RPM only)
25+
# Please refer to https://github.com/apache/cloudstack/blob/main/packaging/package.sh
26+
PACKAGE_OPTS=
27+
28+
# Please set to sudo if use a non-root user
29+
SUDO=

oraclelinux10.v1/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM oraclelinux:10
2+
MAINTAINER Wei Zhou <weizhou@apache.org>
3+
4+
RUN yum install -y which java-21-openjdk java-21-openjdk-devel maven rpm-build \
5+
&& yum install -y gcc glibc-devel python3 python3-pip python3-setuptools wget curl git jq xorriso --allowerasing
6+
7+
RUN curl -sL https://rpm.nodesource.com/setup_20.x | bash - \
8+
&& yum install -y nodejs g++
9+
10+
COPY entrypoint.sh /entrypoint.sh
11+
12+
ENTRYPOINT ["/entrypoint.sh"]

oraclelinux10.v1/entrypoint.sh

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#!/bin/bash -x
2+
3+
# Print system information
4+
export JAVA_HOME=/usr/lib/jvm/java-21-openjdk/
5+
mvn -version
6+
java --version
7+
javac -version
8+
9+
SOURCE_DIR=/source/
10+
OUTPUT_DIR=/output/
11+
BUILD_OPTS_DEFAULT="-Dnoredist -DskipTests -Dsystemvm-kvm -Dsystemvm-xen -Dsystemvm-vmware -T2"
12+
13+
SOURCE=${SOURCE:-}
14+
VERSION=${VERSION:-}
15+
BUILD_OPTS=${BUILD_OPTS:-$BUILD_OPTS_DEFAULT}
16+
PACKAGE_OPTS=${PACKAGE_OPTS:-}
17+
18+
if [[ $SOURCE =~ http.* ]] || [[ $SOURCE =~ git.* ]]; then
19+
if [ -d "$SOURCE_DIR" ]; then
20+
echo "$SOURCE_DIR already exists in the container"
21+
exit 1
22+
fi
23+
git clone $SOURCE $SOURCE_DIR
24+
elif [ -z "$SOURCE_DIR" ] || [ ! -d "$SOURCE_DIR" ] || [ ! -f "$SOURCE_DIR/pom.xml" ]; then
25+
echo "Source $SOURCE_DIR does not exist in the container"
26+
exit 1
27+
fi
28+
if [ ! -d "$OUTPUT_DIR" ]; then
29+
echo "$OUTPUT_DIR does not exist in the container"
30+
exit 1
31+
fi
32+
33+
cd $SOURCE_DIR
34+
if [ ! -z "$VERSION" ]; then
35+
git checkout $VERSION
36+
fi
37+
38+
# Packaging
39+
NODE_OPTIONS=--openssl-legacy-provider FLAGS=$BUILD_OPTS packaging/package.sh -d centos8 $PACKAGE_OPTS
40+
41+
if [ -d "$SOURCE_DIR/dist/rpmbuild/RPMS/x86_64/" ]; then
42+
mv $SOURCE_DIR/dist/rpmbuild/RPMS/x86_64/cloudstack-*.rpm $OUTPUT_DIR
43+
elif [ -d "$SOURCE_DIR/dist/rpmbuild/RPMS/noarch/" ]; then
44+
mv $SOURCE_DIR/dist/rpmbuild/RPMS/noarch/cloudstack-*.rpm $OUTPUT_DIR
45+
fi
46+
47+
if [[ $SOURCE =~ http.* ]] || [[ $SOURCE =~ git.* ]]; then
48+
rm -rf $SOURCE_DIR
49+
fi

rocky8.v1/entrypoint.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,12 @@ fi
3838
# Packaging
3939
FLAGS=$BUILD_OPTS packaging/package.sh -d centos8 $PACKAGE_OPTS
4040

41-
mv $SOURCE_DIR/dist/rpmbuild/RPMS/x86_64/cloudstack-*.rpm $OUTPUT_DIR
41+
if [ -d "$SOURCE_DIR/dist/rpmbuild/RPMS/x86_64/" ]; then
42+
mv $SOURCE_DIR/dist/rpmbuild/RPMS/x86_64/cloudstack-*.rpm $OUTPUT_DIR
43+
elif [ -d "$SOURCE_DIR/dist/rpmbuild/RPMS/noarch/" ]; then
44+
mv $SOURCE_DIR/dist/rpmbuild/RPMS/noarch/cloudstack-*.rpm $OUTPUT_DIR
45+
fi
46+
4247
if [[ $SOURCE =~ http.* ]] || [[ $SOURCE =~ git.* ]]; then
4348
rm -rf $SOURCE_DIR
4449
fi

rocky9.v1/entrypoint.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,12 @@ fi
3838
# Packaging
3939
NODE_OPTIONS=--openssl-legacy-provider FLAGS=$BUILD_OPTS packaging/package.sh -d centos8 $PACKAGE_OPTS
4040

41-
mv $SOURCE_DIR/dist/rpmbuild/RPMS/x86_64/cloudstack-*.rpm $OUTPUT_DIR
41+
if [ -d "$SOURCE_DIR/dist/rpmbuild/RPMS/x86_64/" ]; then
42+
mv $SOURCE_DIR/dist/rpmbuild/RPMS/x86_64/cloudstack-*.rpm $OUTPUT_DIR
43+
elif [ -d "$SOURCE_DIR/dist/rpmbuild/RPMS/noarch/" ]; then
44+
mv $SOURCE_DIR/dist/rpmbuild/RPMS/noarch/cloudstack-*.rpm $OUTPUT_DIR
45+
fi
46+
4247
if [[ $SOURCE =~ http.* ]] || [[ $SOURCE =~ git.* ]]; then
4348
rm -rf $SOURCE_DIR
4449
fi

0 commit comments

Comments
 (0)