Package: gbs-jenkins-jobs
Architecture: all
Depends: ${misc:Depends},
- jenkins
Description: GBS local full build jenkins jobs configurations.
These jenkins jobs are used to build tizen source from scratch or only a part of packages, and create images finally.
Depends: ${misc:Depends},
gbs,
mic,
- jenkins
Description: Jenkins scripts used by gbs-jenkins-job
These scripts are used by GBS local full build jenkins jobs. These scripts should be installed on Jenkins slave nodes.
--- /dev/null
+: ${JENKINS_USER:=jenkins}
+: ${JENKINS_GROUP:=jenkins}
+
+# Create jenkins group and user if they don't exist.
+# sometimes tools that users want Jenkins to run need a shell,
+# so use /bin/bash. See JENKINS-4830
+if ! getent group "$JENKINS_GROUP" > /dev/null; then
+ addgroup --system --quiet "$JENKINS_GROUP"
+fi
+if ! id "$JENKINS_USER" >/dev/null 2>&1 ; then
+ adduser --system --quiet --home /var/lib/jenkins --no-create-home \
+ --ingroup "$JENKINS_GROUP" --disabled-password --shell /bin/bash \
+ --gecos 'Jenkins' \
+ "$JENKINS_USER"
+fi
--- /dev/null
+: ${JENKINS_USER:=jenkins}
+: ${JENKINS_GROUP:=jenkins}
+
+# Create jenkins group and user if they don't exist.
+# sometimes tools that users want Jenkins to run need a shell,
+# so use /bin/bash. See JENKINS-4830
+if ! getent group "$JENKINS_GROUP" > /dev/null; then
+ addgroup --system --quiet "$JENKINS_GROUP"
+fi
+if ! id "$JENKINS_USER" >/dev/null 2>&1 ; then
+ adduser --system --quiet --home /var/lib/jenkins --no-create-home \
+ --ingroup "$JENKINS_GROUP" --disabled-password --shell /bin/bash \
+ --gecos 'Jenkins' \
+ "$JENKINS_USER"
+fi
+++ /dev/null
-openSUSE-12.3:http://linux-ftp.fi.intel.com/repo/jenkins/opensuse-stable
-openSUSE-13.1:http://linux-ftp.fi.intel.com/repo/jenkins/opensuse-stable
-Fedora-19:http://linux-ftp.fi.intel.com/repo/jenkins/redhat-stable
-Fedora-20:http://linux-ftp.fi.intel.com/repo/jenkins/redhat-stable
-CentOS-6.6:http://linux-ftp.fi.intel.com/repo/jenkins/redhat-stable
-CentOS-7:http://linux-ftp.fi.intel.com/repo/jenkins/redhat-stable
-Debian-7.8:deb http://linux-ftp.fi.intel.com/repo/jenkins/debian-stable /
-Ubuntu-12.04:deb http://linux-ftp.fi.intel.com/repo/jenkins/debian-stable /
-Ubuntu-14.04:deb http://linux-ftp.fi.intel.com/repo/jenkins/debian-stable /
-Ubuntu-14.10:deb http://linux-ftp.fi.intel.com/repo/jenkins/debian-stable /
%package jenkins-jobs
Summary: GBS local full build jenkins jobs configurations.
-Requires: jenkins
+PreReq: /usr/sbin/groupadd /usr/sbin/useradd
%description jenkins-jobs
These jenkins jobs are used to build tizen source from scratch or
%package jenkins-scripts
Summary: Jenkins scripts used by gbs-jenkins-job
+PreReq: /usr/sbin/groupadd /usr/sbin/useradd
Requires: gbs
Requires: mic
-Requires: jenkins
%description jenkins-scripts
These scripts are used by GBS local full build jenkins jobs. These
%{__python} setup.py build
make man
+%pre
+/usr/bin/getent group jenkins >/dev/null || /usr/sbin/groupadd -r jenkins &>/dev/null || :
+/usr/bin/getent passwd jenkins >/dev/null || /usr/sbin/useradd -g jenkins -s /bin/bash -r -c "Jenkins Continuous Build server" \
+ -d "%{workdir}" jenkins &>/dev/null || :
+
%install
%{__python} setup.py install --prefix=%{_prefix} --root=%{buildroot}