Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Docker Build Images
scripts
Commits
0589a62c
Commit
0589a62c
authored
Jul 05, 2019
by
Markus Frosch
Browse files
Add support for ICINGA_BUILD_EXTRA_REPOSITORY on SUSE
parent
7627aad2
Pipeline
#4197
passed with stage
in 15 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
icinga-build-rpm-binary
View file @
0589a62c
...
...
@@ -12,6 +12,39 @@ if [ "$(echo "${source_rpm}" | wc -l)" -gt 1 ]; then
exit
1
fi
if
[
-n
"
${
ICINGA_BUILD_EXTRA_REPOSITORY
}
"
]
;
then
echo
"[ Update extra repository ]"
extra_repository
=
"
${
ICINGA_BUILD_EXTRA_REPOSITORY
}
"
if
[
-n
"
${
ICINGA_BUILD_EXTRA_REPOSITORY_BASE
}
"
]
;
then
extra_repository
=
"
${
ICINGA_BUILD_EXTRA_REPOSITORY_BASE
}
/
${
extra_repository
}
"
fi
# base
extra_name
=
icinga-build-extra
case
"
$ICINGA_BUILD_OS
"
in
opensuse
*
|
sles
)
if
[
-n
"
${
ICINGA_BUILD_EXTRA_REPOSITORY_USERNAME
}
"
]
;
then
echo
"Creating /etc/zypp/credentials.d/
${
extra_name
}
"
extra_repository
=
"
${
extra_repository
}
?credentials=
${
extra_name
}
"
(
echo
"username=
${
ICINGA_BUILD_EXTRA_REPOSITORY_USERNAME
}
"
echo
"password=
${
ICINGA_BUILD_EXTRA_REPOSITORY_PASSWORD
}
"
)
|
sudo
bash
-c
"cat >'/etc/zypp/credentials.d/
${
extra_name
}
'"
fi
(
set
-ex
sudo
zypper
--non-interactive
removerepo
"
${
extra_name
}
"
||
true
sudo
zypper
--non-interactive
addrepo
--priority
50
--refresh
"
${
extra_repository
}
"
"
${
extra_name
}
"
)
;;
*
)
# TODO: implement
echo
"Other OS than SUSE are not yet implemented!"
>
&2
#exit 1
;;
esac
# ICINGA_BUILD_OS
fi
# ICINGA_BUILD_EXTRA_REPOSITORY
echo
"[ Update package cache ]"
case
"
$ICINGA_BUILD_OS
"
in
opensuse
*
|
sles
)
...
...
Write
Preview
Supports
Markdown
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