File tree Expand file tree Collapse file tree 2 files changed +49
-0
lines changed
app-dev/devops-and-containers/functions/java-helloworld-AI-with-local-dev-and-oci-functions/files Expand file tree Collapse file tree 2 files changed +49
-0
lines changed Original file line number Diff line number Diff line change 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 number Diff line number Diff line change 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}
You can’t perform that action at this time.
0 commit comments