diff --git a/scripts/build/bootstrap/incremental_build_util.py b/scripts/build/bootstrap/incremental_build_util.py index 10543d5951..101e31b5db 100644 --- a/scripts/build/bootstrap/incremental_build_util.py +++ b/scripts/build/bootstrap/incremental_build_util.py @@ -320,10 +320,14 @@ def mount_volume_to_device(created): time.sleep(1) else: - subprocess.call(['file', '-s', '/dev/xvdf']) + device_name = '/dev/xvdf' + nvme_device_name = '/dev/nvme1n1' + if os.path.exists(nvme_device_name): + device_name = nvme_device_name + subprocess.call(['file', '-s', device_name]) if created: - subprocess.call(['mkfs', '-t', 'ext4', '/dev/xvdf']) - subprocess.call(['mount', '/dev/xvdf', MOUNT_PATH]) + subprocess.call(['mkfs', '-t', 'ext4', device_name]) + subprocess.call(['mount', device_name, MOUNT_PATH]) def attach_volume_to_ec2_instance(volume, volume_id, instance_id, timeout_duration=DEFAULT_TIMEOUT): @@ -515,4 +519,4 @@ def main(action, snapshot_hint, repository_name, project, pipeline, branch, plat if __name__ == "__main__": args = parse_args() ret = main(args.action, args.snapshot_hint, args.repository_name, args.project, args.pipeline, args.branch, args.platform, args.build_type, args.disk_size, args.disk_type) - sys.exit(ret) \ No newline at end of file + sys.exit(ret)