Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-build-utils
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
korinf
etersoft-build-utils
Commits
5b531f1e
Commit
5b531f1e
authored
Oct 18, 2017
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpmbs: improve task and subtask handling
parent
f34bf628
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
1 deletion
+24
-1
rpmbs
bin/rpmbs
+24
-1
No files found.
bin/rpmbs
View file @
5b531f1e
...
...
@@ -256,15 +256,23 @@ if [ -n "$UPLOADNOW" ] && is_gear $SPECDIR ; then
# assure we have only specs or src.rpm
LISTNAMES
=
$(
repodirs_to_specs
$LISTNAMES
)
if
[
-n
"
$PREPARETASK
"
]
;
then
if
[
-z
"
$TASKNUMBER
"
]
;
then
showcmd
"ssh
$GEARHOST
task ls"
TASKNUMBER
=
"
$(
ssh
$GEARHOST
task
ls
|
head
-n1
|
sed
-e
"s|^#
\(
[0-9]*
\)
.*|
\1
|g"
)
"
||
fatal
# hack "
fi
else
NUMSPECS
=
$(
estrlist count
$LISTNAMES
)
# if more then one spec, use common task
if
[
$NUMSPECS
-gt
1
]
&&
[
-z
"
$PREPARETASK
"
]
;
then
if
[
$NUMSPECS
-gt
1
]
;
then
PREPARETASK
=
internal
# FIXME: no pocket support on git.eter task new?
showcmd ssh
$GEARHOST
task new
$BINARYREPO
TASKNUMBER
=
$(
ssh
$GEARHOST
task new
$BINARYREPO
|
head
-n1
)
||
fatal
[
-n
"
$TASKNUMBER
"
]
||
fatal
"Can't get task number from
$GEARHOST
"
fi
fi
for
ln
in
$LISTNAMES
;
do
# force SPECDIR
...
...
@@ -300,6 +308,14 @@ if [ -n "$UPLOADNOW" ] && is_gear $SPECDIR ; then
echo
"Run build
$PROJECTNAME
at
$GEARHOST
"
# FIXME: tee hangup during first call with ssh ControlMaster
if
[
-n
"
$PREPARETASK
"
]
;
then
showcmd
"GIT_ALT=
$GEARHOST
girar-show
$TASKNUMBER
@"
SUBTASK
=
"
$(
GIT_ALT
=
$GEARHOST
girar-show
$TASKNUMBER
@ |
grep
"/
$PROJECTNAME
.git"
|
sed
-e
"s|.*#
\(
[0-9]*
\)
.*|
\1
|g"
)
"
# hack "
if
[
-n
"
$SUBTASK
"
]
&&
!
echo
"
$TASKNUMBER
"
|
grep
-q
" "
;
then
info
"
$PROJECTNAME
already in task as subtask
$SUBTASK
, replacing"
docmd ssh
$GEARHOST
task delsub
$TASKNUMBER
$SUBTASK
TASKNUMBER
=
"
$TASKNUMBER
$SUBTASK
"
fi
docmd ssh
$GEARHOST
task add
$TASKNUMBER
repo
$PROJECTNAME
$TAG
2>&1 |
tee
$RPMDIR
/uploaded.log.tmp
else
docmd ssh
$GEARHOST
build
$(
usearg
-b
$BINARYREPO
sisyphus
)
$(
usearg
-p
$POCKET
)
$PROJECTNAME
$TAG
2>&1 |
tee
$RPMDIR
/uploaded.log.tmp
...
...
@@ -314,6 +330,13 @@ if [ -n "$UPLOADNOW" ] && is_gear $SPECDIR ; then
cd
-
>
/dev/null
done
if
[
-n
"
$TASKNUMBER
"
]
;
then
# TODO: separate TASKNUMBER and SUBTASKNUMBER
RTASKNUMBER
=
$(
echo
"
$TASKNUMBER
"
|
sed
-e
"s| .*||g"
)
showcmd
"GIT_ALT=
$GEARHOST
girar-show
$RTASKNUMBER
@"
GIT_ALT
=
$GEARHOST
girar-show
"
$RTASKNUMBER
@"
fi
# if more then one spec, use common task
if
[
"
$PREPARETASK
"
=
"internal"
]
;
then
docmd ssh
$GEARHOST
task run
$TASKNUMBER
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment