Skip to content

Commit

Permalink
Merge pull request #1573 from oracle-devrel/files-for-oci-devops-added
Browse files Browse the repository at this point in the history
files added
  • Loading branch information
martatolosa authored Feb 11, 2025
2 parents a57a0e2 + 93bf63f commit a3d1810
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
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}
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}

0 comments on commit a3d1810

Please sign in to comment.