Skip to content

Commit

Permalink
Setup ci build and & nightly build (#1390)
Browse files Browse the repository at this point in the history
* Setup ci build and & nightly build

Signed-off-by: Sheng Chen <[email protected]>
  • Loading branch information
jdneo committed Aug 28, 2023
1 parent 89b1101 commit 88fa9c3
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 6 deletions.
16 changes: 14 additions & 2 deletions .azure-pipelines/vscode-gradle-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
inputs:
buildType: specific
project: 'a4d27ce2-a42d-4b71-8eef-78cee9a9728e'
pipeline: 14788
pipeline: 15023
downloadType: specific
extractTars: false
- task: CopyFiles@2
Expand All @@ -94,9 +94,21 @@ jobs:
SourceFolder: '$(System.ArtifactsDirectory)/build-server/server/build/libs'
Contents: '**'
TargetFolder: $(Build.SourcesDirectory)/extension/server
- task: JavaToolInstaller@0
displayName: Install Java 17
inputs:
versionSpec: '17'
jdkArchitectureOption: 'x64'
jdkSourceOption: 'PreInstalled'
- task: Gradle@2
displayName: Build
inputs:
gradleWrapperFile: 'gradlew'
gradleOptions: '-Xmx3072m'
tasks: ':extension:copyJdtlsPluginJar'
- bash: |
cd $(Build.SourcesDirectory)/extension
npx vsce@latest package
npx @vscode/vsce@latest package
displayName: Package VSIX
- task: CopyFiles@2
displayName: Copy VSIX
Expand Down
55 changes: 54 additions & 1 deletion .azure-pipelines/vscode-gradle-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,62 @@ steps:
inputs:
artifact: 'NOTICE.txt'
path: $(Build.SourcesDirectory)/extension
- task: DownloadBuildArtifacts@1
displayName: 'Download Build Server Artifacts'
inputs:
buildType: specific
project: 'a4d27ce2-a42d-4b71-8eef-78cee9a9728e'
pipeline: 15024
downloadType: specific
extractTars: false
- task: CopyFiles@2
displayName: 'Copy Build Server Artifacts'
inputs:
SourceFolder: '$(System.ArtifactsDirectory)/build-server/server/build/libs'
Contents: '**'
TargetFolder: $(Build.SourcesDirectory)/extension/server
- task: JavaToolInstaller@0
displayName: Install Java 17
inputs:
versionSpec: '17'
jdkArchitectureOption: 'x64'
jdkSourceOption: 'PreInstalled'
- task: Gradle@2
displayName: Build
inputs:
gradleWrapperFile: 'gradlew'
gradleOptions: '-Xmx3072m'
tasks: ':extension:copyJdtlsPluginJar'
- task: EsrpCodeSigning@2
displayName: 'ESRP CodeSigning'
inputs:
ConnectedServiceName: 'vscjavaci_codesign'
FolderPath: 'extension/server'
Pattern: 'com.microsoft.gradle.bs.importer-*.jar'
signConfigType: 'inlineSignParams'
inlineOperation: |
[
{
"KeyCode" : "CP-447347-Java",
"OperationCode" : "JavaSign",
"Parameters" : {
"SigAlg" : "SHA256withRSA",
"Timestamp" : "-tsa http://sha256timestamp.ws.digicert.com/sha256/timestamp"
},
"ToolName" : "sign",
"ToolVersion" : "1.0"
},
{
"KeyCode" : "CP-447347-Java",
"OperationCode" : "JavaVerify",
"Parameters" : {},
"ToolName" : "sign",
"ToolVersion" : "1.0"
}
]
- bash: |
cd $(Build.SourcesDirectory)/extension
npx vsce@latest package --pre-release
npx @vscode/vsce@latest package --pre-release
displayName: Package VSIX
- task: CopyFiles@2
displayName: Copy VSIX
Expand Down
2 changes: 1 addition & 1 deletion .azure-pipelines/vscode-gradle-rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ steps:
path: $(Build.SourcesDirectory)/extension
- bash: |
cd $(Build.SourcesDirectory)/extension
npx vsce@latest package
npx @vscode/vsce@latest package
displayName: Package VSIX
- task: CopyFiles@2
displayName: Copy VSIX
Expand Down
2 changes: 2 additions & 0 deletions extension/.vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ scripts
package.insiders.json
jdtls.ext
build-server-for-gradle
#codesign
**/CodeSignSummary-*.md
12 changes: 10 additions & 2 deletions extension/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,11 @@ task prepareForBetaRelease() {

task buildJdtlsPlugin(type: CrossPlatformExec) {
workingDir file('./jdtls.ext')
commandLine 'mvnw', 'clean', 'package'
if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows')) {
commandLine 'mvnw', 'clean', 'package'
} else {
commandLine './mvnw', 'clean', 'package'
}
}

task copyJdtlsPluginJar(type: Copy) {
Expand All @@ -214,7 +218,11 @@ task copyJdtlsPluginJar(type: Copy) {

task buildBuildServer(type: CrossPlatformExec) {
workingDir file('./build-server-for-gradle')
commandLine 'gradlew', 'build', '-x', 'test'
if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows')) {
commandLine 'gradlew', 'build', '-x', 'test'
} else {
commandLine './gradlew', 'build', '-x', 'test'
}
}

task copyBuildServerJars(type: Copy) {
Expand Down

0 comments on commit 88fa9c3

Please sign in to comment.