diff --git a/Test.txt b/Test.txt new file mode 100644 index 000000000..d2cc75597 --- /dev/null +++ b/Test.txt @@ -0,0 +1 @@ +Test12 diff --git a/azure-pipelines-1.yml b/azure-pipelines-1.yml new file mode 100644 index 000000000..7438c7453 --- /dev/null +++ b/azure-pipelines-1.yml @@ -0,0 +1,22 @@ +# Maven +# Build your Java project and run tests with Apache Maven. +# Add steps that analyze code, save build artifacts, deploy, and more: +# https://docs.microsoft.com/azure/devops/pipelines/languages/java + +trigger: +- main + +pool: + vmImage: ubuntu-latest + +steps: +- task: Maven@3 + inputs: + mavenPomFile: 'pom.xml' + mavenOptions: '-Xmx3072m' + javaHomeOption: 'JDKVersion' + jdkVersionOption: '1.8' + jdkArchitectureOption: 'x64' + publishJUnitResults: true + testResultsFiles: '**/surefire-reports/TEST-*.xml' + goals: 'package' diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 000000000..7eb1bbcab --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,55 @@ +trigger: +- main +- release + +pool: + vmImage: 'ubuntu-latest' + +variables: + tagName: 'release' + +jobs: +- job: Build + steps: + - script: echo Building... + displayName: 'Run a one-line script' + + - powershell: | + $personalAccessToken = "$(System.AccessToken)" + $buildId = "$(Build.BuildId)" + $projectId = "$(System.TeamProjectId)" + $organizationUrl = "$(System.CollectionUri)" + + $uri = "$($organizationUrl)$($projectId)/_apis/build/builds/$($buildId)?api-version=6.0" + + $body = @{ + keepforever = $true + } | ConvertTo-Json + + $headers = @{ + Authorization = "Bearer $personalAccessToken" + "Content-Type" = "application/json" + } + + Invoke-RestMethod -Uri $uri -Method Patch -Body $body -Headers $headers + displayName: 'Retain Build' + env: + System.AccessToken: $(System.AccessToken) + + - powershell: | + $personalAccessToken = "$(System.AccessToken)" + $buildId = "$(Build.BuildId)" + $projectId = "$(System.TeamProjectId)" + $organizationUrl = "$(System.CollectionUri)" + + $uri = "$($organizationUrl)$($projectId)/_apis/build/builds/$($buildId)/tags/Test?api-version=7.1-preview.3" + + $headers = @{ + Authorization = "Bearer $personalAccessToken" + "Content-Type" = "application/json" + } + + Invoke-RestMethod -Uri $uri -Method Put -Headers $headers + displayName: 'Add Tags to Build' + env: + System.AccessToken: $(System.AccessToken)