Closed joeltimothyoh closed 3 years ago
@joeltimothyoh how about using https://hub.docker.com/r/microsoft/powershell/ images directly, and using github workflows? azure pipelines is old
Possible, but those are clean images that don't contain packages such as git
for resolving of paths of superprojects, or sudo
for installation of dependencies in CI environments. @leojonathanoh
Possible, but those are clean images that don't contain packages such as git for resolving of paths of superprojects
@joeltimothyoh could use https://github.com/theohbrothers/docker-powershell, see some examples https://github.com/theohbrothers/Get-DuplicateItem/blob/v1.1.2/.github/workflows/ci-master-pr.yml#L121
or sudo for installation of dependencies in CI environments. @leojonathanoh
why need sudo
? job already running as root
why need sudo? job already running as root
sudo
was necessary for installing certain packages within containers as the container user in azure-pipelines
. I believe container jobs are initialized to run as a user regardless of their pre-configurations. sudo
was thus required for running commands such as apt-get
. @leojonathanoh
@joeltimothyoh guess the images should be built with those packages so there would be no need for apt-get
in ci jobs
@leojonathanoh most of them would likely already exist within the provided VM images. But if steps are run within containers access to those tools would require installation. Could build images to contain those packages. But that adds severe overhead. Besides, PS cmdlets could be used in many ways which could involve any number of package combinations. @leojonathanoh
@joeltimothyoh e.g. of an external package that PS needs outisde of the PS libraries? I can think of git
, ssh
(that's covered in PSSession)
Or build
, test, or publish
time dependencies that superprojects require. @leojonathanoh
Here's logs from the past demonstrating the need for the sudo
package in container jobs on azure-pipelines:
sudo
This was an issue in spite of what Initialize containers
step logs claim: https://dev.azure.com/startersclan/Compile-SourceScript/_build/results?buildId=205&view=logs&j=6f12d3be-437a-59bf-0616-36fdeef4a6be&t=7f1bce06-ff30-4fc9-af32-50ddb862b235&l=65
sudo
package and invoking sudo
sudo
command: https://dev.azure.com/startersclan/Compile-SourceScript/_build/results?buildId=206&view=logs&j=6f12d3be-437a-59bf-0616-36fdeef4a6be&t=8b3a2719-f521-5850-1793-8e98a2339e22&l=268The docs on container jobs did address some requirements for docker images used in container jobs. The requirements could have changed now: https://docs.microsoft.com/en-us/azure/devops/pipelines/process/container-phases?view=azure-devops. GitLab doesn't seem to have the same issue. Things could have changed for azure-pipelines since. Just a heads-up concerning container jobs and possible need for the sudo
package. @leojonathanoh
@joeltimothyoh move on to github actions might not have such an issue
@joeltimothyoh move on to github actions might not have such an issue
I would think so. Never really had a use case for mutating container images other than the above so I don't know. @leojonathanoh
The lack of log retention is a serious downside of GHA. @leojonathanoh
@joeltimothyoh the poor disintegrated azp system is also a pretty major downside
lgtm