diff --git a/binaries_out_lists/smart_agent.txt b/binaries_out_lists/smart_agent.txt new file mode 100644 index 000000000..9da72550c --- /dev/null +++ b/binaries_out_lists/smart_agent.txt @@ -0,0 +1 @@ +smart_agent_server diff --git a/extract-docker-binaries.sh b/extract-docker-binaries.sh index 92afd3ece..bbb7d6b6b 100755 --- a/extract-docker-binaries.sh +++ b/extract-docker-binaries.sh @@ -9,20 +9,21 @@ set -e PROG_NAME=$0 usage() { cat << EOF >&2 -Usage: $PROG_NAME [-t TAG] [-d DOCKER_IMAGE_NAME] +Usage: $PROG_NAME [-t TAG] [-d DOCKER_IMAGE_NAME] package: emp_games - extracts the binaries from fbpcs/emp-games docker image data_processing - extracts the binaries from fbpcs/data-processing docker image pid - extracts the binaries from private-id docker image validation - extracts the binaries from the onedocker docker image + smart_agent - extracts the binaries from the onedocker docker image -t TAG: uses the image with the given tag (default: latest) -d DOCKER_IMAGE_NAME: defines the image name to extract from EOF exit 1 } -PACKAGES="emp_games data_processing pid validation" +PACKAGES="emp_games data_processing pid validation smart_agent" PACKAGE=$1 if [[ ! " $PACKAGES " =~ $PACKAGE ]]; then usage @@ -52,6 +53,7 @@ if [ -z "$DOCKER_IMAGE_NAME" ]; then data_processing) DOCKER_IMAGE_NAME="fbpcs/data-processing";; pid) DOCKER_IMAGE_NAME="fbpcs/onedocker/test";; validation) DOCKER_IMAGE_NAME="fbpcs/onedocker/test";; + smart_agent) DOCKER_IMAGE_NAME="fbpcs/onedocker/test";; esac fi DOCKER_IMAGE_PATH="${DOCKER_IMAGE_NAME}:${TAG}" @@ -102,3 +104,9 @@ docker create -ti --name temp_container "${DOCKER_IMAGE_PATH}" docker cp temp_container:/usr/local/bin/pc_pre_validation_cli "$SCRIPT_DIR/binaries_out/." docker rm -f temp_container fi + +if [ "$PACKAGE" = "smart_agent" ]; then +docker create -ti --name temp_container "${DOCKER_IMAGE_PATH}" +docker cp temp_container:/usr/local/bin/smart_agent_server "$SCRIPT_DIR/binaries_out/." +docker rm -f temp_container +fi diff --git a/promote_scripts/promote_binaries.sh b/promote_scripts/promote_binaries.sh index 43e6d0945..736894553 100755 --- a/promote_scripts/promote_binaries.sh +++ b/promote_scripts/promote_binaries.sh @@ -41,6 +41,7 @@ binary_names=( 'data_processing/attribution_id_combiner' 'data_processing/private_id_dfca_id_combiner' 'validation/pc_pre_validation_cli' + 'smart_agent/smart_agent_server' ) s3_path="s3://one-docker-repository-prod" diff --git a/upload-binaries-to-s3-test.sh b/upload-binaries-to-s3-test.sh index 9b6326193..74d3f46de 100755 --- a/upload-binaries-to-s3-test.sh +++ b/upload-binaries-to-s3-test.sh @@ -9,19 +9,20 @@ set -e PROG_NAME=$0 usage() { cat << EOF >&2 -Usage: $PROG_NAME +Usage: $PROG_NAME package: emp_games - extracts the binaries from fbpcs/emp-games docker image data_processing - extracts the binaries from fbpcs/data-processing docker image pid - extracts the binaries from private-id docker image validation - extracts the binaries from the onedocker docker image + smart_agent - extracts the binaries from the onedocker docker image tag: used to determine the subfolder/version in s3 for each binary EOF exit 1 } -PACKAGES="emp_games data_processing pid validation" +PACKAGES="emp_games data_processing pid validation smart_agent" PACKAGE=$1 TAG=$2 if [[ ! " $PACKAGES " =~ $PACKAGE ]] || [[ ! " $TAG " =~ $TAG ]]; then @@ -44,6 +45,7 @@ private_id_dfca_aggregator_package="s3://$one_docker_repo/private_id_dfca/privat data_processing_repo="s3://$one_docker_repo/data_processing" private_id_repo="s3://$one_docker_repo/pid" validation_repo="s3://$one_docker_repo/validation" +smart_agent_repo="s3://$one_docker_repo/smart_agent" if [ "$PACKAGE" = "emp_games" ]; then cd binaries_out || exit @@ -84,3 +86,8 @@ if [ "$PACKAGE" = "validation" ]; then cd binaries_out || exit aws s3 cp pc_pre_validation_cli "$validation_repo/pc_pre_validation_cli/${TAG}/pc_pre_validation_cli" fi + +if [ "$PACKAGE" = "smart_agent" ]; then +cd binaries_out || exit +aws s3 cp smart_agent_server "$smart_agent_repo/smart_agent_server/${TAG}/smart_agent_server" +fi diff --git a/upload_scripts/upload-binaries-using-onedocker.sh b/upload_scripts/upload-binaries-using-onedocker.sh index 35cd6d99b..3f0a1ae0e 100755 --- a/upload_scripts/upload-binaries-using-onedocker.sh +++ b/upload_scripts/upload-binaries-using-onedocker.sh @@ -9,13 +9,14 @@ set -e PROG_NAME=$0 usage() { cat << EOF >&2 -Usage: $PROG_NAME -c +Usage: $PROG_NAME -c package: emp_games - extracts the binaries from fbpcs/emp-games docker image data_processing - extracts the binaries from fbpcs/data-processing docker image pid - extracts the binaries from private-id docker image validation - extracts the binaries from the onedocker docker image + smart_agent - extracts the binaries from the onedocker docker image tag: used to determine the subfolder/version in s3 for each binary @@ -24,7 +25,7 @@ EOF exit 1 } -PACKAGES="emp_games data_processing pid validation" +PACKAGES="emp_games data_processing pid validation smart_agent" PACKAGE=$1 TAG=$2 @@ -104,3 +105,9 @@ cd binaries_out || exit onedocker_upload validation/pc_pre_validation_cli pc_pre_validation_cli cd .. || exit fi + +if [ "$PACKAGE" = "smart_agent" ]; then +cd binaries_out || exit +onedocker_upload smart_agent/smart_agent_server smart_agent_server +cd .. || exit +fi