13 Commits
v2 ... v4

Author SHA1 Message Date
574d615ec5 Installing the rpm in binaryies folder
All checks were successful
OSC Pull Custom Image Demo / opensuse osc custom container checkout test (push) Successful in 6s
Signed-off-by: Alex Lau (AvengerMoJo) <alau@suse.com>
2023-11-15 16:28:05 +08:00
cfe9d3eba7 Testing the getbinaries in the workflow
All checks were successful
OSC Pull Custom Image Demo / opensuse osc custom container checkout test (push) Successful in 7s
Signed-off-by: Alex Lau (AvengerMoJo) <alau@suse.com>
2023-11-15 16:06:42 +08:00
d6162dc83d Back to normal test runner update container image
All checks were successful
OSC Pull Custom Image Demo / opensuse osc custom container checkout test (push) Successful in 4s
Signed-off-by: Alex Lau (AvengerMoJo) <alau@suse.com>
2023-11-13 16:26:03 +08:00
550faf9c6b Test new runner by just updating the Dockerfile
Some checks failed
OSC Pull Custom Image Demo / opensuse osc custom container checkout test (push) Failing after 2s
Signed-off-by: Alex Lau (AvengerMoJo) <alau@suse.com>
2023-11-13 16:20:07 +08:00
30d9006d70 test build
All checks were successful
OSC Pull Custom Image Demo / opensuse osc custom container checkout test (push) Successful in 1m35s
Signed-off-by: Alex Lau (AvengerMoJo) <alau@suse.com>
2023-10-31 15:00:38 +08:00
a864c9c815 Remove test
Some checks failed
OSC Pull Custom Image Demo / opensuse osc custom container checkout test (push) Failing after 54s
Signed-off-by: Alex Lau (AvengerMoJo) <alau@suse.com>
2023-10-31 14:29:05 +08:00
a41e79f7ae Testing another build syntax
Some checks failed
OSC Pull Custom Image Demo / build (push) Failing after 5s
OSC Pull Custom Image Demo / opensuse osc custom container checkout test (push) Failing after 4s
Signed-off-by: Alex Lau (AvengerMoJo) <alau@suse.com>
2023-10-31 14:24:20 +08:00
05cc6b573a Adding a build command
Some checks failed
OSC Pull Custom Image Demo / opensuse osc custom container checkout test (push) Failing after 0s
Signed-off-by: Alex Lau (AvengerMoJo) <alau@suse.com>
2023-10-31 14:13:03 +08:00
aed408096c Create v4 flag to trigger rebuild
Some checks failed
OSC Pull Custom Image Demo / opensuse osc custom container checkout test (push) Failing after 1s
Signed-off-by: Alex Lau (AvengerMoJo) <alau@suse.com>
2023-10-31 13:36:47 +08:00
22b5342e38 Copy the new script to dockerfile
All checks were successful
OSC Pull Custom Image Demo / opensuse osc custom container checkout test (push) Successful in 1s
Signed-off-by: Alex Lau (AvengerMoJo) <alau@suse.com>
2023-10-31 13:12:58 +08:00
527b90605c Finish a checkout and buildlog cycle
All checks were successful
OSC Pull Custom Image Demo / opensuse osc custom container checkout test (push) Successful in 1s
Signed-off-by: Alex Lau (AvengerMoJo) <alau@suse.com>
2023-10-31 13:07:52 +08:00
d898fcca59 Push v3 for test
All checks were successful
OSC Pull Custom Image Demo / opensuse osc custom container checkout test (push) Successful in 1s
Signed-off-by: Alex Lau (AvengerMoJo) <alau@suse.com>
2023-10-31 10:49:06 +08:00
e2ae5bab94 test build
Some checks failed
OSC Pull Custom Image Demo / opensuse osc custom container checkout test (push) Failing after 1s
Signed-off-by: Alex Lau (AvengerMoJo) <alau@suse.com>
2023-10-30 16:49:51 +08:00
6 changed files with 49 additions and 20 deletions

View File

@@ -1,13 +1,15 @@
name: OSC Pull Custom Image Demo
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on: [push]
on:
push:
branches: [ factory ]
jobs:
osc_job:
runs-on: ubuntu-latest
name: opensuse osc custom container checkout test
steps:
- name: Build action step
uses: https://src.opensuse.org/alexlau/bc@v2
uses: https://src.opensuse.org/alexlau/bc@v4
with:
osc_user: 'alexlau'
osc_path: 'home:alexlau:branches:Base:System'

View File

@@ -4,7 +4,11 @@ RUN zypper --non-interactive update
RUN zypper --non-interactive install osc expect
RUN zypper --non-interactive clean --all
COPY test.sh /test.sh
#COPY runner.sh /runner.sh
# RUN chmod +x /runner.sh
ENTRYPOINT ["/test.sh"]
#COPY test.sh /test.sh
COPY runner.sh /runner.sh
COPY osc_buildlog.sh /osc_buildlog.sh
RUN chmod +x /osc_buildlog.sh
COPY osc_checkout /osc_checkout
RUN chmod +x /osc_checkout
# ENTRYPOINT ["/test.sh"]
ENTRYPOINT ["/runner.sh"]

15
osc_buildlog.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/sh -l
# echo $1 $2 $3
# echo "${osc_user} ${osc_path} ${osc_package}"
# echo "${INPUT_OSC_USER} ${INPUT_OSC_PATH} ${INPUT_OSC_PACKAGE}"
# osc checkout $INPUT_OSC_PATH $INPUT_OSC_PACKAGE
cd "${INPUT_OSC_PATH}/${INPUT_OSC_PACKAGE}"
osc buildlog openSUSE_Factory x86_64
echo "Getting binaries from the obs";
osc getbinaries openSUSE_Factory x86_64
ls binaries
rpm -Uvh binaries/*.rpm

20
osc_checkout Executable file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/expect -f
# echo $1 $2 $3
# echo "${osc_user} ${osc_path} ${osc_package}"
# echo "${INPUT_OSC_USER} ${INPUT_OSC_PATH} ${INPUT_OSC_PACKAGE}"
set timeout -1
spawn osc checkout "$env(INPUT_OSC_PATH)" "$env(INPUT_OSC_PACKAGE)"
expect {
-re "..*Username \\\[api.opensuse.org\\\]: " { send "$env(INPUT_OSC_USER)\r"; exp_continue }
-re "..*Password \\\[..*\@api.opensuse.org\\\]: " { send "$env(osc_pass)\r"; exp_continue }
-re "..*Select credentials manager \\\[default=1\\\]:" { send "3\r"; exp_continue }
-re "..*Password \\\[..*\@api.opensuse.org\\\]: " { send "$env(osc_pass)\r"; exp_continue }
-re "..*At revision (..*)" { puts $expect_out(1,string);
send "cd $env(INPUT_OSC_PATH)\r"; send "cd $env(INPUT_OSC_PACKAGE)\r";
send "osc buildlog openSUSE_Factory x86_64\r";
exp_continue }
}

View File

@@ -5,4 +5,5 @@ echo "${osc_user} ${osc_path} ${osc_package}"
echo "${INPUT_OSC_USER} ${INPUT_OSC_PATH} ${INPUT_OSC_PACKAGE}"
# osc checkout $INPUT_OSC_PATH $INPUT_OSC_PACKAGE
# osc buildlog openSUSE_Factory x86_64
/usr/bin/expect /osc_checkout
/osc_buildlog.sh

13
test.sh
View File

@@ -1,13 +0,0 @@
#!/usr/bin/expect
# echo $1 $2 $3
# echo "${osc_user} ${osc_path} ${osc_package}"
# echo "${INPUT_OSC_USER} ${INPUT_OSC_PATH} ${INPUT_OSC_PACKAGE}"
spawn osc checkout $INPUT_OSC_PATH $INPUT_OSC_PACKAGE
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