How to create a hierarchy of work with Jenkins?

we have a series of shell scripts at work that I am trying to improve using Jenkins (to have much more control and to allow developers unfamiliar with shell commands to understand and modify the process, if necessary).

I had no problems with scripts that basically tested the project using SVN, building it with Maven and deploying the war in our container.

But now I'm trying to create a Jenkins work for installing Linux, Linux x86_64, and Windows installers for our clients. The script does the following:

  • validates the project (SVN);
  • creates the main project with a test profile (Maven);
  • copies the war in Samba Share (smbclient);
  • restores a project with a production profile;
  • Updates version folders (SVNs) in Linux, Linux64, and Windows folders
  • copy the war to the linux folder;
  • creates a tarball using the Linux folder;
  • copy the war to the Linux64 folder;
  • creates a tarball using the Linux64 folder;
  • copies the war to the Windows folder;
  • Creates a Windows executable with the launch of InnoSetup in Wine;
  • copies packages to Samba Share.

This script is too complicated, and there is a lot of redundancy between Linux, Linux64, and Windows folders. I presented an improved process where I would use the following folder structure:

libs
|-- unversioned-folder
|-- linux
|   `-- specific linux files
|-- linux64
|   `-- specific linux x86_64 files
`-- windows
    `-- specific windows files

workspace
|-- main-project
`-- versioned-folder
    |-- versioned-subfolder1
    |-- versioned-subfolder2
    |-- unversioned-folder  (copied from libs)
    |   `-- main-project.war (built with Maven from the main-project)
    `-- Linux or Linux64 or Windows specific folder (overwritten after each packaging)

This way, the version folders are not duplicated, and I can pack Linux, Linux64 and Windows installers without redundancy and just overwrite specific files for each.

Jenkins CIFS script. , , , .

, , , script. Multijob.

, Jenkins, :

  • :
    • Windows Share
  • :
  • :
    • ;
    • ;
    • ;
    • : linux installer
      • Linux ;
      • tarball ().
    • : linux x86_64 installer
      • linux64;
      • tarball ().
    • :
      • ;
      • , InnoSetup (, script ).
    • Windows Share.

, , , script Jenkins?

+3

All Articles