generated from oracle-devrel/repo-template
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1573 from oracle-devrel/files-for-oci-devops-added
files added
- Loading branch information
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
...iners/functions/java-helloworld-AI-with-local-dev-and-oci-functions/files/build_spec.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
version: 0.1 | ||
component: build | ||
timeoutInSeconds: 5000 | ||
shell: bash | ||
env: | ||
exportedVariables: | ||
- buildId | ||
steps: | ||
- type: Command | ||
command: | | ||
buildId=`echo ${OCI_BUILD_RUN_ID} | rev | cut -c 1-6 | rev` | ||
echo "Build ID: $buildId" | ||
- type: Command | ||
command: | | ||
docker build -t ${REGISTRY}/${NAMESPACE}/${IMAGE_NAME} . | ||
docker tag ${REGISTRY}/${NAMESPACE}/${IMAGE_NAME}:latest ${REGISTRY}/${NAMESPACE}/${IMAGE_NAME}:$buildId | ||
outputArtifacts: | ||
- name: image-jvm | ||
type: DOCKER_IMAGE | ||
location: ${REGISTRY}/${NAMESPACE}/${IMAGE_NAME} |
29 changes: 29 additions & 0 deletions
29
...unctions/java-helloworld-AI-with-local-dev-and-oci-functions/files/build_spec_native.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
version: 0.1 | ||
component: build | ||
timeoutInSeconds: 5000 | ||
shell: bash | ||
env: | ||
exportedVariables: | ||
- buildId | ||
steps: | ||
- type: Command | ||
command: | | ||
buildId=`echo ${OCI_BUILD_RUN_ID} | rev | cut -c 1-6 | rev` | ||
echo "Build ID: $buildId" | ||
- type: Command | ||
command: | | ||
# This replaces the default open-jdk | ||
export GRAALVM_VERSION="21" | ||
export JAVA_VERSION="17" | ||
yum -y install graalvm${GRAALVM_VERSION}-ee-${JAVA_VERSION}-jdk; | ||
export JAVA_HOME=/usr/lib64/graalvm/graalvm${GRAALVM_VERSION}-ee-java${JAVA_VERSION}; | ||
java -version | ||
mvn clean install | ||
docker build -f Dockerfile.native -t ${REGISTRY}/${NAMESPACE}/${IMAGE_NAME} . | ||
docker tag ${REGISTRY}/${NAMESPACE}/${IMAGE_NAME}:latest ${REGISTRY}/${NAMESPACE}/${IMAGE_NAME}:$buildId | ||
outputArtifacts: | ||
- name: image-native | ||
type: DOCKER_IMAGE | ||
location: ${REGISTRY}/${NAMESPACE}/${IMAGE_NAME} |