Skip to content
This repository

Bug 947092 [merge] #1900

Merged
merged 2 commits into from over 1 year ago

2 participants

Bill DeCoste OpenShift Bot
Bill DeCoste
Collaborator

No description provided.

OpenShift Bot
Collaborator

Online Merge Results: SUCCESS (https://ci.dev.openshift.redhat.com/jenkins/job/merge_pull_requests/2257/) (Image: devenv_3036)

OpenShift Bot
Collaborator

[Test]ing while waiting on the merge queue

OpenShift Bot
Collaborator

Evaluated for online up to 02ce55f

OpenShift Bot
Collaborator

Evaluated for origin up to 02ce55f

OpenShift Bot openshift-bot merged commit b8e9976 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 2 unique commits by 1 author.

Apr 03, 2013
Bill DeCoste bdecoste Bug 947092 da2e3b9
Bill DeCoste bdecoste Bug 947092 02ce55f
This page is out of date. Refresh to see the latest.
8 cartridges/openshift-origin-cartridge-jenkins-1.4/info/bin/app_ctl.sh
@@ -48,14 +48,18 @@ start_jenkins() {
48 48 if [ -f "${OPENSHIFT_REPO_DIR}/.openshift/markers/enable_debugging" ]; then
49 49 JENKINS_CMD="${JENKINS_CMD} -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=${OPENSHIFT_JENKINS_IP}:7600,suspend=n"
50 50 fi
  51 +
  52 + if [ -z $JENKINS_WAR_PATH ]; then
  53 + JENKINS_WAR_PATH=/usr/lib/jenkins/jenkins.war
  54 + fi
51 55
52   - JENKINS_CMD="${JENKINS_CMD} -DJENKINS_HOME=$OPENSHIFT_DATA_DIR/ \
  56 + JENKINS_CMD="${JENKINS_CMD} ${JENKINS_OPTS} -DJENKINS_HOME=$OPENSHIFT_DATA_DIR/ \
53 57 -Dhudson.slaves.NodeProvisioner.recurrencePeriod=500 \
54 58 -Dhudson.slaves.NodeProvisioner.initialDelay=100 \
55 59 -Dhudson.slaves.NodeProvisioner.MARGIN=100 \
56 60 -Dhudson.model.UpdateCenter.never=true \
57 61 -Dhudson.DNSMultiCast.disabled=true \
58   - -jar /usr/lib/jenkins/jenkins.war \
  62 + -jar ${JENKINS_WAR_PATH} \
59 63 --ajp13Port=-1 \
60 64 --controlPort=-1 \
61 65 --logfile=$OPENSHIFT_JENKINS_LOG_DIR/jenkins.log \
29 cartridges/openshift-origin-cartridge-jenkins-1.4/info/hooks/configure
@@ -16,32 +16,6 @@ function print_help {
16 16 exit 1
17 17 }
18 18
19   -function create_repo {
20   - application="$1"
21   - user_id=$2
22   - group_id=$3
23   - uuid=$4
24   -
25   - if [ ! -d $APP_HOME ]; then echo "ERROR: Application ${uuid} not found! Please create." 1>&2; exit 2; fi
26   -
27   - GIT_DIR=$APP_HOME/git/$application.git
28   - mkdir -p "$APP_HOME/git"
29   -
30   - cp -ad ${CARTRIDGE_BASE_PATH}/$cartridge_type/template $APP_HOME/git
31   -
32   - pushd $APP_HOME/git/template > /dev/null
33   - git init > /dev/null
34   - git add *
35   - git commit -m 'Creating template' > /dev/null
36   - popd > /dev/null
37   - pushd $APP_HOME/git > /dev/null
38   - git clone --bare --no-hardlinks template $application.git > /dev/null
39   - rm -rf template
40   - popd > /dev/null
41   -
42   - setup_git_repo $application $user_id $group_id $uuid "jenkins 1.4"
43   -}
44   -
45 19 function obfuscate_password {
46 20 password="$1"
47 21 acegi_security_path=`find ${APP_HOME}/app-root/data/war/WEB-INF/lib/ -name acegi-security-*.jar`
@@ -132,9 +106,10 @@ export JENKINS_PASSWORD=$system_builder_password
132 106 if [ ! -d $git_url ]; then
133 107 clone_external_git_repo $application $user_id $group_id $uuid $git_url
134 108 else
135   - create_repo $application $user_id $group_id $uuid
  109 + clone_git_repo $application $user_id $group_id $uuid "jenkins 1.4"
136 110 fi
137 111
  112 +
138 113 #
139 114 # Find an open localhost IP
140 115 #
14 cartridges/openshift-origin-cartridge-jenkins-1.4/openshift-origin-cartridge-jenkins-1.4.spec 100644 → 100755
@@ -26,7 +26,18 @@ Provides jenkins cartridge to openshift nodes
26 26
27 27
28 28 %build
29   -
  29 +rm -rf git_template
  30 +cp -r template/ git_template/
  31 +cd git_template
  32 +git init
  33 +git add -f .
  34 +git config user.email "builder@example.com"
  35 +git config user.name "Template builder"
  36 +git commit -m 'Creating template'
  37 +cd ..
  38 +git clone --bare git_template git_template.git
  39 +rm -rf git_template
  40 +touch git_template.git/refs/heads/.gitignore
30 41
31 42 %post
32 43 service jenkins stop
@@ -36,6 +47,7 @@ chkconfig jenkins off
36 47 %install
37 48 mkdir -p %{buildroot}%{cartridgedir}
38 49 mkdir -p %{buildroot}%{cartridgedir}/info/data/
  50 +cp -r git_template.git %{buildroot}%{cartridgedir}/info/data/
39 51 mkdir -p %{buildroot}/%{_sysconfdir}/openshift/cartridges
40 52 cp LICENSE %{buildroot}%{cartridgedir}/
41 53 cp COPYRIGHT %{buildroot}%{cartridgedir}/
5 cartridges/openshift-origin-cartridge-jenkins-1.4/template/.openshift/action_hooks/build
... ... @@ -1,5 +0,0 @@
1   -#!/bin/bash
2   -# This is a simple build script and will be executed on your CI system if
3   -# available. Otherwise it will execute while your application is stopped
4   -# before the deploy step. This script gets executed directly, so it
5   -# could be python, php, ruby, etc.
5 cartridges/openshift-origin-cartridge-jenkins-1.4/template/.openshift/action_hooks/deploy
... ... @@ -1,5 +0,0 @@
1   -#!/bin/bash
2   -# This deploy hook gets executed after dependencies are resolved and the
3   -# build hook has been run but before the application has been started back
4   -# up again. This script gets executed directly, so it could be python, php,
5   -# ruby, etc.
4 cartridges/openshift-origin-cartridge-jenkins-1.4/template/.openshift/action_hooks/post_deploy
... ... @@ -1,4 +0,0 @@
1   -#!/bin/bash
2   -# This is a simple post deploy hook executed after your application
3   -# is deployed and started. This script gets executed directly, so
4   -# it could be python, php, ruby, etc.
5 cartridges/openshift-origin-cartridge-jenkins-1.4/template/.openshift/action_hooks/pre_build
... ... @@ -1,5 +0,0 @@
1   -#!/bin/bash
2   -# This is a simple script and will be executed on your CI system if
3   -# available. Otherwise it will execute while your application is stopped
4   -# before the build step. This script gets executed directly, so it
5   -# could be python, php, ruby, etc.

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.