Skip to content

Commit

Permalink
Installation check job file
Browse files Browse the repository at this point in the history
  • Loading branch information
ckairen committed Aug 25, 2021
1 parent 61bb795 commit 0417f54
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 32 deletions.
33 changes: 33 additions & 0 deletions eng/pipelines/templates/jobs/installation.check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
parameters:
- name: Artifact
type: object
default: {}
- name: ArtifactName
type: string
default: "not-specified"

jobs:
- job: InstallationCheck
displayName: "Installation Check"
variables:
- template: ../variables/globals.yml
steps:
- download: current
artifact: ${{parameters.ArtifactName}}-signed
- pwsh: |
Write-Host "Copy-Item $(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed/${{parameters.Artifact.groupId}}/${{parameters.Artifact.name}}/" "$(Pipeline.Workspace)/install-check-dir/${{parameters.Artifact.name}} -Recurse"
Copy-Item "${{parameters.ArtifactName}}-signed/${{parameters.Artifact.groupId}}/${{parameters.Artifact.name}}/" "install-check-dir/${{parameters.Artifact.name}}" -Recurse
Write-Host "$pomf = Get-ChildItem install-check-dir/${{parameters.Artifact.name}}/*.pom"
$pomf = Get-ChildItem install-check-dir/${{parameters.Artifact.name}}/*.pom
Write-Host "Rename-Item $($pomf) pom.xml"
Rename-Item $pomf pom.xml
Copy-Item "$(System.DefaultWorkingDirectory)/eng" "install-check-dir/${{ parameters.Artifact.name }}/eng" -Recurse
workingDirectory: $(Pipeline.Workspace)
displayName: "Copy Artifacts and Directories"
- template: /eng/pipelines/templates/steps/install-reporting-tools.yml
- task: Maven@3
displayName: "Verify Package Installation"
inputs:
mavenPomFile: "$(Pipeline.Workspace)/install-check-dir/${{ parameters.Artifact.name }}/pom.xml"
options: "$(DefaultOptions) -Dcheckstyle.skip=true"
goals: "install"
37 changes: 5 additions & 32 deletions eng/pipelines/templates/stages/archetype-java-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,38 +116,11 @@ stages:
PackageName: ${{artifact.name}}
ServiceName: ${{parameters.ServiceDirectory}}
ForRelease: true
- job: InstallationCheck
displayName: "Installation Check"
variables:
- template: ../variables/globals.yml
steps:
- download: current
artifact: ${{parameters.ArtifactName}}-signed
- pwsh: |
Copy-Item "$(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed/${{artifact.groupId}}/${{artifact.name}}/" "$(Pipeline.Workspace)/install-check-dir/${{artifact.name}}" -Recurse
Write-Host "Copying artifact ${{artifact.name}}"
$pomf = Get-ChildItem $(Pipeline.Workspace)/install-check-dir/${{artifact.name}}/*.pom
Rename-Item "$($pomf)" pom.xml
Write-Host "Renaming $($pomf) to pom.xml"
Copy-Item "$(System.DefaultWorkingDirectory)/eng" "$(Pipeline.Workspace)/install-check-dir/${{ artifact.name }}/eng" -Recurse
displayName: "Copy Artifacts and Directories"
- task: Maven@3
displayName: 'Install reporting tools'
inputs:
mavenPomFile: "$(Pipeline.Workspace)/install-check-dir/${{ artifact.name }}/eng/code-quality-reports/pom.xml"
options: "$(DefaultOptions)"
mavenOptions: "$(MemoryOptions) $(LoggingOptions)"
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.11'
jdkArchitectureOption: 'x64'
publishJUnitResults: false
goals: 'install'
- task: Maven@3
displayName: "Maven Install"
inputs:
mavenPomFile: "$(Pipeline.Workspace)/install-check-dir/${{ artifact.name }}/pom.xml"
options: "$(DefaultOptions) -Dcheckstyle.skip=true"
goals: "install"

- template: /eng/pipelines/templates/jobs/installation.check.yml
parameters:
Artifact: ${{ artifact }}
ArtifactName: ${{ parameters.ArtifactName }}

- deployment: TagRepository
displayName: "Create release tag"
Expand Down

0 comments on commit 0417f54

Please sign in to comment.