diff --git a/Actions/CheckForUpdates/CheckForUpdates.ps1 b/Actions/CheckForUpdates/CheckForUpdates.ps1
index 54a2dc477..406b837e3 100644
--- a/Actions/CheckForUpdates/CheckForUpdates.ps1
+++ b/Actions/CheckForUpdates/CheckForUpdates.ps1
@@ -378,7 +378,10 @@ try {
# Set current location to the repository folder
Set-Location -Path *
-
+
+ # checkout branch to update
+ invoke-git checkout $updateBranch
+
# If $directCommit, then changes are made directly to the default branch
if (!$directcommit) {
# If not direct commit, create a new branch with a random name, and switch to it
diff --git a/Actions/CreateReleaseNotes/CreateReleaseNotes.ps1 b/Actions/CreateReleaseNotes/CreateReleaseNotes.ps1
index 6088e060d..a09098c10 100644
--- a/Actions/CreateReleaseNotes/CreateReleaseNotes.ps1
+++ b/Actions/CreateReleaseNotes/CreateReleaseNotes.ps1
@@ -25,13 +25,28 @@ try {
import-module (Join-Path -path $PSScriptRoot -ChildPath "..\TelemetryHelper.psm1" -Resolve)
$telemetryScope = CreateScope -eventId 'DO0074' -parentTelemetryScopeJson $parentTelemetryScopeJson
- $releaseNotes = ""
-
Import-Module (Join-Path $PSScriptRoot '..\Github-Helper.psm1' -Resolve)
- SemVerStrToSemVerObj -semVerStr $tag_name | Out-Null
+ # Check that tag is SemVer
+ $SemVerObj = SemVerStrToSemVerObj -semVerStr $tag_name
+
+ # Calculate release branch
+ $releaseBranch = "release/$($SemVerObj.Prefix)$($SemVerObj.Major).$($SemVerObj.Minor)"
+ if ($SemVerObj.Patch -or $SemVerObj.addt0 -ne 'zzz') {
+ $releaseBranch += ".$($SemVerObj.Patch)"
+ if ($SemVerObj.addt0 -ne 'zzz') {
+ $releaseBranch += "-$($SemVerObj.addt0)"
+ 1..4 | ForEach-Object {
+ if ($SemVerObj."addt$($_)" -ne 'zzz') {
+ $releaseBranch += ".$($SemVerObj."addt$($_)")"
+ }
+ }
+ }
+ }
+ Add-Content -Path $env:GITHUB_OUTPUT -Value "releaseBranch=$releaseBranch"
+ Write-Host "releaseBranch=$releaseBranch"
- $latestRelease = GetLatestRelease -token $token -api_url $ENV:GITHUB_API_URL -repository $ENV:GITHUB_REPOSITORY
+ $latestRelease = GetLatestRelease -token $token -api_url $ENV:GITHUB_API_URL -repository $ENV:GITHUB_REPOSITORY -ref $ENV:GITHUB_REF_NAME
$latestReleaseTag = ""
if ($latestRelease -and ([bool]($latestRelease.PSobject.Properties.name -match "tag_name"))){
diff --git a/Actions/CreateReleaseNotes/action.yaml b/Actions/CreateReleaseNotes/action.yaml
index b9627c401..7dcdf73d6 100644
--- a/Actions/CreateReleaseNotes/action.yaml
+++ b/Actions/CreateReleaseNotes/action.yaml
@@ -28,6 +28,9 @@ inputs:
description: Tag name
required: true
outputs:
+ ReleaseBranch:
+ description: Name of the release branch
+ value: ${{ steps.createreleasenotes.outputs.ReleaseBranch }}
ReleaseNotes:
description: Release note generated based on the changes
value: ${{ steps.createreleasenotes.outputs.ReleaseNotes }}
diff --git a/Actions/Github-Helper.psm1 b/Actions/Github-Helper.psm1
index 7c16b9730..9fb75185d 100644
--- a/Actions/Github-Helper.psm1
+++ b/Actions/Github-Helper.psm1
@@ -304,11 +304,26 @@ function invoke-git {
cmdDo -command git -arguments $arguments -silent:$silent -returnValue:$returnValue -inputStr $inputStr
}
+# Convert a semantic version object to a semantic version string
+#
+# The SemVer object has the following properties:
+# Prefix: 'v' or ''
+# Major: the major version number
+# Minor: the minor version number
+# Patch: the patch version number
+# Addt0: the first additional segment (zzz means not specified)
+# Addt1: the second additional segment (zzz means not specified)
+# Addt2: the third additional segment (zzz means not specified)
+# Addt3: the fourth additional segment (zzz means not specified)
+# Addt4: the fifth additional segment (zzz means not specified)
+#
+# Returns the SemVer string
+# # [v]major.minor.patch[-addt0[.addt1[.addt2[.addt3[.addt4]]]]]
function SemVerObjToSemVerStr {
Param(
+ [Parameter(Mandatory = $true, ValueFromPipeline = $true)]
$semVerObj
)
-
try {
$str = "$($semVerObj.Prefix)$($semVerObj.Major).$($semVerObj.Minor).$($semVerObj.Patch)"
for ($i=0; $i -lt 5; $i++) {
@@ -323,34 +338,80 @@ function SemVerObjToSemVerStr {
}
}
+# Convert a semantic version string to a semantic version object
+# SemVer strings supported are defined under https://semver.org, additionally allowing a leading 'v' (as supported by GitHub semver sorting)
+#
+# The string has the following format:
+# if allowMajorMinorOnly is specified:
+# [v]major.minor.[patch[-addt0[.addt1[.addt2[.addt3[.addt4]]]]]]
+# else
+# [v]major.minor.patch[-addt0[.addt1[.addt2[.addt3[.addt4]]]]]
+#
+# Returns the SemVer object. The SemVer object has the following properties:
+# Prefix: 'v' or ''
+# Major: the major version number
+# Minor: the minor version number
+# Patch: the patch version number
+# Addt0: the first additional segment (zzz means not specified)
+# Addt1: the second additional segment (zzz means not specified)
+# Addt2: the third additional segment (zzz means not specified)
+# Addt3: the fourth additional segment (zzz means not specified)
+# Addt4: the fifth additional segment (zzz means not specified)
+
function SemVerStrToSemVerObj {
Param(
- [string] $semVerStr
+ [Parameter(Mandatory = $true, ValueFromPipeline = $true)]
+ [string] $semVerStr,
+ [switch] $allowMajorMinorOnly
)
$obj = New-Object PSCustomObject
try {
+ # Only allowed prefix is a 'v'.
+ # This is supported by GitHub when sorting tags
$prefix = ''
$verstr = $semVerStr
if ($semVerStr -like 'v*') {
$prefix = 'v'
$verStr = $semVerStr.Substring(1)
}
+ # Next part is a version number with 2 or 3 segments
+ # 2 segments are allowed only if $allowMajorMinorOnly is specified
$version = [System.Version]"$($verStr.split('-')[0])"
if ($version.Revision -ne -1) { throw "not semver" }
+ if ($version.Build -eq -1) {
+ if ($allowMajorMinorOnly) {
+ $version = [System.Version]"$($version.Major).$($version.Minor).0"
+ $idx = $semVerStr.IndexOf('-')
+ if ($idx -eq -1) {
+ $semVerStr = "$semVerStr.0"
+ }
+ else {
+ $semVerstr = $semVerstr.insert($idx, '.0')
+ }
+ }
+ else {
+ throw "not semver"
+ }
+ }
+ # Add properties to the object
$obj | Add-Member -MemberType NoteProperty -Name "Prefix" -Value $prefix
$obj | Add-Member -MemberType NoteProperty -Name "Major" -Value ([int]$version.Major)
$obj | Add-Member -MemberType NoteProperty -Name "Minor" -Value ([int]$version.Minor)
$obj | Add-Member -MemberType NoteProperty -Name "Patch" -Value ([int]$version.Build)
0..4 | ForEach-Object {
+ # default segments to 'zzz' for sorting of SemVer Objects to work as GitHub does
$obj | Add-Member -MemberType NoteProperty -Name "Addt$_" -Value 'zzz'
}
$idx = $verStr.IndexOf('-')
if ($idx -gt 0) {
$segments = $verStr.SubString($idx+1).Split('.')
- if ($segments.Count -ge 5) {
+ if ($segments.Count -gt 5) {
throw "max. 5 segments"
}
+ # Add all 5 segments to the object
+ # If the segment is a number, it is converted to an integer
+ # If the segment is a string, it cannot be -ge 'zzz' (would be sorted wrongly)
0..($segments.Count-1) | ForEach-Object {
$result = 0
if ([int]::TryParse($segments[$_], [ref] $result)) {
@@ -364,6 +425,7 @@ function SemVerStrToSemVerObj {
}
}
}
+ # Check that the object can be converted back to the original string
$newStr = SemVerObjToSemVerStr -semVerObj $obj
if ($newStr -cne $semVerStr) {
throw "Not equal"
@@ -397,8 +459,7 @@ function GetReleases {
$sortedReleases
}
catch {
- Write-Host -ForegroundColor red "Some of the release tags cannot be recognized as a semantic version string (https://semver.org)"
- Write-Host -ForegroundColor red "Using default GitHub sorting for releases"
+ Write-Host "::Warning::Some of the release tags cannot be recognized as a semantic version string (https://semver.org). Using default GitHub sorting for releases, which will not work for release branches"
$releases
}
}
@@ -407,6 +468,35 @@ function GetReleases {
}
}
+function GetLatestRelease {
+ Param(
+ [string] $token,
+ [string] $api_url = $ENV:GITHUB_API_URL,
+ [string] $repository = $ENV:GITHUB_REPOSITORY,
+ [string] $ref = $ENV:GITHUB_REFNAME
+ )
+
+ Write-Host "Getting the latest release from $api_url/repos/$repository/releases/latest - branch $ref"
+ # Get all releases from GitHub, sorted by SemVer tag
+ # If any release tag is not a valid SemVer tag, use default GitHub sorting and issue a warning
+ # Default github sorting will return the latest historically created release as the latest release - not the highest version
+ $releases = GetReleases -token $token -api_url $api_url -repository $repository
+
+ # Get Latest release
+ $latestRelease = $releases | Where-Object { -not ($_.prerelease -or $_.draft) } | Select-Object -First 1
+ $releaseBranchPrefix = 'release/'
+ if ($ref -like "$releaseBranchPrefix*") {
+ # If release branch, get the latest release from that the release branch
+ # This is given by the latest release with the same major.minor as the release branch
+ $semVerObj = SemVerStrToSemVerObj -semVerStr $ref.SubString($releaseBranchPrefix.Length) -allowMajorMinorOnly
+ $latestRelease = $releases | Where-Object {
+ $releaseSemVerObj = SemVerStrToSemVerObj -semVerStr $_.tag_name
+ $semVerObj.Major -eq $releaseSemVerObj.Major -and $semVerObj.Minor -eq $releaseSemVerObj.Minor
+ } | Select-Object -First 1
+ }
+ $latestRelease
+}
+
function GetHeader {
param (
[string] $token,
@@ -442,22 +532,6 @@ function GetReleaseNotes {
InvokeWebRequest -Headers (GetHeader -token $token) -Method POST -Body ($postParams | ConvertTo-Json) -Uri "$api_url/repos/$repository/releases/generate-notes"
}
-function GetLatestRelease {
- Param(
- [string] $token,
- [string] $api_url = $ENV:GITHUB_API_URL,
- [string] $repository = $ENV:GITHUB_REPOSITORY
- )
-
- Write-Host "Getting the latest release from $api_url/repos/$repository/releases/latest"
- try {
- InvokeWebRequest -Headers (GetHeader -token $token) -Uri "$api_url/repos/$repository/releases/latest" -ignoreErrors | ConvertFrom-Json
- }
- catch {
- return $null
- }
-}
-
function DownloadRelease {
Param(
[string] $token,
diff --git a/Actions/RunPipeline/RunPipeline.ps1 b/Actions/RunPipeline/RunPipeline.ps1
index ca532479a..c246b1954 100644
--- a/Actions/RunPipeline/RunPipeline.ps1
+++ b/Actions/RunPipeline/RunPipeline.ps1
@@ -175,16 +175,9 @@ try {
else {
Write-Host "::group::Locating previous release"
try {
- $releasesJson = GetReleases -token $token -api_url $ENV:GITHUB_API_URL -repository $ENV:GITHUB_REPOSITORY
- if ($env:GITHUB_REF_NAME -like 'release/*') {
- # For CI/CD in a release branch use that release as previous build
- $latestRelease = $releasesJson | Where-Object { $_.tag_name -eq "$env:GITHUB_REF_NAME".SubString(8) } | Select-Object -First 1
- }
- else {
- $latestRelease = $releasesJson | Where-Object { -not ($_.prerelease -or $_.draft) } | Select-Object -First 1
- }
+ $latestRelease = GetLatestRelease -token $token -api_url $ENV:GITHUB_API_URL -repository $ENV:GITHUB_REPOSITORY -ref $ENV:GITHUB_REF_NAME
if ($latestRelease) {
- Write-Host "Using $($latestRelease.name) as previous release"
+ Write-Host "Using $($latestRelease.name) (tag $($latestRelease.tag_name)) as previous release"
$artifactsFolder = Join-Path $baseFolder "artifacts"
New-Item $artifactsFolder -ItemType Directory | Out-Null
DownloadRelease -token $token -projects $project -api_url $ENV:GITHUB_API_URL -repository $ENV:GITHUB_REPOSITORY -release $latestRelease -path $artifactsFolder -mask "Apps"
diff --git a/RELEASENOTES.md b/RELEASENOTES.md
index 7fc755267..3b0a59675 100644
--- a/RELEASENOTES.md
+++ b/RELEASENOTES.md
@@ -3,10 +3,28 @@
Note that when using the preview version of AL-Go for GitHub, you need to Update your AL-Go system files, as soon as possible when told to do so.
### Issues
-- Issue #171 create a workspace file when creating a project
-- Issue #356 Publish to AppSource fails in multi project repo
-- Issue #358 Publish To Environment Action stopped working in v2.3
-- Issue #362 Support for EnableTaskScheduler
+- Issue [#171](https://github.com/microsoft/AL-Go/issues/171) create a workspace file when creating a project
+- Issue [#356](https://github.com/microsoft/AL-Go/issues/356) Publish to AppSource fails in multi project repo
+- Issue [#358](https://github.com/microsoft/AL-Go/issues/358) Publish To Environment Action stopped working in v2.3
+- Issue [#362](https://github.com/microsoft/AL-Go/issues/362) Support for EnableTaskScheduler
+- Issue [#360](https://github.com/microsoft/AL-Go/issues/360) Creating a release and deploying from a release branch
+- Issue [#371](https://github.com/microsoft/AL-Go/issues/371) 'No previous release found' for builds on release branches
+- Issue [#376](https://github.com/microsoft/AL-Go/issues/376) CICD jobs that are triggered by the pull request trigger run directly to an error if title contains quotes
+
+### Release Branches
+**NOTE:** Release Branches are now only named after major.minor if the patch value is 0 in the release tag (which must be semver compatible)
+
+This version contains a number of bug fixes to release branches, to ensure that the recommended branching strategy is fully supported. Bugs fixed includes:
+- Release branches was named after the full tag (1.0.0), even though subsequent hotfixes released from this branch would be 1.0.x
+- Release branches named 1.0 wasn't picked up as a release branch
+- Release notes contained the wrong changelog
+- The previous release was always set to be the first release from a release branch
+- SemVerStr could not have 5 segments after the dash
+- Release was created on the right SHA, but the release branch was created on the wrong SHA
+
+Recommended branching strategy:
+
+![Branching Strategy](Scenarios/images/branchingstrategy.png)
### New Settings
New Project setting: EnableTaskScheduler in container executing tests and when setting up local development environment
diff --git a/Scenarios/images/branchingstrategy.png b/Scenarios/images/branchingstrategy.png
new file mode 100644
index 000000000..4f5d8a644
Binary files /dev/null and b/Scenarios/images/branchingstrategy.png differ
diff --git a/Scenarios/settings.md b/Scenarios/settings.md
index 72557de15..9428ef52a 100644
--- a/Scenarios/settings.md
+++ b/Scenarios/settings.md
@@ -46,12 +46,16 @@ The repository settings are only read from the repository settings file (.github
| nextMajorSchedule | CRON schedule for when NextMajor workflow should run. Default is no scheduled run, only manual trigger. Build your CRON string here: [https://crontab.guru](https://crontab.guru) |
| nextMinorSchedule | CRON schedule for when NextMinor workflow should run. Default is no scheduled run, only manual trigger. Build your CRON string here: [https://crontab.guru](https://crontab.guru) |
| currentSchedule | CRON schedule for when Current workflow should run. Default is no scheduled run, only manual trigger. Build your CRON string here: [https://crontab.guru](https://crontab.guru) |
-| runs-on | Specifies which github runner will be used for all jobs in all workflows (except the Update AL-Go System Files workflow). The default is to use the GitHub hosted runner _windows-latest_. You can specify a special GitHub Runner for the build job using the GitHubRunner setting. Read [this](SelfHostedGitHubRunner.md) for more information.
Setting runs-on to _ubuntu-latest_ will run all non-build jobs on Linux, build jobs will still run _windows-latest_ (or whatever you have set in **githubRunner**)
-| shell | Specifies which shell will be used as the default in all jobs. **powershell** is the default, which results in using _PowerShell 5.1_ (unless you selected _ubuntu-latest_, then **pwsh** is used, which results in using _PowerShell 7_)
-| githubRunner | Specifies which github runner will be used for the build jobs in workflows including a build job. This is the most time consuming task. By default this job uses the _Windows-latest_ github runner (unless overridden by the runs-on setting). This settings takes precedence over runs-on so that you can use different runners for the build job and the housekeeping jobs. See **runs-on** setting.
-| githubRunnerShell | Specifies which shell is used for build jobs in workflows including a build job. The default is to use the same as defined in **shell**. If the shell setting isn't defined, **powershell** is the default, which results in using _PowerShell 5.1_. Use **pwsh** for _PowerShell 7_.
-| useProjectDependencies | Determines whether your projects are built using a multi-stage built workflow or single stage. After setting useProjectDependencies to true, you need to run Update AL-Go System Files and your workflows including a build job will change to have multiple build jobs, depending on each other. The number of build jobs will be determined by the dependency depth in your projects.
You can change dependencies between your projects, but if the dependency **depth** changes, AL-Go will warn you that updates for your AL-Go System Files are available and you will need to run the workflow.
-| buildModes | A list of build modes to use when building the AL-Go projects. Every AL-Go projects will be built using each built mode. Available build modes are:
**Default**: Apps are compiled as they are in the source code.
**Clean**: _PreprocessorSymbols_ are enabled when compiling the apps. The values for the symbols correspond to the `cleanModePreprocessorSymbols` setting of the AL-Go project.
**Translated**: `TranslationFile` compiler feature is enabled when compiling the apps.
+| runs-on | Specifies which github runner will be used for all jobs in all workflows (except the Update AL-Go System Files workflow). The default is to use the GitHub hosted runner _windows-latest_. You can specify a special GitHub Runner for the build job using the GitHubRunner setting. Read [this](SelfHostedGitHubRunner.md) for more information.
Setting runs-on to _ubuntu-latest_ will run all non-build jobs on Linux, build jobs will still run _windows-latest_ (or whatever you have set in **githubRunner**) |
+| shell | Specifies which shell will be used as the default in all jobs. **powershell** is the default, which results in using _PowerShell 5.1_ (unless you selected _ubuntu-latest_, then **pwsh** is used, which results in using _PowerShell 7_) |
+| githubRunner | Specifies which github runner will be used for the build jobs in workflows including a build job. This is the most time consuming task. By default this job uses the _Windows-latest_ github runner (unless overridden by the runs-on setting). This settings takes precedence over runs-on so that you can use different runners for the build job and the housekeeping jobs. See **runs-on** setting. |
+| githubRunnerShell | Specifies which shell is used for build jobs in workflows including a build job. The default is to use the same as defined in **shell**. If the shell setting isn't defined, **powershell** is the default, which results in using _PowerShell 5.1_. Use **pwsh** for _PowerShell 7_. |
+| useProjectDependencies | Determines whether your projects are built using a multi-stage built workflow or single stage. After setting useProjectDependencies to true, you need to run Update AL-Go System Files and your workflows including a build job will change to have multiple build jobs, depending on each other. The number of build jobs will be determined by the dependency depth in your projects.
You can change dependencies between your projects, but if the dependency **depth** changes, AL-Go will warn you that updates for your AL-Go System Files are available and you will need to run the workflow. |
+| CICDPushBranches | CICDPushBranches can be specified as an array of branches, which triggers a CI/CD workflow on commit.
Default is [ "main", "release/\*", "feature/\*" ] |
+| CICDPullRequestBranches | CICDPullRequestBranches can be specified as an array of branches, which triggers a CI/CD workflow on a PR.
Default is [ "main" ] |
+| CICDSchedule | CRON schedule for when CI/CD workflow should run. Default is no scheduled run, only manually triggered or triggered by Push or Pull Request. Build your CRON string here: [https://crontab.guru](https://crontab.guru) |
+| UpdateGitHubGoSystemFilesSchedule | CRON schedule for when Update AL-Go System Files should run. When Update AL-Go System Files runs on a schedule, it uses direct COMMIT instead of creating a PR. Default is no scheduled run, only manual trigger. Build your CRON string here: [https://crontab.guru](https://crontab.guru) |
+| buildModes | A list of build modes to use when building the AL-Go projects. Every AL-Go projects will be built using each built mode. Available build modes are:
**Default**: Apps are compiled as they are in the source code.
**Clean**: _PreprocessorSymbols_ are enabled when compiling the apps. The values for the symbols correspond to the `cleanModePreprocessorSymbols` setting of the AL-Go project.
**Translated**: `TranslationFile` compiler feature is enabled when compiling the apps. |
## Advanced settings
diff --git a/Templates/AppSource App/.github/workflows/CICD.yaml b/Templates/AppSource App/.github/workflows/CICD.yaml
index 0a3e9a4e1..8275b389c 100644
--- a/Templates/AppSource App/.github/workflows/CICD.yaml
+++ b/Templates/AppSource App/.github/workflows/CICD.yaml
@@ -13,7 +13,7 @@ on:
- '!.github/workflows/CICD.yaml'
branches: [ 'main', 'release/*', 'feature/*' ]
-run-name: ${{ fromJson(format('["","Check pull request from {1}/{2}{0} {3}"]',':',github.event.workflow_run.head_repository.owner.login,github.event.workflow_run.head_branch,github.event.workflow_run.display_title))[github.event_name == 'workflow_run'] }}
+run-name: ${{ github.event_name != 'workflow_run' && 'CI/CD' || format('Check pull request from {1}/{2}{0} {3}',':',github.event.workflow_run.head_repository.owner.login,github.event.workflow_run.head_branch,github.event.workflow_run.display_title) }}
permissions:
contents: read
diff --git a/Templates/AppSource App/.github/workflows/CreateRelease.yaml b/Templates/AppSource App/.github/workflows/CreateRelease.yaml
index f75694f80..bbb244516 100644
--- a/Templates/AppSource App/.github/workflows/CreateRelease.yaml
+++ b/Templates/AppSource App/.github/workflows/CreateRelease.yaml
@@ -58,6 +58,8 @@ jobs:
telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }}
artifacts: ${{ steps.analyzeartifacts.outputs.artifacts }}
releaseId: ${{ steps.createrelease.outputs.releaseId }}
+ commitish: ${{ steps.analyzeartifacts.outputs.commitish }}
+ releaseBranch: ${{ steps.createreleasenotes.outputs.releaseBranch }}
steps:
- name: Checkout
uses: actions/checkout@v3
@@ -135,7 +137,6 @@ jobs:
Write-Host "::Error::No artifacts found for this project"
exit 1
}
- $artifact | out-host
if ($sha) {
if ($artifact.workflow_run.head_sha -ne $sha) {
Write-Host "::Error::The build selected for release doesn't contain all projects. Please rebuild all projects by manually running the CI/CD workflow and recreate the release."
@@ -188,6 +189,7 @@ jobs:
body: bodyMD.replaceAll('\\n','\n'),
draft: ${{ github.event.inputs.draft=='Y' }},
prerelease: ${{ github.event.inputs.prerelease=='Y' }},
+ make_latest: 'legacy',
target_commitish: '${{ steps.analyzeartifacts.outputs.commitish }}'
});
const {
@@ -308,16 +310,18 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
+ with:
+ ref: '${{ needs.createRelease.outputs.commitish }}'
- name: Create Release Branch
run: |
$ErrorActionPreference = "STOP"
Set-StrictMode -version 2.0
- git checkout -b release/${{ github.event.inputs.tag }}
+ git checkout -b ${{ needs.CreateRelease.outputs.releaseBranch }}
git config user.name ${{ github.actor}}
git config user.email ${{ github.actor}}@users.noreply.github.com
- git commit --allow-empty -m "Release branch ${{ github.event.inputs.tag }}"
- git push origin release/${{ github.event.inputs.tag }}
+ git commit --allow-empty -m "Release branch ${{ needs.CreateRelease.outputs.releaseBranch }}"
+ git push origin ${{ needs.CreateRelease.outputs.releaseBranch }}
UpdateVersionNumber:
if: ${{ github.event.inputs.updateVersionNumber!='' }}
diff --git a/Templates/Per Tenant Extension/.github/workflows/CICD.yaml b/Templates/Per Tenant Extension/.github/workflows/CICD.yaml
index 0a3e9a4e1..8275b389c 100644
--- a/Templates/Per Tenant Extension/.github/workflows/CICD.yaml
+++ b/Templates/Per Tenant Extension/.github/workflows/CICD.yaml
@@ -13,7 +13,7 @@ on:
- '!.github/workflows/CICD.yaml'
branches: [ 'main', 'release/*', 'feature/*' ]
-run-name: ${{ fromJson(format('["","Check pull request from {1}/{2}{0} {3}"]',':',github.event.workflow_run.head_repository.owner.login,github.event.workflow_run.head_branch,github.event.workflow_run.display_title))[github.event_name == 'workflow_run'] }}
+run-name: ${{ github.event_name != 'workflow_run' && 'CI/CD' || format('Check pull request from {1}/{2}{0} {3}',':',github.event.workflow_run.head_repository.owner.login,github.event.workflow_run.head_branch,github.event.workflow_run.display_title) }}
permissions:
contents: read
diff --git a/Templates/Per Tenant Extension/.github/workflows/CreateRelease.yaml b/Templates/Per Tenant Extension/.github/workflows/CreateRelease.yaml
index f75694f80..bbb244516 100644
--- a/Templates/Per Tenant Extension/.github/workflows/CreateRelease.yaml
+++ b/Templates/Per Tenant Extension/.github/workflows/CreateRelease.yaml
@@ -58,6 +58,8 @@ jobs:
telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }}
artifacts: ${{ steps.analyzeartifacts.outputs.artifacts }}
releaseId: ${{ steps.createrelease.outputs.releaseId }}
+ commitish: ${{ steps.analyzeartifacts.outputs.commitish }}
+ releaseBranch: ${{ steps.createreleasenotes.outputs.releaseBranch }}
steps:
- name: Checkout
uses: actions/checkout@v3
@@ -135,7 +137,6 @@ jobs:
Write-Host "::Error::No artifacts found for this project"
exit 1
}
- $artifact | out-host
if ($sha) {
if ($artifact.workflow_run.head_sha -ne $sha) {
Write-Host "::Error::The build selected for release doesn't contain all projects. Please rebuild all projects by manually running the CI/CD workflow and recreate the release."
@@ -188,6 +189,7 @@ jobs:
body: bodyMD.replaceAll('\\n','\n'),
draft: ${{ github.event.inputs.draft=='Y' }},
prerelease: ${{ github.event.inputs.prerelease=='Y' }},
+ make_latest: 'legacy',
target_commitish: '${{ steps.analyzeartifacts.outputs.commitish }}'
});
const {
@@ -308,16 +310,18 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
+ with:
+ ref: '${{ needs.createRelease.outputs.commitish }}'
- name: Create Release Branch
run: |
$ErrorActionPreference = "STOP"
Set-StrictMode -version 2.0
- git checkout -b release/${{ github.event.inputs.tag }}
+ git checkout -b ${{ needs.CreateRelease.outputs.releaseBranch }}
git config user.name ${{ github.actor}}
git config user.email ${{ github.actor}}@users.noreply.github.com
- git commit --allow-empty -m "Release branch ${{ github.event.inputs.tag }}"
- git push origin release/${{ github.event.inputs.tag }}
+ git commit --allow-empty -m "Release branch ${{ needs.CreateRelease.outputs.releaseBranch }}"
+ git push origin ${{ needs.CreateRelease.outputs.releaseBranch }}
UpdateVersionNumber:
if: ${{ github.event.inputs.updateVersionNumber!='' }}
diff --git a/Tests/AL-Go-Helper.Test.ps1 b/Tests/AL-Go-Helper.Test.ps1
index aeb001c1e..f33a4b908 100644
--- a/Tests/AL-Go-Helper.Test.ps1
+++ b/Tests/AL-Go-Helper.Test.ps1
@@ -1,4 +1,4 @@
-Describe "RunPipeline Action Tests" {
+Describe "AL-Go-Helper tests" {
BeforeAll {
. (Join-Path $PSScriptRoot '../Actions/AL-Go-Helper.ps1')
}
diff --git a/Tests/CreateReleaseNotes.Test.ps1 b/Tests/CreateReleaseNotes.Test.ps1
index 6a2de3305..039912643 100644
--- a/Tests/CreateReleaseNotes.Test.ps1
+++ b/Tests/CreateReleaseNotes.Test.ps1
@@ -29,6 +29,7 @@ Describe 'CreateReleaseNotes Tests' {
"pull-requests" = "write"
}
$outputs = [ordered]@{
+ "ReleaseBranch" = "Name of the release branch"
"ReleaseNotes" = "Release note generated based on the changes"
}
YamlTest -scriptRoot $scriptRoot -actionName $actionName -actionScript $actionScript -permissions $permissions -outputs $outputs
diff --git a/Tests/GitHub-Helper.Test.ps1 b/Tests/GitHub-Helper.Test.ps1
new file mode 100644
index 000000000..322832e69
--- /dev/null
+++ b/Tests/GitHub-Helper.Test.ps1
@@ -0,0 +1,26 @@
+Describe "GitHub-Helper Tests" {
+ BeforeAll {
+ . (Join-Path $PSScriptRoot '../Actions/AL-Go-Helper.ps1')
+ }
+
+ It 'SemVerStrToSemVerObj/SemVerObjToSemVerStr' {
+ { SemVerStrToSemVerObj -semVerStr 'not semver' } | Should -Throw
+ { SemVerStrToSemVerObj -semVerStr '' } | Should -Throw
+ { SemVerStrToSemVerObj -semVerStr 'v1.2' } | Should -Throw
+ { SemVerStrToSemVerObj -semVerStr '1.2' } | Should -Throw
+
+ SemVerStrToSemVerObj -semVerStr 'v1.2.3' | SemVerObjToSemVerStr | Should -Be 'v1.2.3'
+ SemVerStrToSemVerObj -semVerStr '1.2.3' | SemVerObjToSemVerStr | Should -Be '1.2.3'
+ SemVerStrToSemVerObj -semVerStr '1.2.0' | SemVerObjToSemVerStr | Should -Be '1.2.0'
+ SemVerStrToSemVerObj -semVerStr 'v1.2' -allowMajorMinorOnly | SemVerObjToSemVerStr | Should -Be 'v1.2.0'
+ SemVerStrToSemVerObj -semVerStr '1.2' -allowMajorMinorOnly | SemVerObjToSemVerStr | Should -Be '1.2.0'
+ SemVerStrToSemVerObj -semVerStr 'v1.2.3-alpha.1' -allowMajorMinorOnly | SemVerObjToSemVerStr | Should -Be 'v1.2.3-alpha.1'
+ SemVerStrToSemVerObj -semVerStr 'v1.2.3-alpha.1.2.3.beta' -allowMajorMinorOnly | SemVerObjToSemVerStr | Should -Be 'v1.2.3-alpha.1.2.3.beta'
+ SemVerStrToSemVerObj -semVerStr 'v1.2-beta' -allowMajorMinorOnly | SemVerObjToSemVerStr | Should -Be 'v1.2.0-beta'
+ SemVerStrToSemVerObj -semVerStr 'v1.2-beta-1' -allowMajorMinorOnly | SemVerObjToSemVerStr | Should -Be 'v1.2.0-beta-1'
+
+ { SemVerStrToSemVerObj -semVerStr 'v1.2.3-alpha.1.2.3.beta.5' } | Should -Throw
+ { SemVerStrToSemVerObj -semVerStr 'v1.2.3-alpha.1.2.zzzz.beta.5' } | Should -Throw
+
+ }
+}
diff --git a/e2eTests/Test-AL-Go.ps1 b/e2eTests/Test-AL-Go.ps1
index ce0bdaf75..c6d62fe5f 100644
--- a/e2eTests/Test-AL-Go.ps1
+++ b/e2eTests/Test-AL-Go.ps1
@@ -241,10 +241,10 @@ $runTestNextMajor = Run-TestNextMajor -branch $branch -insiderSasToken $insiderS
WaitWorkflow -runid $runTestNextMajor.id
$runs++
-WaitWorkflow -runid $runTestNextMinor.id
+WaitWorkflow -runid $runTestNextMinor.id -noDelay
$runs++
-WaitWorkflow -runid $runTestCurrent.id
+WaitWorkflow -runid $runTestCurrent.id -noDelay
$runs++
Test-NumberOfRuns -expectedNumberOfRuns $runs
diff --git a/e2eTests/Workflows/Run-CreateRelease.ps1 b/e2eTests/Workflows/Run-CreateRelease.ps1
index 771b0d93b..6d64465b8 100644
--- a/e2eTests/Workflows/Run-CreateRelease.ps1
+++ b/e2eTests/Workflows/Run-CreateRelease.ps1
@@ -3,8 +3,11 @@
[string] $appVersion,
[string] $name,
[string] $tag,
- [switch] $draft,
[switch] $prerelease,
+ [switch] $draft,
+ [switch] $createReleaseBranch,
+ [string] $updateVersionNumber = '',
+ [switch] $directCommit,
[switch] $wait,
[string] $repository,
[string] $branch = "main"
@@ -15,8 +18,11 @@
"appVersion" = $appVersion
"name" = $name
"tag" = $tag
- "draft" = @("Y","N")[!$draft]
"prerelease" = @("Y","N")[!$prerelease]
+ "draft" = @("Y","N")[!$draft]
+ "createReleaseBranch" = @("Y","N")[!$createReleaseBranch]
+ "updateVersionNumber" = $updateVersionNumber
+ "directCommit" = @("Y","N")[!$directCommit]
}
RunWorkflow -name $workflowName -parameters $parameters -wait:$wait -branch $branch -repository $repository
}
\ No newline at end of file
diff --git a/e2eTests/e2eTestHelper.psm1 b/e2eTests/e2eTestHelper.psm1
index fa58398e6..50e513da9 100644
--- a/e2eTests/e2eTestHelper.psm1
+++ b/e2eTests/e2eTestHelper.psm1
@@ -184,12 +184,37 @@ function RunWorkflow {
$run
}
+function DownloadWorkflowLog {
+ Param(
+ [string] $repository,
+ [string] $runid,
+ [string] $path
+ )
+
+ if (!$repository) {
+ $repository = $defaultRepository
+ }
+ $headers = @{
+ "Accept" = "application/vnd.github.v3+json"
+ "Authorization" = "token $token"
+ }
+
+ $url = "https://api.github.com/repos/$repository/actions/runs/$runid"
+ $run = (InvokeWebRequest -Method Get -Headers $headers -Uri $url | ConvertFrom-Json)
+ $log = InvokeWebRequest -Method Get -Headers $headers -Uri $run.logs_url
+ $tempFileName = [System.IO.Path]::GetTempFileName()
+ [System.IO.File]::WriteAllBytes($tempFileName, $log.Content)
+ Expand-Archive -Path $tempFileName -DestinationPath $path
+}
+
function WaitWorkflow {
Param(
[string] $repository,
- [string] $runid
+ [string] $runid,
+ [switch] $noDelay
)
+ $delay = !$noDelay.IsPresent
if (!$repository) {
$repository = $defaultRepository
}
@@ -200,7 +225,9 @@ function WaitWorkflow {
$status = ""
do {
- Start-Sleep -Seconds 60
+ if ($delay) {
+ Start-Sleep -Seconds 60
+ }
$url = "https://api.github.com/repos/$repository/actions/runs/$runid"
$run = (InvokeWebRequest -Method Get -Headers $headers -Uri $url | ConvertFrom-Json)
if ($run.status -ne $status) {
@@ -209,6 +236,7 @@ function WaitWorkflow {
Write-Host -NoNewline "$status"
}
Write-Host -NoNewline "."
+ $delay = $true
} while ($run.status -eq "queued" -or $run.status -eq "in_progress")
Write-Host
Write-Host $run.conclusion
@@ -376,7 +404,7 @@ function CreateAlGoRepository {
}
invoke-git push --set-upstream origin $branch
if (!$github) {
- Start-Process "https://github.com/$repository"
+ Start-Process "https://github.com/$repository/actions"
}
Start-Sleep -seconds 10
}
@@ -460,19 +488,24 @@ function RemoveRepository {
}
}
-function Replace-StringInFiles {
+function Test-LogContainsFromRun {
Param(
- [string] $path,
- [string] $include = "*",
- [string] $search,
- [string] $replace
+ [string] $repository,
+ [string] $runid,
+ [string] $jobName,
+ [string] $stepName,
+ [string] $expectedText
)
- Get-ChildItem -Path $path -Recurse -Include $include -File | ForEach-Object {
- $content = Get-Content $_.FullName -Raw -Encoding utf8
- $content = $content -replace $search, $replace
- [System.IO.File]::WriteAllText($_.FullName, $content)
+ DownloadWorkflowLog -repository $repository -runid $runid -path 'logs'
+ $runPipelineLog = Get-Content -Path (Get-Item "logs/$jobName/*_$stepName.txt").FullName -encoding utf8 -raw
+ if ($runPipelineLog.contains($expectedText, [System.StringComparison]::OrdinalIgnoreCase)) {
+ Write-Host "'$expectedText' found in the log for $jobName/$stepName as expected"
+ }
+ else {
+ throw "Expected to find '$expectedText' in the log for $jobName/$stepName, but did not find it"
}
+ Remove-Item -Path 'logs' -Recurse -Force
}
. (Join-Path $PSScriptRoot "Workflows\Run-AddExistingAppOrTestApp.ps1")
diff --git a/e2eTests/scenarios/ReleaseBranches/runtest.ps1 b/e2eTests/scenarios/ReleaseBranches/runtest.ps1
new file mode 100644
index 000000000..e509bd901
--- /dev/null
+++ b/e2eTests/scenarios/ReleaseBranches/runtest.ps1
@@ -0,0 +1,175 @@
+Param(
+ [switch] $github,
+ [string] $githubOwner = $global:E2EgithubOwner,
+ [string] $repoName = [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetTempFileName()),
+ [string] $token = ($Global:SecureE2EPAT | Get-PlainText),
+ [string] $pteTemplate = $global:pteTemplate,
+ [string] $appSourceTemplate = $global:appSourceTemplate,
+ [string] $adminCenterApiToken = ($global:SecureAdminCenterApiToken | Get-PlainText),
+ [string] $licenseFileUrl = ($global:SecureLicenseFileUrl | Get-PlainText),
+ [string] $insiderSasToken = ($global:SecureInsiderSasToken | Get-PlainText)
+)
+
+Write-Host -ForegroundColor Yellow @'
+# _____ _ ____ _
+#| __ \ | | | _ \ | |
+#| |__) |___| | ___ __ _ ___ ___| |_) |_ __ __ _ _ __ ___| |__ ___ ___
+#| _ // _ \ |/ _ \/ _` / __|/ _ \ _ <| '__/ _` | '_ \ / __| '_ \ / _ \/ __|
+#| | \ \ __/ | __/ (_| \__ \ __/ |_) | | | (_| | | | | (__| | | | __/\__ \
+#|_| \_\___|_|\___|\__,_|___/\___|____/|_| \__,_|_| |_|\___|_| |_|\___||___/
+#
+#
+# This test tests the following scenario:
+#
+# - Create a new repository based on the PTE template with a single project HelloWorld app
+# - Run the "CI/CD" workflow
+# - Check that no previous release was found
+# - Release version 1.0, create releasebranch 1.0 and update version number to 2.0
+# - Check that release notes contains the correct link to the full changelog
+# - Run the CI/CD workflow main branch
+# - Check that v1.0 was used as previous release
+# - Release version 2.0, create releasebranch 2.0 and update version number to 2.1
+# - Check that release notes contains the correct link to the full changelog
+# - Run the CI/CD workflow main branch
+# - Check that v2.0 was used as previous release
+# - Run the CI/CD workflow in release branch 1.0
+# - Check that latest release from v1.0 was used as previous release
+# - Run the CI/CD workflow in release branch 2.0
+# - Check that latest release from v2.0 was used as previous release
+# - Release a hotfix from release branch 1.0
+# - Check that release notes contains the correct link to the full changelog
+# - Release a hotfix from release branch 2.0
+# - Check that release notes contains the correct link to the full changelog
+# - Run the CI/CD workflow in release branch 1.0
+# - Check that latest release from v1.0 was used as previous release
+#
+# - Cleanup repositories
+#
+'@
+
+$ErrorActionPreference = "stop"
+Set-StrictMode -Version 2.0
+$prevLocation = Get-Location
+$repoPath = ""
+
+Remove-Module e2eTestHelper -ErrorAction SilentlyContinue
+Import-Module (Join-Path $PSScriptRoot "..\..\e2eTestHelper.psm1") -DisableNameChecking
+
+$repository = "$githubOwner/$repoName"
+$branch = "main"
+
+$template = "https://github.com/$($pteTemplate)@main"
+
+# Login
+SetTokenAndRepository -github:$github -githubOwner $githubOwner -token $token -repository $repository
+
+# Create repo
+CreateAlGoRepository `
+ -github:$github `
+ -linux `
+ -template $template `
+ -repository $repository `
+ -branch $branch `
+ -contentScript {
+ Param([string] $path)
+ CreateNewAppInFolder -folder $path -name "App" | Out-Null
+ }
+$repoPath = (Get-Location).Path
+Start-Process $repoPath
+
+# Run CI/CD workflow
+$run = Run-CICD -repository $repository -branch $branch -wait
+
+# Test number of artifacts
+Test-ArtifactsFromRun -runid $run.id -folder 'artifacts' -expectedArtifacts @{"Apps"=1} -repoVersion '1.0' -appVersion '1.0'
+
+# Check that no previous release was found
+Test-LogContainsFromRun -runid $run.id -jobName 'Build . - Default' -stepName 'Run pipeline' -expectedText 'No previous release found'
+
+# Release version 1.0
+$tag1 = '1.0.0'
+$ver1 = 'v1.0'
+$releaseBranch1 = "release/1.0"
+$release1 = Run-CreateRelease -repository $repository -branch $branch -appVersion 'latest' -name $ver1 -tag $tag1 -createReleaseBranch -updateVersionNumber '+1.0' -directCommit -wait
+
+Test-LogContainsFromRun -runid $release1.id -jobName 'CreateRelease' -stepName 'Prepare release notes' -expectedText "releaseNotes=**Full Changelog**: https://github.com/$repository/commits/$tag1"
+
+# Run CI/CD workflow
+$run = Run-CICD -repository $repository -branch $branch -wait
+
+# Test number of artifacts
+Test-ArtifactsFromRun -runid $run.id -folder 'artifacts' -expectedArtifacts @{"Apps"=1} -repoVersion '2.0' -appVersion '2.0'
+
+# Check that $tag1 was used as previous release
+Test-LogContainsFromRun -runid $run.id -jobName 'Build . - Default' -stepName 'Run pipeline' -expectedText "Using $ver1 (tag $tag1) as previous release"
+
+# Release version 2.0
+$tag2 = '2.0.0'
+$ver2 = 'v2.0'
+$releaseBranch2 = "release/2.0"
+$release2 = Run-CreateRelease -repository $repository -branch $branch -appVersion 'latest' -name $ver2 -tag $tag2 -createReleaseBranch -updateVersionNumber '+0.1' -directCommit -wait
+
+Test-LogContainsFromRun -runid $release2.id -jobName 'CreateRelease' -stepName 'Prepare release notes' -expectedText "releaseNotes=**Full Changelog**: https://github.com/$repository/compare/$tag1...$tag2"
+
+# Run CI/CD workflow
+$run = Run-CICD -repository $repository -branch $branch
+# Run CI/CD workflow in release branch 1.0
+$runRelease1 = Run-CICD -repository $repository -branch $releaseBranch1
+# Run CI/CD workflow in release branch 2.0
+$runRelease2 = Run-CICD -repository $repository -branch $releaseBranch2 -wait
+WaitWorkflow -runid $runRelease1.id -repository $repository -noDelay
+WaitWorkflow -runid $run.id -repository $repository -noDelay
+
+# Test number of artifacts
+Test-ArtifactsFromRun -runid $run.id -folder 'artifacts' -expectedArtifacts @{"Apps"=1} -repoVersion '2.1' -appVersion '2.1'
+
+# Check that $tag2 was used as previous release
+Test-LogContainsFromRun -runid $run.id -jobName 'Build . - Default' -stepName 'Run pipeline' -expectedText "Using $ver2 (tag $tag2) as previous release"
+
+Test-ArtifactsFromRun -runid $runRelease1.id -folder 'artifacts1' -expectedArtifacts @{"Apps"=1} -repoVersion '1.0' -appVersion '1.0'
+$noOfReleaseArtifacts = @(get-childitem -path 'artifacts1' -filter '*-release_1.0-Apps-1.0.*').count
+if ($noOfReleaseArtifacts -ne 1) {
+ throw "Expected 1 artifact in release artifact1, but found $noOfReleaseArtifacts"
+}
+
+# Check that $tag1 was used as previous release for builds in release branch 1.0
+Test-LogContainsFromRun -runid $runRelease1.id -jobName 'Build . - Default' -stepName 'Run pipeline' -expectedText "Using $ver1 (tag $tag1) as previous release"
+
+Test-ArtifactsFromRun -runid $runRelease2.id -folder 'artifacts2' -expectedArtifacts @{"Apps"=1} -repoVersion '2.0' -appVersion '2.0'
+$noOfReleaseArtifacts = @(get-childitem -path 'artifacts2' -filter '*-release_2.0-Apps-2.0.*').count
+if ($noOfReleaseArtifacts -ne 1) {
+ throw "Expected 1 artifact in release artifact2, but found $noOfReleaseArtifacts"
+}
+
+# Check that $tag2 was used as previous release for builds in release branch 2.0
+Test-LogContainsFromRun -runid $runRelease2.id -jobName 'Build . - Default' -stepName 'Run pipeline' -expectedText "Using $ver2 (tag $tag2) as previous release"
+
+# Release hotfix from version 1.0
+$hotTag1 = "1.0.$($runRelease1.run_number)"
+$hotVer1 = "v$hotTag1"
+$release1 = Run-CreateRelease -repository $repository -branch $releaseBranch1 -appVersion "$hotTag1.0" -name $hotVer1 -tag $hotTag1 -directCommit -wait
+
+Test-LogContainsFromRun -runid $release1.id -jobName 'CreateRelease' -stepName 'Prepare release notes' -expectedText "releaseNotes=**Full Changelog**: https://github.com/$repository/compare/$tag1...$hotTag1"
+
+# Release hotfix from version 2.0
+$hotTag2 = "2.0.$($runRelease2.run_number)"
+$hotVer2 = "v$hotTag2"
+$release2 = Run-CreateRelease -repository $repository -branch $releaseBranch2 -appVersion "$hotTag2.0" -name $hotVer2 -tag $hotTag2 -directCommit -wait
+
+Test-LogContainsFromRun -runid $release2.id -jobName 'CreateRelease' -stepName 'Prepare release notes' -expectedText "releaseNotes=**Full Changelog**: https://github.com/$repository/compare/$tag2...$hotTag2"
+
+# Run CI/CD workflow in release branch 1.0
+$runRelease1 = Run-CICD -repository $repository -branch $releaseBranch1 -wait
+
+Test-ArtifactsFromRun -runid $runRelease1.id -folder 'artifacts3' -expectedArtifacts @{"Apps"=1} -repoVersion '1.0' -appVersion '1.0'
+$noOfReleaseArtifacts = @(get-childitem -path 'artifacts3' -filter '*-release_1.0-Apps-1.0.*').count
+if ($noOfReleaseArtifacts -ne 1) {
+ throw "Expected 1 artifact in release artifact3, but found $noOfReleaseArtifacts"
+}
+
+# Check that $hotTag1 was used as previous release for builds in release branch 1.0
+Test-LogContainsFromRun -runid $runRelease1.id -jobName 'Build . - Default' -stepName 'Run pipeline' -expectedText "Using $hotVer1 (tag $hotTag1) as previous release"
+
+Set-Location $prevLocation
+
+RemoveRepository -repository $repository -path $repoPath
diff --git a/e2eTests/scenarios/UseProjectDependencies/runtest.ps1 b/e2eTests/scenarios/UseProjectDependencies/runtest.ps1
index 84fbc1001..b4e70ee3f 100644
--- a/e2eTests/scenarios/UseProjectDependencies/runtest.ps1
+++ b/e2eTests/scenarios/UseProjectDependencies/runtest.ps1
@@ -96,13 +96,13 @@ $runTestNextMajor = Run-TestNextMajor -branch $branch -insiderSasToken $insiderS
WaitWorkflow -runid $run.id
Test-ArtifactsFromRun -runid $run.id -folder 'artifacts' -expectedArtifacts @{"Apps"=6;"thisbuild"=6} -repoVersion '1.0' -appVersion '1.0'
-WaitWorkflow -runid $runTestCurrent.id
+WaitWorkflow -runid $runTestCurrent.id -noDelay
Test-ArtifactsFromRun -runid $runTestCurrent.id -folder 'currentartifacts' -expectedArtifacts @{"Apps"=0;"thisbuild"=6} -repoVersion '1.0' -appVersion '1.0'
-WaitWorkflow -runid $runTestNextMinor.id
+WaitWorkflow -runid $runTestNextMinor.id -noDelay
Test-ArtifactsFromRun -runid $runTestNextMinor.id -folder 'nextminorartifacts' -expectedArtifacts @{"Apps"=0;"thisbuild"=6} -repoVersion '1.0' -appVersion '1.0'
-WaitWorkflow -runid $runTestNextMajor.id
+WaitWorkflow -runid $runTestNextMajor.id -noDelay
Test-ArtifactsFromRun -runid $runTestNextMajor.id -folder 'nextmajorartifacts' -expectedArtifacts @{"Apps"=0;"thisbuild"=6} -repoVersion '1.0' -appVersion '1.0'
Set-Location $prevLocation