Fix jenkins user not exist issue when installing gbs jenkins jobs and scripts
authorJunchun Guan <junchunx.guan@intel.com>
Thu, 15 Jan 2015 03:46:39 +0000 (11:46 +0800)
committerLi Jinjing <jinjingx.li@intel.com>
Mon, 19 Jan 2015 12:10:16 +0000 (20:10 +0800)
Make gbs-jenkins-jobs and gbs-jenkins-scritps depend on jenkins
Install jenkins from extra repo, this package will create jenkins user
Modify packages files owner to jenkins user

Fixes: #2311

Change-Id: I784306e66613cabe54e92276863834f452dd5749
Signed-off-by: Junchun Guan <junchunx.guan@intel.com>
debian/control
debian/gbs-jenkins-jobs.postinst [new file with mode: 0644]
debian/gbs-jenkins-scripts.postinst [new file with mode: 0644]
packaging/.extra-repos [new file with mode: 0644]
packaging/gbs.spec

index 0615d64..9bff4e4 100644 (file)
@@ -62,6 +62,7 @@ Description: GBS remotebuild API
 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.
 
@@ -69,6 +70,7 @@ Package: gbs-jenkins-scripts
 Architecture: all
 Depends: ${misc:Depends},
  gbs,
- mic
+ 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.
diff --git a/debian/gbs-jenkins-jobs.postinst b/debian/gbs-jenkins-jobs.postinst
new file mode 100644 (file)
index 0000000..48999c7
--- /dev/null
@@ -0,0 +1 @@
+chown -R jenkins. /var/lib/jenkins/jobs
diff --git a/debian/gbs-jenkins-scripts.postinst b/debian/gbs-jenkins-scripts.postinst
new file mode 100644 (file)
index 0000000..9e40947
--- /dev/null
@@ -0,0 +1 @@
+chown -R jenkins. /var/lib/jenkins/jenkins-scripts
diff --git a/packaging/.extra-repos b/packaging/.extra-repos
new file mode 100644 (file)
index 0000000..8179835
--- /dev/null
@@ -0,0 +1,10 @@
+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 /
index 7612f81..3741a0d 100644 (file)
@@ -79,6 +79,7 @@ external software.
 
 %package jenkins-jobs
 Summary: GBS local full build jenkins jobs configurations.
+Requires: jenkins
 
 %description jenkins-jobs
 These jenkins jobs are used to build tizen source from scratch or
@@ -88,6 +89,7 @@ only a part of packages, and create images finally.
 Summary:  Jenkins scripts used by gbs-jenkins-job
 Requires: gbs
 Requires: mic
+Requires: jenkins
 
 %description jenkins-scripts
 These scripts are used by GBS local full build jenkins jobs. These
@@ -160,7 +162,7 @@ rm -rf %{buildroot}
 %{python_sitelib}/gitbuildsys/cmd_remotebuild.py*
 
 %files jenkins-jobs
-%defattr(-,root,root,-)
+%defattr(-,jenkins,jenkins,-)
 %dir /var/lib/jenkins
 %dir %{jobs_dir}
 %dir %{jobs_dir}/GBS-local-full-build
@@ -169,7 +171,7 @@ rm -rf %{buildroot}
 %{jobs_dir}/GBS-local-build-with-package-list/config.xml
 
 %files jenkins-scripts
-%defattr(-,root,root,-)
+%defattr(-,jenkins,jenkins,-)
 %dir /var/lib/jenkins
 %dir %{scripts_dir}
 %{scripts_dir}/job_local_full_build