mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-06 10:44:36 +01:00
f40eb993a0
* add drone to master copyright update update update update update update build process * update * package migrator
28 lines
485 B
Python
Executable File
28 lines
485 B
Python
Executable File
#!/usr/bin/python
|
|
|
|
import pexpect
|
|
import os
|
|
import sys
|
|
import time
|
|
import socket
|
|
|
|
ip = socket.gethostbyname(socket.gethostname())
|
|
cmd = "docker push "+ip+"/library/tomcat:latest"
|
|
passw = "Harbor12345"
|
|
child = pexpect.spawn(cmd)
|
|
time.sleep(5)
|
|
|
|
child.expect(':')
|
|
child.sendline(passw)
|
|
time.sleep(1)
|
|
child.expect(':')
|
|
child.sendline(passw)
|
|
time.sleep(1)
|
|
child.expect(':')
|
|
child.sendline(passw)
|
|
time.sleep(1)
|
|
child.expect(':')
|
|
child.sendline(passw)
|
|
time.sleep(1)
|
|
child.expect(pexpect.EOF)
|