diff --git a/dvc/command/import_file.py b/dvc/command/import_file.py index e6530bf8b..390b79558 100644 --- a/dvc/command/import_file.py +++ b/dvc/command/import_file.py @@ -47,7 +47,7 @@ class CmdImportFile(CmdBase): targets.append((filename, out)) pass - self.import_files(targets, self.parsed_args.lock) + self.import_files(targets, self.parsed_args.lock, self.parsed_args.jobs) message = 'DVC import files: {} -> {}'.format(str(self.parsed_args.input), output) self.commit_if_needed(message) pass @@ -113,9 +113,9 @@ class CmdImportFile(CmdBase): return data_targets - def import_files(self, targets, lock=False): + def import_files(self, targets, lock=False, jobs=1): data_targets = self.collect_targets(targets) - imported_targets = self.cloud.import_data(data_targets, self.parsed_args.jobs) + imported_targets = self.cloud.import_data(data_targets, jobs) self.create_state_files(imported_targets, lock) def create_state_files(self, targets, lock): diff --git a/functest/test-import.sh b/functest/test-import.sh index 3a4aee612..75ab62857 100755 --- a/functest/test-import.sh +++ b/functest/test-import.sh @@ -14,7 +14,7 @@ dvc_info "Import from http url" dvc import $DATA_S3/Tags.xml data/http dvc_check_files "data/http" -if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then +if [[ "$TRAVIS_PULL_REQUEST" == "false" && "$TRAVIS_SECURE_ENV_VARS" == "true" ]]; then dvc_info "Import from s3 url" dvc config aws.region $REGION dvc import s3://dataversioncontrol/functests/stackoverflow_raw_small/Tags.xml data/s3 diff --git a/functest/test-sync-aws.sh b/functest/test-sync-aws.sh index 103495d76..798565c13 100755 --- a/functest/test-sync-aws.sh +++ b/functest/test-sync-aws.sh @@ -4,7 +4,7 @@ set -e source common.sh -if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then +if [[ "$TRAVIS_PULL_REQUEST" == "false" && "$TRAVIS_SECURE_ENV_VARS" == "true" ]]; then dvc_create_repo dvc_info "Setting up AWS cloud"