Start implementing new synchronization mechanism

This one is based on separate Git repositories for results.
This commit is contained in:
2019-03-01 15:57:35 +01:00
parent 8a05af9b25
commit 3c2d03dc38
3 changed files with 34 additions and 42 deletions

View File

@@ -18,11 +18,12 @@ fi
mkdir -p "$dir"
pushd "$dir"
git clone --single-branch --branch="$JOB_BRANCH_NAME" "$GIT_REMOTE_URL" repository
git config user.name "Potassco Bot"
git config user.email "bot@potassco.org"
git clone "$GIT_REMOTE_URL" repository
pushd repository
git config user.name "Potassco Bot"
git config user.email "bot@potassco.org"
echo "$JOB_BRANCH_NAME" > test-output
sleep 10
start_time=$(date +%s%N)

View File

@@ -14,7 +14,7 @@ fn main()
{
pretty_env_logger::init();
let benchmark_repository = BenchmarkRepository::new("git@git.luehne.de:patrick/tplp-planning-benchmark.git", Path::new("storage"), "git", "Potassco Bot", "bot@potassco.org");
let benchmark_repository = BenchmarkRepository::new("git@git.luehne.de:patrick/tplp-planning-benchmark.git", Path::new("cache").to_path_buf(), "git", "Potassco Bot", "bot@potassco.org");
let content = benchmark_repository.read_file(Path::new("configurations.yml"), "config").unwrap();
let configurations = &YamlLoader::load_from_str(&content).unwrap()[0]["configurations"];
@@ -45,12 +45,11 @@ fn main()
continue;
}
let branch_name = benchmark_repository.create_branch_for_job(i);
let result_repository = benchmark_repository.create_result_repository_for_job(i);
Command::new("sbatch")
.args(&["/home/pluehne/test-job.sh"])
.env("JOB_BRANCH_NAME", &branch_name)
.env("GIT_REMOTE_URL", &format!("file://{}", fs::canonicalize(&Path::new("storage")).unwrap().display()))
.env("GIT_REMOTE_URL", &format!("file://{}", fs::canonicalize(&result_repository).unwrap().display()))
.output()
.expect("Could not execute command");