Build the triggerΒΆ

The Production Centre uses Docker images and deploys them in a Cloud based environment for large scale production campaigns.

This notebook will trigger the build of a Docker image containing the trigger.

We will invoke components of the Ellip Platform Continuous Integration.

The input for trigering the build of Docker image containing the data transformation application uses the pom, an XML file that contains information about the data transformation application and configuration details used by Maven to build the Docker image.

The goal of this Jupyter Notebook is to build of the data transformation application Docker image.

  • A few Python modules to do the job:
In [1]:
import sys
import os

sys.path.append('../helpers')
import ellip_helpers

%load_ext autoreload
%autoreload 2

%store -r
  • Instantiate a build job
In [2]:
build = ellip_helpers.EllipBuild(os.path.join('..', 'configuration.ipynb'),
                                 build_type='Trigger',
                                 jenkins_username=jenkins_username,
                                 jenkins_api_key=jenkins_api_key)
  • Check the build job information
In [3]:
print build.job
communities/Gitlab Groups/ec-better/eth-z/triggers/tg-ethz-01-02-01-queue/docker
  • Submit the build job
In [4]:
build.submit()
Out[4]:
4
In [5]:
build.build_number
Out[5]:
4
  • Monitor the build request:
In [6]:
if build.monitor():
    print 'Job build completed'
else:
    raise Exception ('Job build failed')
Job build completed