Skip to content

Commit

Permalink
chore(shell): make shell script without preinstall jq package
Browse files Browse the repository at this point in the history
  • Loading branch information
neilkuan committed Oct 20, 2020
1 parent 73c1fa5 commit d2aa204
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions 01-install-eks-cluster/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
set -e
set -x

sudo apt install jq -y
export EKS_ADMIN_IAM_USERNAME=`aws sts get-caller-identity | jq '.Arn' | cut -d '"' -s -f2`
export EKS_ADMIN_IAM_USERNAME=`aws sts get-caller-identity --query Arn --output text`
echo $EKS_ADMIN_IAM_USERNAME
pip3 install --no-cache-dir -r requirements.txt
cdk bootstrap
Expand Down
2 changes: 1 addition & 1 deletion 02-install-istio-jenkins/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ sudo apt-get install -y kubectl

EKS_CLUSTER_NAME=`aws eks list-clusters | grep jenkinsworkshopekscontrolplane | cut -d '"' -s -f2`
EKS_ADMIN_ARN=`aws iam list-roles | grep jenkins-workshop-eks-cluster-AdminRole | grep Arn | cut -d'"' -s -f4`
EKS_CLUSTER_ARN=`aws eks describe-cluster --name $EKS_CLUSTER_NAME | jq '.cluster.arn' | cut -d '"' -s -f2`
EKS_CLUSTER_ARN=`aws eks describe-cluster --name $EKS_CLUSTER_NAME --query cluster.arn --output text`

aws eks update-kubeconfig --region ap-northeast-2 --name $EKS_CLUSTER_NAME --role-arn $EKS_ADMIN_ARN

Expand Down
2 changes: 1 addition & 1 deletion uninstall/uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ aws secretsmanager delete-secret --secret-id slack-token-aws --force-delete-with
sleep 25
aws secretsmanager describe-secret --secret-id 'slack-token-aws'

export EKS_ADMIN_IAM_USERNAME=`aws sts get-caller-identity | jq '.Arn' | cut -d '"' -s -f2`
export EKS_ADMIN_IAM_USERNAME=`aws sts get-caller-identity --query Arn --output text`

cd ../01-install-eks-cluster
cdk destroy -f vpc-stack jenkins-workshop-eks-cluster ecr-repository
Expand Down

0 comments on commit d2aa204

Please sign in to comment.