Work in progress
This commit is contained in:
@@ -8,10 +8,10 @@
|
||||
tmp_dir=/home/pluehne/tmp
|
||||
|
||||
echo "job ID: $JOB_ID"
|
||||
echo "result repository: $GIT_REMOTE_URL"
|
||||
echo "result repository: $JOB_RESULT_REPOSITORY_URL"
|
||||
|
||||
mkdir -p "$tmp_dir"
|
||||
dir="$tmp_dir"/"$JOB_BRANCH_NAME"
|
||||
dir="$tmp_dir"/"job-$JOB_ID"
|
||||
|
||||
if [[ -d $dir ]]
|
||||
then
|
||||
@@ -21,15 +21,16 @@ fi
|
||||
mkdir -p "$dir"
|
||||
|
||||
pushd "$dir"
|
||||
git clone "$GIT_REMOTE_URL" repository
|
||||
git clone "$JOB_RESULT_REPOSITORY_URL" repository
|
||||
|
||||
pushd repository
|
||||
git config user.name "Potassco Bot"
|
||||
git config user.email "bot@potassco.org"
|
||||
|
||||
echo "$JOB_BRANCH_NAME" > test-output
|
||||
echo "start of benchmark output of job $JOB_ID" > test-output
|
||||
sleep 10
|
||||
start_time=$(date +%s%N)
|
||||
echo "end of benchmark output of job $JOB_ID" >> test-output
|
||||
git add test-output
|
||||
git commit -m "Test update"
|
||||
git push
|
||||
@@ -37,4 +38,4 @@ pushd "$dir"
|
||||
popd
|
||||
|
||||
echo $(expr "$end_time" - "$start_time") >> "$tmp_dir"/overhead
|
||||
popd
|
||||
popd
|
@@ -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("cache").to_path_buf(), "git", "Potassco Bot", "bot@potassco.org");
|
||||
let mut benchmark_repository = BenchmarkRepository::new("gitea@git.luehne.de:patrick/tplp-planning-benchmark.git", Path::new("cache").to_path_buf(), "gitea", "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,12 @@ fn main()
|
||||
continue;
|
||||
}
|
||||
|
||||
let result_repository = benchmark_repository.create_result_repository_for_job(i);
|
||||
let job = benchmark_repository.create_result_repository();
|
||||
|
||||
Command::new("sbatch")
|
||||
.args(&["/home/pluehne/test-job.sh"])
|
||||
.env("GIT_REMOTE_URL", &format!("file://{}", fs::canonicalize(&result_repository).unwrap().display()))
|
||||
.env("JOB_ID", format!("{}", i))
|
||||
.env("JOB_RESULT_REPOSITORY_URL", &format!("file://{}", fs::canonicalize(&job.result_repository_path).unwrap().display()))
|
||||
.env("JOB_ID", format!("{}", job.id))
|
||||
.output()
|
||||
.expect("Could not execute command");
|
||||
|
||||
|
Reference in New Issue
Block a user