Summary
The Code Stream Concourse Integrator (CSCI) Fling provides integration between a vRealize Automation Code Stream and Concourse CI tools with which users can trigger Concourse CI pipelines from Code Stream pipelines without any additional tooling/scripting. This enables users to use the features from both the tools flexibly and seamlessly as per their needs. This solution is built using Code Stream’s extensibility feature named Custom Integration.
Requirements
- vRealize Automation Code Stream
- Concourse CI
Instructions
Note: the image is obtained dynamically by following the instructions below.
- Add docker endpoint to the Codestream.
-
Add Custom Integration which will be used to trigger the Concourse pipeline. This custom integration takes apiToken, operationName, concourseURL, concourseTeam, pipelineToTrigger and jobName as input.
- Make sure we generate an API token and put that to the Codestream variables.
- Click on the Download button on this fling and you will get the Image URL in PDF file. Use that image URL in the below pipeline.
- Create a Pipeline that will be used to trigger the concourse pipeline. Sample pipeline yaml
-
Now this above pipeline can be used to trigger the concourse pipeline and will take back these properties to the Codestream pipeline.
1. ImageId: This will be commit_id in this version.
2. ConcourseBuildNumber: The triggered build number in Concourse.
3. ConcourseBuildUrl: The triggered build URL from Concourse -
Now the above output properties can be used to do CD (continuous deployment) within Codestream.
--- runtime: shell code: | /app/bin/concourse-integration $apiToken $operationName $concourseURL $concourseTeam $pipelineToTrigger $jobName source /app/bin/output.txt export $(cut -d= -f1 /app/bin/output.txt) inputProperties: - name: operationName type: select title: operationName placeHolder: Operation Name defaultValue: bindable: true labelInfo: true labelMessage: options: - optionKey : poll-trigger-pipeline optionValue : Trigger Concourse Pipeline - name: concourseURL type: text title: concourseURL placeHolder: Concourse URL defaultValue: bindable: true labelInfo: true labelMessage: - name: concourseTeam type: text title: concourseTeam placeHolder: Concourse Team defaultValue: bindable: true labelInfo: true labelMessage: - name: pipelineToTrigger type: text title: pipelineToTrigger placeHolder: Pipeline to trigger defaultValue: bindable: true labelInfo: true labelMessage: - name: apiToken type: text title: apiToken placeHolder: API token defaultValue: bindable: true labelInfo: true labelMessage: - name: jobName type: text title: jobName placeHolder: Job to trigger defaultValue: bindable: true labelInfo: true labelMessage: outputProperties: - name: ImageId type: label title: Image tag - name: ConcourseBuildUrl type: label title: Concourse Build Url - name: ConcourseBuildNumber type: label title: Concourse Build Number
--- project: CMBU on CMBU kind: PIPELINE name: cs-concourse-integration icon: organization,left, is-purple enabled: true description: '' concurrency: 50 workspace: endpoint: pipeline-as-code image: {Image URL From Downloaded PDF} registry: '' path: /app/bin autoCloneForTrigger: false limits: memory: 512 cpu: 1.0 stageOrder: - trigger stages: trigger: taskOrder: - trigger-pipeline - deploy-image tasks: trigger-pipeline: type: Custom input: name: cs-concourse version: v7 properties: operationName: poll-trigger-pipeline concourseURL: https://runway-ci.svc-stage.eng.vmware.com concourseTeam: CMBU-DevOps pipelineToTrigger: cs-runway-demo-1 apiToken: ${var.cs-concourse-integration-bearer-token} jobName: build-and-push deploy-image: type: Jenkins endpoints: jenkinsServer: vrbc-jenkins input: job: deploy parameters: API_BUILD_NUMBER: ${trigger.trigger-pipeline.output.properties.ImageId}
Contributors
Similar Flings
No similar flings found. Check these out instead...

VMware Machine Learning Platform
This Fling provides a platform for Data Scientists to quickly setup a virtualized cloud infrastructure to conduct data science experiments.

Pallas
The goal of Pallas is to provide management ability of virtualized Edge devices(ESXi host on Edge Device).

SyncML Compare
SyncML-Compare is an extension to Fiddler application that lets you compare the syncmls pushed from server against the SyncMls received from the device management client on the device.

VMware Container For Folding@Home
VMware Container for Folding@ Home is a docker container for running folding at home client. This container is supported on both Docker standalone clients and on a Kubernetes Cluster.

Horizon DaaS Migration Tool
Horizon DaaS Migration Tool helps migrating from earlier versions of Horizon DaaS (6.1.5, 6.1.6, 7.0.0) to the latest supported version (8.0.0).