File tree Expand file tree Collapse file tree 4 files changed +11
-4
lines changed Expand file tree Collapse file tree 4 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ FROM mcr.microsoft.com/windows/servercore:ltsc2019
3
3
SHELL ["powershell" , "-Command" , "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';" ]
4
4
5
5
# PATH isn't actually set in the Docker image, so we have to set it from within the container
6
- RUN $newPath = ('C:\n odejs;{0}\Y arn\b in;{1}; C:\P rogram Files (x86)\G nuPG\b in' -f $env:LOCALAPPDATA, $env:PATH); \
6
+ RUN $newPath = ('C:\n odejs;{0}\Y arn\b in;C:\P rogram Files (x86)\G nuPG\b in;{1} ' -f $env:LOCALAPPDATA, $env:PATH); \
7
7
Write-Host ('Updating PATH: {0}' -f $newPath); \
8
8
[Environment]::SetEnvironmentVariable('PATH' , $newPath, [EnvironmentVariableTarget]::Machine)
9
9
# doing this first to share cache across versions more aggressively
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ FROM mcr.microsoft.com/windows/servercore:ltsc2022
3
3
SHELL ["powershell" , "-Command" , "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';" ]
4
4
5
5
# PATH isn't actually set in the Docker image, so we have to set it from within the container
6
- RUN $newPath = ('C:\n odejs;{0}\Y arn\b in;{1}; C:\P rogram Files (x86)\G nuPG\b in' -f $env:LOCALAPPDATA, $env:PATH); \
6
+ RUN $newPath = ('C:\n odejs;{0}\Y arn\b in;C:\P rogram Files (x86)\G nuPG\b in;{1} ' -f $env:LOCALAPPDATA, $env:PATH); \
7
7
Write-Host ('Updating PATH: {0}' -f $newPath); \
8
8
[Environment]::SetEnvironmentVariable('PATH' , $newPath, [EnvironmentVariableTarget]::Machine)
9
9
# doing this first to share cache across versions more aggressively
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ FROM mcr.microsoft.com/windows/servercore:version
3
3
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
4
4
5
5
# PATH isn't actually set in the Docker image, so we have to set it from within the container
6
- RUN $newPath = ('C:\nodejs;{0}\Yarn\bin;{1}; C:\Program Files (x86)\GnuPG\bin' -f $env:LOCALAPPDATA, $env:PATH); \
6
+ RUN $newPath = ('C:\nodejs;{0}\Yarn\bin;C:\Program Files (x86)\GnuPG\bin;{1} ' -f $env:LOCALAPPDATA, $env:PATH); \
7
7
Write-Host ('Updating PATH: {0}' -f $newPath); \
8
8
[Environment]::SetEnvironmentVariable('PATH', $newPath, [EnvironmentVariableTarget]::Machine)
9
9
# doing this first to share cache across versions more aggressively
Original file line number Diff line number Diff line change @@ -8,21 +8,28 @@ const testFiles = [
8
8
] ;
9
9
10
10
const nodeDirRegex = / ^ \d + $ / ;
11
+ // Directories starting with 'windows-' are excluded from the matrix windows-2019 are excluded for example
11
12
const windowsDirRegex = / ^ w i n d o w s - / ;
12
13
13
14
const areTestFilesChanged = ( changedFiles ) => changedFiles
14
15
. some ( ( file ) => testFiles . includes ( file ) ) ;
15
16
16
17
// Returns a list of the child directories in the given path, excluding those starting with 'windows-'
17
18
const getChildDirectories = ( parent ) => fs . readdirSync ( parent , { withFileTypes : true } )
18
- . filter ( ( dirent ) => dirent . isDirectory ( ) && ! windowsDirRegex . test ( dirent . name ) )
19
+ . filter ( ( directory ) => directory . isDirectory ( ) )
19
20
. map ( ( { name } ) => path . resolve ( parent , name ) ) ;
20
21
21
22
const getNodeVersionDirs = ( base ) => getChildDirectories ( base )
22
23
. filter ( ( childPath ) => nodeDirRegex . test ( path . basename ( childPath ) ) ) ;
23
24
24
25
// Returns the paths of Dockerfiles that are at: base/*/Dockerfile
25
26
const getDockerfilesInChildDirs = ( base ) => getChildDirectories ( base )
27
+ . filter ( ( directory ) => directory . isDirectory ( ) && ! windowsDirRegex . test ( directory . name ) )
28
+ // Test print the directories
29
+ . map ( ( childDir ) => {
30
+ console . log ( childDir ) ;
31
+ return childDir ;
32
+ } )
26
33
. map ( ( childDir ) => path . resolve ( childDir , 'Dockerfile' ) ) ;
27
34
28
35
const getAllDockerfiles = ( base ) => getNodeVersionDirs ( base ) . flatMap ( getDockerfilesInChildDirs ) ;
You can’t perform that action at this time.
0 commit comments