dist/ci: extract common osc setup as osc-init and provide in /usr/bin.

This commit is contained in:
Jimmy Berry 2017-09-01 17:18:42 -05:00
parent 721bb1ed6a
commit a777ec97da
4 changed files with 13 additions and 14 deletions

1
dist/ci/Dockerfile vendored
View File

@ -34,3 +34,4 @@ COPY . /usr/src/app
# Already included in target, but simulate separate container image.
ADD dist/ci/obs-deploy /usr/bin/
ADD dist/ci/osc-init /usr/bin/

9
dist/ci/obs-deploy vendored
View File

@ -1,13 +1,6 @@
#!/bin/bash
cat << eom > ~/.oscrc
[general]
apiurl = https://api.opensuse.org
[https://api.opensuse.org]
user = $OBS_USER
pass = $OBS_PASS
email = $OBS_EMAIL
eom
osc-init
osc checkout "$OBS_PACKAGE"
cd "$OBS_PACKAGE"

10
dist/ci/osc-init vendored Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
cat << eom > ~/.oscrc
[general]
apiurl = https://api.opensuse.org
[https://api.opensuse.org]
user = ${OBS_USER:-example}
pass = ${OBS_PASS:-example}
email = ${OBS_EMAIL:-example@example.com}
eom

7
dist/ci/spec.sh vendored
View File

@ -17,12 +17,7 @@ rpmbuild --nocheck -bb -D "jobs `nproc`" dist/package/*.spec
rpm -iv --force --nodeps /usr/src/packages/RPMS/*/*.rpm
# Ensure the staging plugin starts.
cat << eom > ~/.oscrc
[general]
[https://api.opensuse.org]
user = example
pass = example
eom
osc-init
osc staging --version