Sha256: 983ac3eee53d36c167ce30eca4eea2422573b3daf66e5f8c788752cbf8837f38

Contents?: true

Size: 391 Bytes

Versions: 7

Compression:

Stored size: 391 Bytes

Contents

#!/bin/bash -xe

TASK_ARN=$(cat /tmp/sonic/task-arn.txt)
CONTAINER_ID=$(curl -s http://localhost:51678/v1/tasks | jq ".Tasks[] | select(.Arn ==  \"$TASK_ARN\")" | jq -r '.Containers[].DockerId' | head -1)

# Got all the info in memory now we need os we can clean the files
# rm -rf /tmp/sonic

if [ $1 ]; then
  COMMAND=$@
else
  COMMAND=bash
fi

exec docker exec -ti $CONTAINER_ID $COMMAND

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
sonic-screwdriver-1.4.0 lib/bash_scripts/docker-exec.sh
sonic-screwdriver-1.3.2 lib/bash_scripts/docker-exec.sh
sonic-screwdriver-1.3.0 lib/bash_scripts/docker-exec.sh
sonic-screwdriver-1.2.0 lib/bash_scripts/docker-exec.sh
sonic-screwdriver-1.1.1 lib/bash_scripts/docker-exec.sh
sonic-screwdriver-1.1.0 lib/bash_scripts/docker-exec.sh
sonic-screwdriver-1.0.0 lib/bash_scripts/docker-exec.sh