forked from microsoft/onnxruntime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding publishing stage to publish java CUDA 12 pkg to ado (microsoft…
- Loading branch information
Showing
4 changed files
with
125 additions
and
19 deletions.
There are no files selected for viewing
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
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,9 @@ | ||
<!--The only purpose of this file is to let codeql bypass the need for settings.security.xml--> | ||
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 | ||
https://maven.apache.org/xsd/settings-1.0.0.xsd"> | ||
<servers> | ||
<!-- password is coming from cli -PadoAccessToken --> | ||
</servers> | ||
</settings> |
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
56 changes: 56 additions & 0 deletions
56
tools/ci_build/github/azure-pipelines/stages/java-cuda-publishing-stage.yml
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,56 @@ | ||
parameters: | ||
- name: artifact_feed | ||
type: string | ||
|
||
stages: | ||
- stage: JAR_Publishing_GPU | ||
dependsOn: [] | ||
jobs: | ||
- job: JAR_Publishing_GPU | ||
#TD-DO: figure out a way to package nightly jar. Currently Java version are set from VERSION_NUMBER file | ||
condition: ${{ eq(parameters.artifact_feed, 'onnxruntime-cuda-12') }} | ||
workspace: | ||
clean: all | ||
pool: 'onnxruntime-Win-CPU-2022' | ||
variables: | ||
- name: SYSTEM_ACCESSTOKEN | ||
value: $(System.AccessToken) | ||
- name: ADOFeedName | ||
value: ${{ parameters.artifact_feed }} | ||
- name: GDN_CODESIGN_TARGETDIRECTORY | ||
value: '$(Build.BinariesDirectory)/final-package' | ||
- name: artifactName | ||
value: onnxruntime-java-gpu | ||
|
||
steps: | ||
- script: mkdir "$(GDN_CODESIGN_TARGETDIRECTORY)" | ||
|
||
- download: build | ||
displayName: 'Download Pipeline Artifact - $(artifactName)' | ||
artifact: '$(artifactName)' | ||
|
||
- task: CopyFiles@2 | ||
inputs: | ||
SourceFolder: '$(Pipeline.Workspace)/build/$(artifactName)' | ||
Contents: | | ||
onnxruntime_gpu*.jar | ||
onnxruntime_gpu*.pom | ||
TargetFolder: '$(GDN_CODESIGN_TARGETDIRECTORY)' | ||
CleanTargetFolder: true | ||
|
||
- task: PowerShell@2 | ||
displayName: 'Bundle Jar and POM files into a single jar file' | ||
inputs: | ||
targetType: 'inline' | ||
script: | | ||
jar cvf bundle.jar ` | ||
onnxruntime_gpu-*.pom ` | ||
onnxruntime_gpu-*.jar | ||
workingDirectory: '$(GDN_CODESIGN_TARGETDIRECTORY)' | ||
|
||
- task: Gradle@3 | ||
inputs: | ||
gradleWrapperFile: '$(Build.SourcesDirectory)/java/gradlew.bat' | ||
workingDirectory: '$(Build.SourcesDirectory)/java' | ||
tasks: 'publish' | ||
options: '-PadoAccessToken=$(SYSTEM_ACCESSTOKEN) -PadoArtifact=$(GDN_CODESIGN_TARGETDIRECTORY)/bundle.jar' |