Adding expect to input username password
Some checks failed
OSC Pull Custom Image Demo / opensuse osc custom container checkout test (push) Failing after 44s
Some checks failed
OSC Pull Custom Image Demo / opensuse osc custom container checkout test (push) Failing after 44s
Signed-off-by: Alex Lau (AvengerMoJo) <alau@suse.com>
This commit is contained in:
parent
fac40dee31
commit
c157ed7013
@ -1,7 +1,7 @@
|
|||||||
FROM opensuse/tumbleweed:latest
|
FROM opensuse/tumbleweed:latest
|
||||||
|
|
||||||
RUN zypper --non-interactive update
|
RUN zypper --non-interactive update
|
||||||
RUN zypper --non-interactive install osc
|
RUN zypper --non-interactive install osc expect
|
||||||
RUN zypper --non-interactive clean --all
|
RUN zypper --non-interactive clean --all
|
||||||
|
|
||||||
COPY test.sh /test.sh
|
COPY test.sh /test.sh
|
||||||
|
11
test.sh
11
test.sh
@ -1,8 +1,13 @@
|
|||||||
#!/bin/sh -l
|
#!/usr/bin/expect
|
||||||
|
|
||||||
|
|
||||||
# echo $1 $2 $3
|
# echo $1 $2 $3
|
||||||
# echo "${osc_user} ${osc_path} ${osc_package}"
|
# echo "${osc_user} ${osc_path} ${osc_package}"
|
||||||
# echo "${INPUT_OSC_USER} ${INPUT_OSC_PATH} ${INPUT_OSC_PACKAGE}"
|
# echo "${INPUT_OSC_USER} ${INPUT_OSC_PATH} ${INPUT_OSC_PACKAGE}"
|
||||||
osc checkout $INPUT_OSC_PATH $INPUT_OSC_PACKAGE
|
spawn osc checkout $INPUT_OSC_PATH $INPUT_OSC_PACKAGE
|
||||||
osc buildlog openSUSE_Factory x86_64
|
expect "Username [api.opensuse.org]:\n"
|
||||||
|
send "$env(INPUT_OSC_USER)\n"
|
||||||
|
expect "Password [@api.opensuse.org]:\n"
|
||||||
|
send "$env(osc_pass)\n"
|
||||||
|
spawn osc buildlog openSUSE_Factory x86_64
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user