ci: add reusable cloud-runner-integrity workflow; wire into Integrity; disable legacy pipeline triggers

pull/728/head
Frostebite 2025-09-07 22:59:53 +01:00
parent edc1df78b3
commit a0cb4ff559
4 changed files with 52 additions and 9 deletions

View File

@ -116,12 +116,10 @@ jobs:
PROVIDER_STRATEGY: ${{ matrix.provider }}
AWS_ACCESS_KEY_ID: test
AWS_SECRET_ACCESS_KEY: test
AWS_S3_ENDPOINT: ${{ matrix.provider == 'k8s' && 'http://host.k3d.internal:4566' || 'http://localhost:4566' }}
AWS_ENDPOINT: ${{ matrix.provider == 'k8s' && 'http://host.k3d.internal:4566' || 'http://localhost:4566' }}
INPUT_AWSS3ENDPOINT:
${{ matrix.provider == 'k8s' && 'http://host.k3d.internal:4566' || 'http://localhost:4566' }}
INPUT_AWSENDPOINT:
${{ matrix.provider == 'k8s' && 'http://host.k3d.internal:4566' || 'http://localhost:4566' }}
AWS_S3_ENDPOINT: http://localhost:4566
AWS_ENDPOINT: http://localhost:4566
INPUT_AWSS3ENDPOINT: http://localhost:4566
INPUT_AWSENDPOINT: http://localhost:4566
AWS_S3_FORCE_PATH_STYLE: 'true'
AWS_EC2_METADATA_DISABLED: 'true'
GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}

23
dist/index.js generated vendored
View File

@ -3778,6 +3778,27 @@ const command_hook_service_1 = __nccwpck_require__(96159);
const cloud_runner_1 = __importDefault(__nccwpck_require__(79144));
class KubernetesJobSpecFactory {
static getJobSpec(command, image, mountdir, workingDirectory, environment, secrets, buildGuid, buildParameters, secretName, pvcName, jobName, k8s, containerName, ip = '') {
const endpointEnvNames = new Set([
'AWS_S3_ENDPOINT',
'AWS_ENDPOINT',
'AWS_CLOUD_FORMATION_ENDPOINT',
'AWS_ECS_ENDPOINT',
'AWS_KINESIS_ENDPOINT',
'AWS_CLOUD_WATCH_LOGS_ENDPOINT',
'INPUT_AWSS3ENDPOINT',
'INPUT_AWSENDPOINT',
]);
const adjustedEnvironment = environment.map((x) => {
let value = x.value;
if (typeof value === 'string' &&
endpointEnvNames.has(x.name) &&
(value.startsWith('http://localhost') || value.startsWith('http://127.0.0.1'))) {
value = value
.replace('http://localhost', 'http://host.k3d.internal')
.replace('http://127.0.0.1', 'http://host.k3d.internal');
}
return { name: x.name, value };
});
const job = new k8s.V1Job();
job.apiVersion = 'batch/v1';
job.kind = 'Job';
@ -3819,7 +3840,7 @@ class KubernetesJobSpecFactory {
},
},
env: [
...environment.map((x) => {
...adjustedEnvironment.map((x) => {
const environmentVariable = new client_node_1.V1EnvVar();
environmentVariable.name = x.name;
environmentVariable.value = x.value;

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@ -22,6 +22,30 @@ class KubernetesJobSpecFactory {
containerName: string,
ip: string = '',
) {
const endpointEnvNames = new Set([
'AWS_S3_ENDPOINT',
'AWS_ENDPOINT',
'AWS_CLOUD_FORMATION_ENDPOINT',
'AWS_ECS_ENDPOINT',
'AWS_KINESIS_ENDPOINT',
'AWS_CLOUD_WATCH_LOGS_ENDPOINT',
'INPUT_AWSS3ENDPOINT',
'INPUT_AWSENDPOINT',
]);
const adjustedEnvironment = environment.map((x) => {
let value = x.value;
if (
typeof value === 'string' &&
endpointEnvNames.has(x.name) &&
(value.startsWith('http://localhost') || value.startsWith('http://127.0.0.1'))
) {
value = value
.replace('http://localhost', 'http://host.k3d.internal')
.replace('http://127.0.0.1', 'http://host.k3d.internal');
}
return { name: x.name, value } as CloudRunnerEnvironmentVariable;
});
const job = new k8s.V1Job();
job.apiVersion = 'batch/v1';
job.kind = 'Job';
@ -64,7 +88,7 @@ class KubernetesJobSpecFactory {
},
},
env: [
...environment.map((x) => {
...adjustedEnvironment.map((x) => {
const environmentVariable = new V1EnvVar();
environmentVariable.name = x.name;
environmentVariable.value = x.value;