Importing External Hudson Jobs
If you are using an on-premise Hudson build system and want to move to the Oracle Developer Cloud Service build system, you can import your Hudson jobs to the Oracle Developer Cloud Service build system. You must be assigned the project Owner role to import jobs.
You can create a zip file of the jobs available on your external Hudson installation and then import the jobs to your Oracle Developer Cloud Service project. Before you import your jobs, you might want to upgrade your current Hudson installation to version 3.2.2 to resolve any warning messages during the import.
To import external Hudson jobs:
-
On your Hudson installation machine, open the command line and navigate to the
HUDSON_HOME/jobs
directory. -
Run the
jar -cvfM <jobname>.zip */config.xml
command to create a<jobname>.zip
file.For example, the
jar -cvfM jobs.zip */config.xml
command creates ajobs.zip
file.If the zip file contains community Hudson jobs, the parent directory name of the
config.xml
file becomes the job name when the zip file is uploaded to Oracle Developer Cloud Service. -
In the zip file, confirm the following:
-
The job file name does not contain a period (
.
) character. Usually, old Hudson jobs contain a period in the file name if the teams feature is enabled. If the period character exists, rename the job to remove the period character. -
If your current Hudson installation is on a Windows machine, replace
\
in the file paths with/
.
-
-
In Oracle Developer Cloud Service, open your project.
-
In the navigation bar, click Project Settings.
-
Click Job Import.
-
In the Job Import page, drag and drop the zip file of jobs to the Drag a zip file here drop area. You may also click select a zip file, browse, select the zip file, and click Open.
-
Click Upload File to upload the zip file.
While uploading the zip file, it goes through various validation processes, such as:
-
File format error or empty zip file error
In case of a zip file error, create another zip file of the jobs and upload it again.
-
Duplicate job names
While uploading the zip file, name of each job is checked against the names of the existing jobs of the Builds page and with the other jobs' names in the zip file being uploaded. If a job name is found to be already in use, it is renamed to add a number suffix (for example,
my-job
,my-job1
,my-job2
). If required, you may rename the job in the Job Configuration page. -
Incompatible Hudson plugins
By default, jobs with incompatible plugins are not included. While uploading, the incompatible jobs generate warnings that you should review after the upload is complete.
-
Unknown job
While uploading, job dependencies are checked against the existing jobs and the jobs found in the zip file. Missing dependencies report an error and are not imported. If required, click Cancel to abort the job.
-
-
Select the check boxes of the jobs that you want to import and click Import Jobs.
If a job of the same name exists in Oracle Developer Cloud Service, you will be prompted to provide a new name to the imported job. If the Status of a job shows an error, fix the error in the zip file and then try again.
After the import is successful, the result page shows a message indicating the number of imported jobs along with their names. Click Start Another Import to import another zip file.
-
Open the Builds page and configure the imported jobs, as required.