collapse
80%
WDescription%
Build stability: 1 out of the last 5 builds failed.80
Build History
x
 x
 
 
Trace Compass 4.2
 

Job Configuration Difference

org.eclipse.tracecompass-simrel-publish
Older Change
Operation:Changed
Newer Change
Operation:Changed
4
  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
4
  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
5
  <builders>
5
  <builders>
6
    <hudson.tasks.Shell>
6
    <hudson.tasks.Shell>
7
      <command># Update release no longer used
7
      <command>echo -e 'Sim Release Name:\t'${SIMREL_NAME}
8
UPDATE_RELEASE=0
8
echo -e 'Milestone:\t\t'${MILESTONE}
9
#rm -r /home/data/httpd/download.eclipse.org/tracecompass/test
9
echo -e 'Version:\t\t'${VERSION_NUMBER}
10
#rm -r /home/data/httpd/archive.eclipse.org/tracecompass/doc/test
11
# run perl script
12
/home/data/httpd/download.eclipse.org/tracecompass/scripts/create-release.pl -v $SIMREL_NAME $UPDATE_RELEASE $MILESTONE $VERSION_NUMBER
13
#chmod 644 /home/data/httpd/download.eclipse.org/tracecompass/stable/rcp/index.php
14
10
11
################################################################################
12
# Validate job parameters
13
################################################################################
14
if [[ -z ${SIMREL_NAME} ]]
15
then
16
  exit 1
17
fi
18
if [[ -z ${MILESTONE} ]]
19
then
20
  exit 1
21
fi
22
if [[ -z ${VERSION_NUMBER} ]]
23
then
24
  exit 1
25
fi
26
27
################################################################################
28
# Basic constants
29
################################################################################
30
31
SSH="ssh genie.tracecompass@projects-storage.eclipse.org"
32
33
BASE_DIR=/home/data/httpd/
34
TRACECOMPASS_DIR=${BASE_DIR}download.eclipse.org/tracecompass/
35
RELEASE_BASE_DIR=${TRACECOMPASS_DIR}${SIMREL_NAME}/
36
MILESTONE_BASE_DIR=${RELEASE_BASE_DIR}milestones/
37
SIMREL_STABLE_DIR=${RELEASE_BASE_DIR}stable/
38
SIMREL_STABLE_REPOSITORY_DIR=${SIMREL_STABLE_DIR}repository/
39
SIMREL_STABLE_RCP_DIR=${SIMREL_STABLE_DIR}rcp/
40
41
STABLE_DIR=${TRACECOMPASS_DIR}stable/
42
STABLE_RCP_DIR=${STABLE_DIR}rcp/
43
44
MASTER_ARTIFACTS_DIR=${TRACECOMPASS_DIR}master/
45
MASTER_REPOSITORY_DIR=${MASTER_ARTIFACTS_DIR}repository/
46
47
BACKUP_ARTIFACTS_DIR=${TRACECOMPASS_DIR}tmp/backup/artifacts/
48
BACKUP_DOC_DIR=${TRACECOMPASS_DIR}tmp/backup/doc/
49
50
DOC_BASE_DIR=${BASE_DIR}archive.eclipse.org/tracecompass/doc/
51
DOC_RELEASE_STABLE_DIR=${DOC_BASE_DIR}${SIMREL_NAME}/stable/
52
DOC_STABLE_DIR=${DOC_BASE_DIR}stable/
53
54
FINAL_RELEASE_DIR=${TRACECOMPASS_DIR}releases/${VERSION_NUMBER}/
55
FINAL_RELEASE_RCP_DIR=${FINAL_RELEASE_DIR}rcp/
56
57
MILESTONE_DIR=${MILESTONE_BASE_DIR}${MILESTONE}/
58
59
RCP_INDEX_PHP=${TRACECOMPASS_DIR}scripts/rcp_index_php
60
61
################################################################################
62
# Email constants
63
################################################################################
64
65
################################################################################
66
# Create milestones and stable base directories
67
################################################################################
68
if [[ ! -d ${MILESTONE_BASE_DIR} ]]; then
69
  ${SSH} mkdir -p ${MILESTONE_BASE_DIR}
70
fi
71
if [[ ! -d ${SIMREL_STABLE_DIR} ]]; then
72
  ${SSH} mkdir -p ${SIMREL_STABLE_DIR}
73
fi
74
75
################################################################################
76
# Create simRel milestone or release directory
77
################################################################################
78
if [[ ${MILESTONE} =~ m[123] ]] || [[ ${MILESTONE} =~ rc[12] ]]; then
79
  ${SSH} mkdir -p ${MILESTONE_DIR}
80
elif [[ ${MILESTONE} == release ]]; then
81
  ${SSH} mkdir -p ${FINAL_RELEASE_DIR}
82
fi
83
84
################################################################################
85
# Copy files and directories
86
################################################################################
87
if [[ ${MILESTONE} =~ m[123] ]] || [[ ${MILESTONE} == rc1 ]]; then
88
  ${SSH} cp -r ${MASTER_REPOSITORY_DIR}* ${MILESTONE_DIR}
89
elif [[ ${MILESTONE} == rc2 ]]; then
90
  ${SSH} cp -r ${SIMREL_STABLE_REPOSITORY_DIR}* ${MILESTONE_DIR}
91
elif [[ ${MILESTONE} == release ]]; then
92
  ${SSH} cp -r ${BACKUP_ARTIFACTS_DIR}* ${FINAL_RELEASE_DIR}
93
fi
94
95
################################################################################
96
# - Create artifacts directory, if needed
97
# - Delete old artifacts directory content, if needed.
98
# - Save rcp, repository and rcp-repository in artifacts directory.
99
################################################################################
100
if [[ ${MILESTONE} == rc1 ]]; then
101
  FROM_ARTIFACTS=${MASTER_ARTIFACTS_DIR}
102
  TO_ARTIFACTS=${SIMREL_STABLE_DIR}
103
elif [[ ${MILESTONE} == rc2 ]]; then
104
  FROM_ARTIFACTS=${SIMREL_STABLE_DIR}
105
  TO_ARTIFACTS=${BACKUP_ARTIFACTS_DIR}
106
elif [[ ${MILESTONE} == release ]]; then
107
  FROM_ARTIFACTS=${BACKUP_ARTIFACTS_DIR}
108
  TO_ARTIFACTS=${STABLE_DIR}
109
fi
110
if [[ -n ${TO_ARTIFACTS} ]]; then
111
  if [[ -d ${TO_ARTIFACTS} ]]; then
112
    ${SSH} rm -rf ${TO_ARTIFACTS}*
113
  else
114
    ${SSH} mkdir -p ${TO_ARTIFACTS}
115
  fi
116
  ${SSH} cp -r ${FROM_ARTIFACTS}r* ${TO_ARTIFACTS}
117
fi
118
119
################################################################################
120
# - Create doc directory, if needed
121
# - Delete old doc directory content, if needed.
122
# - Save docs in doc directory
123
################################################################################
124
if [[ ${MILESTONE} == rc1 ]]; then
125
  FROM_DOC=${DOC_BASE_DIR}
126
  TO_DOC=${DOC_RELEASE_STABLE_DIR}
127
elif [[ ${MILESTONE} == rc2 ]]; then
128
  FROM_DOC=${DOC_RELEASE_STABLE_DIR}
129
  TO_DOC=${BACKUP_DOC_DIR}
130
elif [[ ${MILESTONE} == release ]]; then
131
  FROM_DOC=${BACKUP_DOC_DIR}
132
  TO_DOC=${DOC_STABLE_DIR}
133
fi
134
if [[ -n ${TO_DOC} ]]; then
135
  if [[ -d ${TO_DOC} ]]; then
136
    ${SSH} rm -rf ${TO_DOC}*
137
  else
138
    ${SSH} mkdir -p ${TO_DOC}
139
  fi
140
  ${SSH} cp -r ${FROM_DOC}org* ${TO_DOC}
141
fi
142
143
################################################################################
144
# - Create config.php in RCP directory
145
# - Copy index.php to RCP directory
146
################################################################################
147
if [[ ${MILESTONE} == rc1 ]]; then
148
  TITLE[0]="Trace Compass Release Candidate"
149
  RCP_DIR[0]=${SIMREL_STABLE_RCP_DIR}
150
elif [[ ${MILESTONE} == release ]]; then
151
  TITLE[0]="Trace Compass Release ${VERSION_NUMBER}"
152
  RCP_DIR[0]=${FINAL_RELEASE_RCP_DIR}
153
  TITLE[1]="Trace Compass Latest Stable Version"
154
  RCP_DIR[1]=${STABLE_RCP_DIR}
155
fi
156
for (( i = 0; i < ${#RCP_DIR[@]}; i++ )); do
157
  ${SSH} echo "<?php \$title='${TITLE[i]}'; ?>" > ${RCP_DIR[i]}config.php
158
  ${SSH} cp ${RCP_INDEX_PHP} ${RCP_DIR[i]}index.php
159
done
160
161
################################################################################
162
# Output email to console
163
################################################################################
15
</command>
164
</command>
16
    </hudson.tasks.Shell>
165
    </hudson.tasks.Shell>
17
  </builders>
166
  </builders>
18
  <buildWrappers/>
167
  <buildWrappers>
168
    <com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper plugin="ssh-agent@1.17">
169
      <credentialIds>
170
        <string>projects-storage.eclipse.org-bot-ssh</string>
171
      </credentialIds>
172
      <ignoreMissing>false</ignoreMissing>
173
    </com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
174
  </buildWrappers>
19
  <canRoam>true</canRoam>
175
  <canRoam>true</canRoam>
20
  <concurrentBuild>false</concurrentBuild>
176
  <concurrentBuild>false</concurrentBuild>
21
  <description/>
177
  <description/>
......
40
              <string>release</string>
196
              <string>release</string>
41
            </a>
197
            </a>
42
          </choices>
198
          </choices>
43
          <description>The milestone value. Use release for when doing the release. A release requires at lease rc1 and rc2 to be ran before.</description>
199
          <description>The milestone value. Use release for when doing the release. A release requires at least rc1 and rc2 to be ran before.</description>
44
          <name>MILESTONE</name>
200
          <name>MILESTONE</name>
45
        </hudson.model.ChoiceParameterDefinition>
201
        </hudson.model.ChoiceParameterDefinition>
46
        <hudson.model.StringParameterDefinition>
202
        <hudson.model.StringParameterDefinition>