mirror of
https://github.com/goharbor/harbor.git
synced 2024-08-26 22:09:36 +02:00
* 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)
|