Skip to content

Commit

Permalink
initial 1ES migration
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmrdavid authored Jun 20, 2024
1 parent ea34c5c commit e6ff587
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 6 deletions.
7 changes: 4 additions & 3 deletions azurefunctions/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,10 @@ publishing {
}
}

signing {
sign publishing.publications.mavenJava
}
// TODO: manual signing temporarily disabled, in favor of 1ES signing utils
//signing {
// sign publishing.publications.mavenJava
//}

java {
withSourcesJar()
Expand Down
7 changes: 4 additions & 3 deletions client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,10 @@ publishing {
}
}

signing {
sign publishing.publications.mavenJava
}
// TODO: manual signing temporarily disabled, in favor of 1ES signing
//signing {
// sign publishing.publications.mavenJava
//}

java {
withSourcesJar()
Expand Down
36 changes: 36 additions & 0 deletions eng/ci/official-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
variables:
- template: ci/variables/cfs.yml@eng

trigger:
batch: true
branches:
include:
- main

# CI only, does not trigger on PRs.
pr: none

resources:
repositories:
- repository: 1es
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
- repository: eng
type: git
name: engineering
ref: refs/tags/release

extends:
template: v1/1ES.Official.PipelineTemplate.yml@1es
parameters:
pool:
name: 1es-pool-azfunc
image: 1es-windows-2022
os: windows

stages:
- stage: BuildAndSign
dependsOn: []
jobs:
- template: /eng/templates/build.yml@self
48 changes: 48 additions & 0 deletions eng/templates/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
jobs:
- job: Build

templateContext:
outputs:
- output: pipelineArtifact
path: $(build.artifactStagingDirectory)
artifact: drop
sbomBuildDropPath: $(System.DefaultWorkingDirectory)
sbomPackageName: 'Durable Task / Durable Functions Java SBOM'

steps:
- checkout: self
submodules: true

- task: Gradle@3
inputs:
# Specifies the working directory to run the Gradle build. The task uses the repository root directory if the working directory is not specified.
workingDirectory: ''
# Specifies the gradlew wrapper's location within the repository that will be used for the build.
gradleWrapperFile: 'gradlew'
# Sets the GRADLE_OPTS environment variable, which is used to send command-line arguments to start the JVM. The xmx flag specifies the maximum memory available to the JVM.
gradleOptions: '-Xmx3072m'
javaHomeOption: 'JDKVersion'
jdkVersionOption: 1.11
jdkArchitectureOption: 'x64'
publishJUnitResults: false
tasks: clean assemble
displayName: Assemble durabletask-client and durabletask-azure-functions

# TODO: add 1ES-level signing
- task: Gradle@3
inputs:
workingDirectory: ''
gradleWrapperFile: 'gradlew'
gradleOptions: '-Xmx3072m'
javaHomeOption: 'JDKVersion'
jdkVersionOption: 1.11
jdkArchitectureOption: 'x64'
tasks: publish
displayName: Publish durabletask-client and durabletask-azure-functions

- task: CopyFiles@2
displayName: 'Copy publish file to Artifact Staging Directory'
inputs:
SourceFolder: $(System.DefaultWorkingDirectory)/repo/com/microsoft
Contents: '**/*.*'
TargetFolder: $(Build.ArtifactStagingDirectory)

0 comments on commit e6ff587

Please sign in to comment.