harbor/tests/robot-cases/Group9-Content-trust/notary-push-image.py
Yan f40eb993a0 [BAT] add drone to master (#2942)
* add drone to master

copyright

update

update

update

update

update

update build process

* update

* package migrator
2017-08-07 14:02:38 +08:00

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)