Please provide your feedback in this short Flings' survey.

Contributors 4

View All

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

Related Products
  • vRealize Automation Code Stream
  • Concourse CI

Instructions

Note: the image is obtained dynamically by following the instructions below.

  1. Add docker endpoint to the Codestream.
  2. 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.


  3. ---
    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
    
  4. Make sure we generate an API token and put that to the Codestream variables.
  5. 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.
  6. Create a Pipeline that will be used to trigger the concourse pipeline. Sample pipeline yaml

  7. ---
    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}
    
  8. 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

  9. Now the above output properties can be used to do CD (continuous deployment) within Codestream.

Similar Flings

No similar flings found. Check these out instead...
Feb 04, 2021
fling logo of VMware Machine Learning Platform

VMware Machine Learning Platform

version 0.4.1

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

Feb 05, 2020
fling logo of Pallas

Pallas

version 1.0

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

Dec 09, 2019
fling logo of SyncML Compare

SyncML Compare

version 1.0.0

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.

Nov 26, 2019
fling logo of Kubewise

Kubewise

version 1.1.0

Kubewise is a simple multi-platform desktop client for Kubernetes®.

Aug 19, 2020
fling logo of VMware Container For Folding@Home

VMware Container For Folding@Home

version 1.0

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.

Jun 25, 2019
fling logo of Horizon DaaS Migration Tool

Horizon DaaS Migration Tool

version 2.1.0

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).

View More