Forum Discussion
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
-
- Jenkins v2.28
-
- Jenkins Http_request plugin (HTTP Request)
-
- Access to github rest api - GitHub REST API - GitHub Docs
-
- CodeMigrate pipelines - Attached
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)
Am developing a pipeline which can be used for Check out, check in to GIT and migrating the pipelines/task/account from GIT(not GIT HUB) to Snaplogic Prod org. I have created a Service account in snaplogic. I need to run the migration pipelines using the service account, so that any pipelines/task/account created in production snaplogic org is owned by service account user. How do I achieve that ?
Mostly likely I will call migration pipeline via triggered task from ansible/Jenkins pipelines.
How are you all migrating accounts from GIT. The account config will be different for dev/qa/prod
- Aleksandar_A3 years agoContributor III
Hi @Rahul,
You can split the issues array by using JSON Splitter [JSON Splitter Doc] with the following settings.
Let me know if this helps you.
BR,
Aleksandar.
Related Content
- 11 months ago
- 6 months ago
- 2 years ago
- 2 years ago