cancel
Showing results for 
Search instead for 
Did you mean: 

Using Github as a code repository for SnapLogic artifacts

sudhendu
New Contributor II

Hello SL community!!

Coming from a typical SOA/ESB background and working on tools like TIBCO Businessworks, Webmethods, etc. I was wondering if we have a way of using any code repository tool (Github, etc.) to store our Projects and other artifacts.

I understand we have a intuitive Import/Export capabilities, this is manual and is a explicit activity to be performed by a developer.

I was wondering:

  1. if we have anything (or is there a possibility) to integrate SL and GitHub.
    This should ensure that the Project and its assets gets checked-in into the GitHub repo without us doing any manual import-export.

  2. And that this can be further use to move code from one environment to another (code migration).

I am new to the SL world, but already finding the community really helpful 🙂

All response would be of help 🙂

Thank you!
Sudhendu

29 REPLIES 29

Mike/Sudhendu, glad that you found it useful, these pipelines could be easily invoked via a jenkins / teamcity pipeline.

Before we jump into jenkins/teamcity or any ci-cd tool-chain we need to understand what kind of “artifacts” SnapLogic generates, at a high level you have a SnapLogic project which resides has a ORG/SPACE/PROJECT hierarchy where ORG is the tenant, space could be mapped to an ORG UNIT for ex: BI, DEV, any PROJECT-NAME and so on and with in each space you have more than one PROJECT.

When it comes to artifact you have

Pipelines

Jobs (Scheduled, Triggered, Ultra)

Accounts

Files (could be any anything, xml, json, script files, xslt , csv and so on which you your pipelines depends upon)

Pipelines are the actual work horse which are invoked via jobs, for lack of a better term pipelines are interpreted by the execution engine (JCC aka node) and hence there is not much to “build”, now with this architecture a typical CI-CD work flow may not directly fit neverthless I have seen customers would still like to leverage their fav CI/CD tool chain to automate as much as they can, tasks like

 SnapLogic assets sharing via Github

 Promoting projects from one ENV to another

 Use Jenkins as the proverbial "rug" that ties the room together :)

Here is an actual implementation, we invoke SnapLogic pipelines (triggered tasks) via Jenkins job as an HTTP call.

Tools required

Pipeline design and Things to know

There are two projects involved

Project_Promotion = Utilizes Meta Snap pack to promote assets within same and different environments.
Github_Integration = Utilizes Meta Snap pack and REST Snap pack to promote assets within same and different environments. We are utilizing github rest api’s and they are invoked via basic_auth i.e. your github login account.

Pipelines:
Project_Promotion has
01 Main - Migrate Project
exposed as a triggered task
calls rest of the pipelines via pipeline execute
pipeline parameters

    source_proj
    target_proj
    include_account
    target_org
    source_space
    include_pipeline
    update_task
    target_space
    update_account
    include_task
    source_org

Example values:

    account_org = ConnectFasterInc
    account_space = LCM
    account_proj = Artifacts
    source_org = ConnectFasterInc
    source_space = LCM
    source_proj = DEV
    target_org = ConnectFasterPOC
    target_space = BK
    target_proj = PROD
    GH_Owner = snapsrepo or your github account username
    GH_Repo = reponame ex: cicd-demo
    GH_Source_Path = relative path to repo ex: BK/DEV (case sensitive)
    include_pipeline = true or false
    include_account = true or false
    include_task = true or false
    update_account = true or false

Finished product would have a Jenkins pipeline that utilizes HTTP request plugin to invoke SnapLogic pipelines that read/write to GitHub and also promote projects from one env to another in SnapLogic. Using pipeline params we decouple source and target location along with what SnapLogic artifacts to “include” during Jenkins job invocation.

CICD-SnapLogic-Projects.zip (31.2 KB)

snaplogic-jenkins.docx (344.9 KB)

tk42
New Contributor III

Wow this is very helpful.

I have been meaning to try to tackle this problem for over a year now, but never got around to it.

Now I know that it is possible.

Thanks,
TK

vyasyash
New Contributor III

Thanks much Bhavin for your valuable input. One suggestion to make the SnapLogic ecosystem more robust - can we have these critical topics documented as blogs. Will be easier for the community to access the knowledge repository.

Best,
YV

Good feedback.

We are currently looking at our various information platforms (docs, community, knowledgebase, blog, white papers, etc.) and our user community makeup to best determine what information should be tracked where.


Diane Miller

Rudradip
New Contributor II

Hi , I am stuck there in the jenkins project while trying to create the pipeline for Snaplogic task .Can anyone please tell me the steps for this in Jenkins ? First it will be one Jenkins Pieline , right ? or it will be Jenkins project ?

Thanks,
Rudradip