Skip to content

Commit a3d1810

Browse files
authored
Merge pull request #1573 from oracle-devrel/files-for-oci-devops-added
files added
2 parents a57a0e2 + 93bf63f commit a3d1810

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: 0.1
2+
component: build
3+
timeoutInSeconds: 5000
4+
shell: bash
5+
env:
6+
exportedVariables:
7+
- buildId
8+
steps:
9+
- type: Command
10+
command: |
11+
buildId=`echo ${OCI_BUILD_RUN_ID} | rev | cut -c 1-6 | rev`
12+
echo "Build ID: $buildId"
13+
- type: Command
14+
command: |
15+
docker build -t ${REGISTRY}/${NAMESPACE}/${IMAGE_NAME} .
16+
docker tag ${REGISTRY}/${NAMESPACE}/${IMAGE_NAME}:latest ${REGISTRY}/${NAMESPACE}/${IMAGE_NAME}:$buildId
17+
outputArtifacts:
18+
- name: image-jvm
19+
type: DOCKER_IMAGE
20+
location: ${REGISTRY}/${NAMESPACE}/${IMAGE_NAME}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
version: 0.1
2+
component: build
3+
timeoutInSeconds: 5000
4+
shell: bash
5+
env:
6+
exportedVariables:
7+
- buildId
8+
steps:
9+
- type: Command
10+
command: |
11+
buildId=`echo ${OCI_BUILD_RUN_ID} | rev | cut -c 1-6 | rev`
12+
echo "Build ID: $buildId"
13+
- type: Command
14+
command: |
15+
# This replaces the default open-jdk
16+
export GRAALVM_VERSION="21"
17+
export JAVA_VERSION="17"
18+
yum -y install graalvm${GRAALVM_VERSION}-ee-${JAVA_VERSION}-jdk;
19+
export JAVA_HOME=/usr/lib64/graalvm/graalvm${GRAALVM_VERSION}-ee-java${JAVA_VERSION};
20+
java -version
21+
22+
mvn clean install
23+
24+
docker build -f Dockerfile.native -t ${REGISTRY}/${NAMESPACE}/${IMAGE_NAME} .
25+
docker tag ${REGISTRY}/${NAMESPACE}/${IMAGE_NAME}:latest ${REGISTRY}/${NAMESPACE}/${IMAGE_NAME}:$buildId
26+
outputArtifacts:
27+
- name: image-native
28+
type: DOCKER_IMAGE
29+
location: ${REGISTRY}/${NAMESPACE}/${IMAGE_NAME}

0 commit comments

Comments
 (0)