Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
workspaces
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ssa
workspaces
Commits
05b45d3a
Commit
05b45d3a
authored
4 years ago
by
Nathan Hertz
Browse files
Options
Downloads
Patches
Plain Diff
Added username/password collection to ensure a connection to builder.
parent
a7e304f6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
build/tools/transfer_to_builder.py
+14
-5
14 additions, 5 deletions
build/tools/transfer_to_builder.py
with
14 additions
and
5 deletions
build/tools/transfer_to_builder.py
+
14
−
5
View file @
05b45d3a
import
subprocess
,
paramiko
,
fnmatch
,
os
import
subprocess
import
paramiko
import
fnmatch
import
os
import
getpass
from
scp
import
SCPClient
def
get_build_pkg_names
():
...
...
@@ -23,7 +28,11 @@ def create_ssh_client(server):
client
=
paramiko
.
SSHClient
()
client
.
load_system_host_keys
()
client
.
set_missing_host_key_policy
(
paramiko
.
AutoAddPolicy
())
client
.
connect
(
server
)
username
=
input
(
"
Enter NRAO username:
"
)
password
=
getpass
.
getpass
(
prompt
=
"
Enter NRAO password:
"
)
client
.
connect
(
server
,
username
=
username
,
password
=
password
)
return
client
def
transfer_packages
(
pkg_names
):
...
...
@@ -34,9 +43,9 @@ def transfer_packages(pkg_names):
if
len
(
pkg_names
):
builder_addr
=
"
builder.aoc.nrao.edu
"
builder_path
=
"
/home/builder.aoc.nrao.edu/content/conda/noarch
"
ssh
=
create_ssh_client
(
builder_addr
)
with
SCPClient
(
ssh
.
get_transport
())
as
scp
:
[
scp
.
put
(
pkg
,
builder_path
)
for
pkg
in
pkg_names
]
with
create_ssh_client
(
builder_addr
)
as
ssh
:
with
SCPClient
(
ssh
.
get_transport
())
as
scp
:
[
scp
.
put
(
pkg
,
builder_path
)
for
pkg
in
pkg_names
]
cmd_cd
=
"
cd {}
"
.
format
(
builder_path
)
cmd_index
=
"
conda index ..
"
cmd_chmod
=
"
chmod -f 664 *
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment