Add github actions runner setup for all platforms#241
Add github actions runner setup for all platforms#241adrianriobo merged 10 commits intoredhat-developer:mainfrom
Conversation
| SetupGHActionsRunner bool // setup as github actions runner | ||
| GHActionsRunnerToken string | ||
| GHActionsRunnerName string | ||
| GHActionsRunnerRepo string |
There was a problem hiding this comment.
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.
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.
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 <kaludios@gmail.com>
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 <kaludios@gmail.com>
27d1a44 to
af934c5
Compare
| SetupGHActionsRunner bool // setup as github actions runner | ||
| GHActionsRunnerToken string | ||
| GHActionsRunnerName string | ||
| GHActionsRunnerRepo string |
There was a problem hiding this comment.
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.
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.
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.
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 <kaludios@gmail.com>
Signed-off-by: Anjan Nath <kaludios@gmail.com>
Signed-off-by: Anjan Nath <kaludios@gmail.com>
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 <kaludios@gmail.com>
Signed-off-by: Anjan Nath <kaludios@gmail.com>
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 <kaludios@gmail.com>
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 createandmapt azure windows createcommands: