Skip to content
This repository was archived by the owner on Aug 16, 2021. It is now read-only.

Commit 45c456a

Browse files
authored
Merge pull request #35 from startupturbo/docker_cp
Make full/local tests to work in CircleCI
2 parents 76fa9be + 28ba3d8 commit 45c456a

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
- run:
99
name: Install software
1010
command: |
11-
apt-get update && apt-get install -y sudo wget \
11+
apt-get update && apt-get install -y sudo wget jq \
1212
&& wget get.docker.com -q -S -O - | sudo sh
1313
- checkout
1414
- setup_remote_docker

nancy_run.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,9 @@ function copyFile() {
625625
docker_exec s3cmd sync $1 $MACHINE_HOME/
626626
else
627627
if [ "$RUN_ON" = "localhost" ]; then
628-
ln ${1/file:\/\//} "$TMP_PATH/nancy_$containerHash/" # TODO: option – hard links OR regular `cp`
628+
#ln ${1/file:\/\//} "$TMP_PATH/nancy_$containerHash/"
629+
# TODO: option – hard links OR regular `cp`
630+
docker cp ${1/file:\/\//} $containerHash:$MACHINE_HOME/
629631
elif [ "$RUN_ON" = "aws" ]; then
630632
docker-machine scp $1 $DOCKER_MACHINE:/home/ubuntu/nancy_${containerHash}
631633
else
@@ -724,8 +726,11 @@ else
724726
)
725727
docker_exec bash -c "gzip -c $logpath > $MACHINE_HOME/$ARTIFACTS_FILENAME.log.gz"
726728
if [ "$RUN_ON" = "localhost" ]; then
727-
cp "$TMP_PATH/nancy_$containerHash/"$ARTIFACTS_FILENAME.json $ARTIFACTS_DESTINATION/
728-
cp "$TMP_PATH/nancy_$containerHash/"$ARTIFACTS_FILENAME.log.gz $ARTIFACTS_DESTINATION/
729+
docker cp $containerHash:$MACHINE_HOME/$ARTIFACTS_FILENAME.json $ARTIFACTS_DESTINATION/
730+
docker cp $containerHash:$MACHINE_HOME/$ARTIFACTS_FILENAME.log.gz $ARTIFACTS_DESTINATION/
731+
# TODO option: ln / cp
732+
#cp "$TMP_PATH/nancy_$containerHash/"$ARTIFACTS_FILENAME.json $ARTIFACTS_DESTINATION/
733+
#cp "$TMP_PATH/nancy_$containerHash/"$ARTIFACTS_FILENAME.log.gz $ARTIFACTS_DESTINATION/
729734
elif [ "$RUN_ON" = "aws" ]; then
730735
docker-machine scp $DOCKER_MACHINE:/home/ubuntu/nancy_$containerHash/$ARTIFACTS_FILENAME.json $ARTIFACTS_DESTINATION/
731736
docker-machine scp $DOCKER_MACHINE:/home/ubuntu/nancy_$containerHash/$ARTIFACTS_FILENAME.log.gz $ARTIFACTS_DESTINATION/

tests/nancy_run_localhost_simple_dump.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/bin/bash
22

3-
echo "SKIP" && exit 0
4-
53
thisDir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
64
parentDir="$(dirname "$thisDir")"
75
srcDir="$parentDir/.circleci"
@@ -13,7 +11,7 @@ nancyRun="$parentDir/nancy_run.sh"
1311
output=$(
1412
$nancyRun --workload-custom-sql "file://$srcDir/custom.sql" \
1513
--db-dump-path "file://$srcDir/test.dump.bz2" \
16-
--tmp-path $srcDir/tmp
14+
--tmp-path $srcDir/tmp 2>&1
1715
)
1816

1917
if [[ $output =~ "Queries duration:" ]]; then

tests/nancy_run_localhost_simple_dump_with_index.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/bin/bash
22

3-
echo "SKIP" && exit 0
4-
53
thisDir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
64
parentDir="$(dirname "$thisDir")"
75
srcDir="$parentDir/.circleci"
@@ -15,7 +13,7 @@ output=$(
1513
--tmp-path ${srcDir}/tmp \
1614
--db-dump-path "file://$srcDir/test.dump.bz2" \
1715
--target-ddl-do "file://$srcDir/ddl_create_index.sql" \
18-
--target-ddl-undo "file://$srcDir/ddl_drop_index.sql"
16+
--target-ddl-undo "file://$srcDir/ddl_drop_index.sql" 2>&1
1917
)
2018

2119
if [[ $output =~ "Queries duration:" ]]; then

0 commit comments

Comments
 (0)