1
0
Fork 0
forked from glenux/mfm

Compare commits

..

3 commits

5 changed files with 18 additions and 39 deletions

29
Jenkinsfile vendored
View file

@ -1,29 +0,0 @@
pipeline {
agent any
stages {
stage('Build') {
agent {
docker {
image 'crystallang/crystal:1.11.0-alpine'
reuseNode true
}
}
steps {
sh 'shards install'
sh 'shards build --production --static'
}
}
stage('Test') {
steps {
echo 'Testing..'
}
}
stage('Deploy') {
steps {
echo 'Deploying....'
}
}
}
}

View file

@ -31,6 +31,6 @@ Log.setup do |config|
end end
end end
app = GX::Cli.new cli = GX::Cli.new
app.parse_command_line(ARGV) cli.parse_command_line(ARGV)
app.run cli.run

View file

@ -13,6 +13,7 @@ module GX::Models
getter remote_user : String = "" getter remote_user : String = ""
getter remote_host : String = "" getter remote_host : String = ""
getter remote_port : String = "22" getter remote_port : String = "22"
getter options : Array(String) = [] of String
include Concerns::Base include Concerns::Base
@ -28,13 +29,19 @@ module GX::Models
mount_point_safe = @mount_point mount_point_safe = @mount_point
raise InvalidMountpointError.new("Invalid mount point") if mount_point_safe.nil? raise InvalidMountpointError.new("Invalid mount point") if mount_point_safe.nil?
options = [] of String
# merge sshfs options
@options.each do |option|
options.push("-o", option)
end
options.push("-p", remote_port)
options.push(
"#{@remote_user}@#{@remote_host}:#{@remote_path}",
mount_point_safe
)
process = Process.new( process = Process.new(
"sshfs", "sshfs",
[ options,
"-p", remote_port,
"#{@remote_user}@#{@remote_host}:#{@remote_path}",
mount_point_safe,
],
input: STDIN, input: STDIN,
output: STDOUT, output: STDOUT,
error: STDERR error: STDERR
@ -43,3 +50,4 @@ module GX::Models
end end
end end
end end