-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add github actions runner setup for all platforms #241
Conversation
SetupGHActionsRunner bool // setup as github actions runner | ||
GHActionsRunnerToken string | ||
GHActionsRunnerName string | ||
GHActionsRunnerRepo string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
after the call and understanding a bit about the project, i am not sure if these GHActions*
stuff should be part of the Request
struct, i am thinking we need a config
type which will hold the flag values
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mmm may it should have its on type, instead of adding each param on ech request type per type of host.
Then what I would ido s to use the same snippet on both ps1 but take into account that token should be passed as secret variable on the azure due to the vm extension feature exposing the script public.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the latest push now azure and aws both windows hosts are using the same snippet, but i couldn't figure out how to make the token as a secret variable :(
Fixes #211 |
9a7be71
to
4dbf7fa
Compare
since source dirs are only cmd, pkg it removes the 'test' from SOURCE_DIRS variable Signed-off-by: Anjan Nath <[email protected]>
now when go install is used it creates the binary with name mapt earlier the created binary was named cmd Signed-off-by: Anjan Nath <[email protected]>
27d1a44
to
af934c5
Compare
SetupGHActionsRunner bool // setup as github actions runner | ||
GHActionsRunnerToken string | ||
GHActionsRunnerName string | ||
GHActionsRunnerRepo string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mmm may it should have its on type, instead of adding each param on ech request type per type of host.
Then what I would ido s to use the same snippet on both ps1 but take into account that token should be passed as secret variable on the azure due to the vm extension feature exposing the script public.
if ($installGHActionsRunner) { | ||
New-Item -Path C:\actions-runner -Type Directory ; cd C:\actions-runner | ||
Invoke-WebRequest -Uri https://github.com/actions/runner/releases/download/v2.317.0/actions-runner-win-x64-2.317.0.zip -OutFile actions-runner-win-x64-2.317.0.zip | ||
Add-Type -AssemblyName System.IO.Compression.FileSystem ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be composed from the snipped on the gh util and leave on the syntax to pass the token as a variable.
Use only one snippet allow us to take care of it only in one place.
Side note I would try to use latest version on the runner instead of fixed version? Or if you want to fix the version to ensure it works move that to a constant to easily then manage versions (i.e renovate regex on it)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay, i was considering it, then i saw this script didn't currently use templating and instead used args to customize, therefore went with this, i'll update it to use the same snippet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also extracted the version from the snippet into a constant in 25e6c68
Dunno how you will reconcile the commits after re factor but may you can add doc information about the feature. Like something on the main |
Hey can you add the snippet for mac as well? or do you prefer handle it on a different PR? Ensure to check #211 (comment) |
yeah, I'd prefer to do it in a separate PR :) |
this adds new flags to the command `mapt aws windows create` to setup github actions runner on the created ec2 instance it also adds the additional flags to get the various values needed to setup the github actions runner Signed-off-by: Anjan Nath <[email protected]>
Signed-off-by: Anjan Nath <[email protected]>
Signed-off-by: Anjan Nath <[email protected]>
059611b
to
7df4c10
Compare
this adds new flags to the command `mapt azure windows create` to setup github actions runner on the provisioned instance it also adds the additional flags to get the various values needed to setup the github actions runner Signed-off-by: Anjan Nath <[email protected]>
Signed-off-by: Anjan Nath <[email protected]>
this adds new flags to the command `mapt aws rhel create` to to install github actions runner on the provisioned instance it also adds the additional flags to get the various values needed to setup the github actions runner Signed-off-by: Anjan Nath <[email protected]>
the version is extracted and defined as a constant for easier updating of the version later
this adds the following new flags to the
mapt aws windows create
andmapt azure windows create
commands: