11import { exec } from 'child-process-promise' ;
22import * as kubectl from '../../helpers/kubectl' ;
33
4+ export async function setupTester ( ) : Promise < void > {
5+ // update the `aws` CLI, the one in CircleCI's default image is outdated and doens't support eks
6+ await exec ( 'pip install awscli --ignore-installed six' ) ;
7+
8+ // TODO: assert all the vars are present before starting the setup?
9+ // TODO: wipe out the data during teardown?
10+ await exec ( `aws configure set aws_access_key_id ${ process . env [ 'AWS_ACCESS_KEY_ID' ] } ` ) ;
11+ await exec ( `aws configure set aws_secret_access_key ${ process . env [ 'AWS_SECRET_ACCESS_KEY' ] } ` ) ;
12+ await exec ( `aws configure set region ${ process . env [ 'AWS_REGION' ] } ` ) ;
13+ }
14+
415export async function createCluster ( ) : Promise < void > {
516 throw new Error ( 'Not implemented' ) ;
617}
@@ -17,15 +28,6 @@ export async function exportKubeConfig(): Promise<void> {
1728export async function loadImageInCluster ( imageNameAndTag : string ) : Promise < string > {
1829 console . log ( `Loading image ${ imageNameAndTag } in ECR...` ) ;
1930
20- // update the `aws` CLI, the one in CircleCI's default image is outdated and doens't support eks
21- await exec ( 'pip install awscli --ignore-installed six' ) ;
22-
23- // TODO: assert all the vars are present before starting the setup?
24- // TODO: wipe out the data during teardown?
25- await exec ( `aws configure set aws_access_key_id ${ process . env [ 'AWS_ACCESS_KEY_ID' ] } ` ) ;
26- await exec ( `aws configure set aws_secret_access_key ${ process . env [ 'AWS_SECRET_ACCESS_KEY' ] } ` ) ;
27- await exec ( `aws configure set region ${ process . env [ 'AWS_REGION' ] } ` ) ;
28-
2931 const ecrLogin = await exec ( 'aws ecr get-login --region us-east-2 --no-include-email' ) ;
3032
3133 // aws ecr get-login returns something that looks like:
0 commit comments