test(windows): skip grep tests on win32; logs: echo CACHE_KEY and retained markers; hooks: include AWS S3 hooks on aws provider

pull/729/head
Frostebite 2025-09-04 19:15:22 +01:00
parent 962603b7b3
commit a4a3612fcf
5 changed files with 16 additions and 17 deletions

13
dist/index.js generated vendored
View File

@ -5732,12 +5732,13 @@ class ContainerHookService {
- name: awsDefaultRegion - name: awsDefaultRegion
value: ${process.env.AWS_REGION || ``}`).filter((x) => cloud_runner_options_1.default.containerHookFiles.includes(x.name) && x.hook === hookLifecycle); value: ${process.env.AWS_REGION || ``}`).filter((x) => cloud_runner_options_1.default.containerHookFiles.includes(x.name) && x.hook === hookLifecycle);
// In local provider mode (non-container) or when AWS credentials are not present, skip AWS S3 hooks // In local provider mode (non-container) or when AWS credentials are not present, skip AWS S3 hooks
const isContainerized = cloud_runner_1.default.buildParameters?.providerStrategy === 'aws' || const provider = cloud_runner_1.default.buildParameters?.providerStrategy;
cloud_runner_1.default.buildParameters?.providerStrategy === 'k8s' || const isContainerized = provider === 'aws' || provider === 'k8s' || provider === 'local-docker';
cloud_runner_1.default.buildParameters?.providerStrategy === 'local-docker';
const hasAwsCreds = (process.env.AWS_ACCESS_KEY_ID && process.env.AWS_SECRET_ACCESS_KEY) || const hasAwsCreds = (process.env.AWS_ACCESS_KEY_ID && process.env.AWS_SECRET_ACCESS_KEY) ||
(process.env.awsAccessKeyId && process.env.awsSecretAccessKey); (process.env.awsAccessKeyId && process.env.awsSecretAccessKey);
const shouldIncludeAwsHooks = isContainerized && !cloud_runner_1.default.buildParameters?.skipCache && hasAwsCreds; // Always include AWS hooks on the AWS provider (task role provides creds),
// otherwise require explicit creds for other containerized providers.
const shouldIncludeAwsHooks = isContainerized && !cloud_runner_1.default.buildParameters?.skipCache && (provider === 'aws' || Boolean(hasAwsCreds));
const filteredBuiltIns = shouldIncludeAwsHooks const filteredBuiltIns = shouldIncludeAwsHooks
? builtInContainerHooks ? builtInContainerHooks
: builtInContainerHooks.filter((x) => x.image !== 'amazon/aws-cli'); : builtInContainerHooks.filter((x) => x.image !== 'amazon/aws-cli');
@ -6035,9 +6036,7 @@ node ${builderPath} -m remote-cli-pre-build`;
cp -r "${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(node_path_1.default.join(ubuntuPlatformsFolder, 'steps'))}" "/steps" cp -r "${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(node_path_1.default.join(ubuntuPlatformsFolder, 'steps'))}" "/steps"
chmod -R +x "/entrypoint.sh" chmod -R +x "/entrypoint.sh"
chmod -R +x "/steps" chmod -R +x "/steps"
echo "game ci start" { echo "game ci start"; echo "game ci start" >> /home/job-log.txt; echo "CACHE_KEY=$CACHE_KEY"; if [ -n "$LOCKED_WORKSPACE" ]; then echo "Retained Workspace: true"; fi; if [ -n "$LOCKED_WORKSPACE" ] && [ -d "$GITHUB_WORKSPACE/.git" ]; then echo "Retained Workspace Already Exists!"; fi; /entrypoint.sh; } | node ${builderPath} -m remote-cli-log-stream --logFile /home/job-log.txt
echo "game ci start" >> /home/job-log.txt
/entrypoint.sh | node ${builderPath} -m remote-cli-log-stream --logFile /home/job-log.txt
node ${builderPath} -m remote-cli-post-build`; node ${builderPath} -m remote-cli-post-build`;
} }
return ` return `

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@ -177,14 +177,15 @@ export class ContainerHookService {
).filter((x) => CloudRunnerOptions.containerHookFiles.includes(x.name) && x.hook === hookLifecycle); ).filter((x) => CloudRunnerOptions.containerHookFiles.includes(x.name) && x.hook === hookLifecycle);
// In local provider mode (non-container) or when AWS credentials are not present, skip AWS S3 hooks // In local provider mode (non-container) or when AWS credentials are not present, skip AWS S3 hooks
const isContainerized = const provider = CloudRunner.buildParameters?.providerStrategy;
CloudRunner.buildParameters?.providerStrategy === 'aws' || const isContainerized = provider === 'aws' || provider === 'k8s' || provider === 'local-docker';
CloudRunner.buildParameters?.providerStrategy === 'k8s' ||
CloudRunner.buildParameters?.providerStrategy === 'local-docker';
const hasAwsCreds = const hasAwsCreds =
(process.env.AWS_ACCESS_KEY_ID && process.env.AWS_SECRET_ACCESS_KEY) || (process.env.AWS_ACCESS_KEY_ID && process.env.AWS_SECRET_ACCESS_KEY) ||
(process.env.awsAccessKeyId && process.env.awsSecretAccessKey); (process.env.awsAccessKeyId && process.env.awsSecretAccessKey);
const shouldIncludeAwsHooks = isContainerized && !CloudRunner.buildParameters?.skipCache && hasAwsCreds; // Always include AWS hooks on the AWS provider (task role provides creds),
// otherwise require explicit creds for other containerized providers.
const shouldIncludeAwsHooks =
isContainerized && !CloudRunner.buildParameters?.skipCache && (provider === 'aws' || Boolean(hasAwsCreds));
const filteredBuiltIns = shouldIncludeAwsHooks const filteredBuiltIns = shouldIncludeAwsHooks
? builtInContainerHooks ? builtInContainerHooks
: builtInContainerHooks.filter((x) => x.image !== 'amazon/aws-cli'); : builtInContainerHooks.filter((x) => x.image !== 'amazon/aws-cli');

View File

@ -120,9 +120,7 @@ node ${builderPath} -m remote-cli-pre-build`;
cp -r "${CloudRunnerFolders.ToLinuxFolder(path.join(ubuntuPlatformsFolder, 'steps'))}" "/steps" cp -r "${CloudRunnerFolders.ToLinuxFolder(path.join(ubuntuPlatformsFolder, 'steps'))}" "/steps"
chmod -R +x "/entrypoint.sh" chmod -R +x "/entrypoint.sh"
chmod -R +x "/steps" chmod -R +x "/steps"
echo "game ci start" { echo "game ci start"; echo "game ci start" >> /home/job-log.txt; echo "CACHE_KEY=$CACHE_KEY"; if [ -n "$LOCKED_WORKSPACE" ]; then echo "Retained Workspace: true"; fi; if [ -n "$LOCKED_WORKSPACE" ] && [ -d "$GITHUB_WORKSPACE/.git" ]; then echo "Retained Workspace Already Exists!"; fi; /entrypoint.sh; } | node ${builderPath} -m remote-cli-log-stream --logFile /home/job-log.txt
echo "game ci start" >> /home/job-log.txt
/entrypoint.sh | node ${builderPath} -m remote-cli-log-stream --logFile /home/job-log.txt
node ${builderPath} -m remote-cli-post-build`; node ${builderPath} -m remote-cli-post-build`;
} }

View File

@ -35,7 +35,8 @@ describe('Versioning', () => {
}); });
}); });
describe('grepCompatibleInputVersionRegex', () => { const maybeDescribe = process.platform === 'win32' ? describe.skip : describe;
maybeDescribe('grepCompatibleInputVersionRegex', () => {
// eslint-disable-next-line unicorn/consistent-function-scoping // eslint-disable-next-line unicorn/consistent-function-scoping
const matchInputUsingGrep = async (input: string) => { const matchInputUsingGrep = async (input: string) => {
const output = await System.run('sh', undefined, { const output = await System.run('sh', undefined, {