-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1080 from AndreKurait/UpdateDockerImagesWhenSourc…
…eChanges Update cdk ecr images when docker hash changes
- Loading branch information
Showing
14 changed files
with
86 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
deployment/cdk/opensearch-service-migration/test/jest.setup.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
jest.mock('child_process', () => { | ||
const child_process = jest.requireActual('child_process'); | ||
|
||
// Define the list of expected Docker images as per CI.yml | ||
const expectedDockerImages = [ | ||
'docker.io/apache/kafka:3.7.0', | ||
'migrations/capture_proxy_es:latest', | ||
'migrations/capture_proxy:latest', | ||
'migrations/elasticsearch_searchguard:latest', | ||
'migrations/migration_console:latest', | ||
'migrations/reindex_from_snapshot:latest', | ||
'migrations/traffic_replayer:latest', | ||
'migrations/otel_collector:latest', | ||
'opensearchproject/opensearch:2', | ||
]; | ||
|
||
return { | ||
execSync: jest.fn().mockImplementation((command: string) => { | ||
if (expectedDockerImages.some(expectedImage => command.endsWith(expectedImage))) { | ||
if (command.startsWith('docker inspect')) { | ||
return Buffer.from("sha256:a6cdbbcf16c510f8e24c6b993"); | ||
} | ||
if (command.startsWith('docker pull')) { | ||
return Buffer.from(""); | ||
} | ||
} | ||
throw new Error(`Command not supported: ${command}`); | ||
}), | ||
// Uncomment and replace above to use the actual execSync, requires ./buildDockerImages.sh to be run locally | ||
// execSync: child_process.execSync, | ||
spawnSync: child_process.spawnSync, | ||
}; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters