Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow GitHubRunner as a project setting #1177

Merged
merged 14 commits into from
Sep 9, 2024

Conversation

aholstrup1
Copy link
Collaborator

Allow GitHubRunner as a project setting. This would enable us to compile apps on linux-based GitHub runners while running the tests on either windows GitHub runners or self-hosted runners.

@aholstrup1 aholstrup1 marked this pull request as ready for review August 27, 2024 12:13
@aholstrup1 aholstrup1 requested a review from a team as a code owner August 27, 2024 12:13
@freddydk
Copy link
Contributor

freddydk commented Aug 28, 2024

These lines at the end of ReadSettings should be removed:

$gitHubRunner = $settings.githubRunner.Split(',').Trim() | ConvertTo-Json -compress
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "GitHubRunnerJson=$githubRunner"
Write-Host "GitHubRunnerJson=$githubRunner"

$gitHubRunnerShell = $settings.githubRunnerShell
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "GitHubRunnerShell=$githubRunnerShell"
Write-Host "GitHubRunnerShell=$githubRunnerShell"

and these lines in the corresponding action.yaml:

outputs:
  GitHubRunnerJson:
    description: GitHubRunner in compressed Json format
    value: ${{ steps.readsettings.outputs.GitHubRunnerJson }}
  GitHubRunnerShell:
    description: Shell for GitHubRunner jobs
    value: ${{ steps.readsettings.outputs.GitHubRunnerShell }}

and these lines in the corresponding readme.md should be replaced by none:

| Name | Description |
| :-- | :-- |
| GitHubRunnerJson | GitHubRunner in compressed Json format |
| GitHubRunnerShell | Shell for GitHubRunner jobs |

Nobody should use this output.

Copy link
Contributor

@freddydk freddydk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - I like the change
Added a comment with requested changes (to remove the outputs from ReadSettings)

@aholstrup1
Copy link
Collaborator Author

aholstrup1 commented Sep 2, 2024

Looks good - I like the change Added a comment with requested changes (to remove the outputs from ReadSettings)

So.. We're still using these outputs a couple of places. Specifically, in BuildPP:

shell: ${{ needs.Initialization.outputs.githubRunnerShell }}
runsOn: ${{ needs.Initialization.outputs.githubRunner }}

And CreateDevelopmentEnvironment

runs-on: ${{ fromJson(needs.Initialization.outputs.githubRunner) }}

How do we get rid of those dependencies in an appropriate way?

For PP we could output the runner + runnerShell from:

- name: Determine PowerPlatform Solution Folder
id: DeterminePowerPlatformSolutionFolder
if: env.type == 'PTE'
run: |
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "powerPlatformSolutionFolder=$($env:powerPlatformSolutionFolder)"

Maybe we can do something similar for CreateDevelopmentEnvironment. Thoughts? Something like this:
aholstrup1#50

@aholstrup1 aholstrup1 changed the title [Suggestion] Allow GitHubRunner as a project setting Allow GitHubRunner as a project setting Sep 5, 2024
mazhelez
mazhelez previously approved these changes Sep 5, 2024
Actions/AL-Go-TestRepoHelper.ps1 Outdated Show resolved Hide resolved
@aholstrup1 aholstrup1 merged commit a2a51be into microsoft:main Sep 9, 2024
5 checks passed
cegekaJG pushed a commit to cegekaJG/AL-Go that referenced this pull request Sep 11, 2024
Allow GitHubRunner as a project setting. This would enable us to compile
apps on linux-based GitHub runners while running the tests on either
windows GitHub runners or self-hosted runners.
cegekaJG pushed a commit to cegekaJG/AL-Go that referenced this pull request Sep 11, 2024
Allow GitHubRunner as a project setting. This would enable us to compile
apps on linux-based GitHub runners while running the tests on either
windows GitHub runners or self-hosted runners.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants