Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
orchestra
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
9
Issues
9
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PERE Alexandre
orchestra
Commits
815fe79b
Commit
815fe79b
authored
Dec 11, 2019
by
Alexandre Pere
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes absolute path bug
parent
8b2221f9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
8 deletions
+14
-8
runaway-cli/Cargo.toml
runaway-cli/Cargo.toml
+1
-0
runaway-cli/src/subcommands/batch.rs
runaway-cli/src/subcommands/batch.rs
+9
-7
runaway-cli/src/subcommands/sched.rs
runaway-cli/src/subcommands/sched.rs
+4
-1
No files found.
runaway-cli/Cargo.toml
View file @
815fe79b
...
...
@@ -23,4 +23,5 @@ tracing = "0.1.10"
tracing-attributes
=
"0.1.5"
tracing-futures
=
{
version
=
"0.1.0"
,
features
=
["futures-preview"]
}
openssl-probe
=
"0.1.2"
path_abs
=
"0.5.0"
liborchestra
=
{
path
=
"../liborchestra"
}
runaway-cli/src/subcommands/batch.rs
View file @
815fe79b
...
...
@@ -32,6 +32,7 @@ use rand::{self, Rng};
use
std
::
io
::
Write
;
use
tracing
::{
self
,
error
,
debug
,
info
,
warn
};
use
liborchestra
::
commons
::
format_env
;
use
path_abs
::
PathAbs
;
//--------------------------------------------------------------------------------------- SUBCOMMAND
...
...
@@ -518,7 +519,9 @@ async fn perform_on_node(store: EnvironmentStore,
local_output_folder
=
remote_folder
.clone
();
}
else
{
let
local_output_string
=
substitute_environment
(
&
execution_context
.envs
,
output_folder_pattern
.as_str
());
local_output_folder
=
to_exit!
(
PathBuf
::
from
(
local_output_string
)
.canonicalize
(),
Exit
::
OutputFolder
)
?
;
let
abs_local_output_folder
=
to_exit!
(
PathAbs
::
new
(
local_output_string
),
Exit
::
OutputFolder
)
?
;
let
abs_local_output_folder
:
&
PathBuf
=
abs_local_output_folder
.as_ref
();
local_output_folder
=
abs_local_output_folder
.to_owned
();
}
debug!
(
"Local output folder set to: {}"
,
local_output_folder
.to_str
()
.unwrap
());
if
!
local_output_folder
.exists
(){
...
...
@@ -606,13 +609,12 @@ fn unpacks_fetch_post_proc(matches: &clap::ArgMatches<'_>,
// We execute the post processing
debug!
(
"Executing post script"
);
let
command_string
=
if
matches
.is_present
(
"post-script"
){
let
path_str
=
PathBuf
::
from
(
matches
.value_of
(
"post-script"
)
.unwrap
())
.canonicalize
()
.unwrap
()
.to_str
()
let
path
=
PathBuf
::
from
(
matches
.value_of
(
"post-script"
)
.unwrap
());
let
path
=
to_exit!
(
path
.canonicalize
(),
Exit
::
PostScriptPath
)
?
;
let
path
=
path
.to_str
()
.unwrap
()
.to_owned
();
format!
(
"bash {}"
,
path
_str
)
format!
(
"bash {}"
,
path
)
}
else
{
matches
.value_of
(
"post-command"
)
.unwrap
()
.to_owned
()
};
...
...
runaway-cli/src/subcommands/sched.rs
View file @
815fe79b
...
...
@@ -32,6 +32,7 @@ use std::convert::TryInto;
use
rand
::{
self
,
Rng
};
use
std
::
io
::
Write
;
use
tracing
::{
self
,
info
,
error
,
debug
};
use
path_abs
::
PathAbs
;
//--------------------------------------------------------------------------------------- SUBCOMMAND
...
...
@@ -459,7 +460,9 @@ async fn perform_on_node(store: EnvironmentStore,
local_output_folder
=
remote_folder
.clone
();
}
else
{
let
local_output_string
=
substitute_environment
(
&
execution_context
.envs
,
output_folder_pattern
);
local_output_folder
=
to_exit!
(
PathBuf
::
from
(
local_output_string
)
.canonicalize
(),
Exit
::
OutputFolder
)
?
;
let
abs_local_output_folder
=
to_exit!
(
PathAbs
::
new
(
local_output_string
),
Exit
::
OutputFolder
)
?
;
let
abs_local_output_folder
:
&
PathBuf
=
abs_local_output_folder
.as_ref
();
local_output_folder
=
abs_local_output_folder
.to_owned
();
}
debug!
(
"Local output folder set to: {}"
,
local_output_folder
.to_str
()
.unwrap
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment