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...
Jan 02, 2016
fling logo of VCS to VCVA Converter

VCS to VCVA Converter

version 0.9.1

The VCS to VCVA Converter Appliance is the winning idea from the 2013 Fling Contest. It allows customers to migrate from Windows vCenter Server with an External Microsoft SQL Server Database to the vCenter Server Appliance with an embedded vPostgres database.

Oct 28, 2015
fling logo of Onyx for the Web Client

Onyx for the Web Client

version 1.0

Onyx for the Web Client is a Fling that translates actions taken in the vSphere Web Client to PowerCLI.Net code. This Fling was the winning entry in last year’s 2014 Fling Contest. It’s an update, of sorts, to the Onyx fling, as it allows for similar functionality in the web client.

Oct 07, 2014
fling logo of DKMS Module for VMware Workstation

DKMS Module for VMware Workstation

version 1.0

This Fling is intended to be used by end users who run a rolling-release Linux distribution (Arch Linux for instance).

Jan 16, 2019
fling logo of Policy Enforcer

Policy Enforcer

version 1.0

Policy Enforcer is used to check and remediate restriction policies on a Workspace ONE Managed Windows 10 machine.

Jun 18, 2018
fling logo of DRS Lens

DRS Lens

version 1.3

DRS Lens is an attempt to provide a UI-based solution to help understand DRS better.

Aug 20, 2015
fling logo of VMware Tools for Nested ESXi

VMware Tools for Nested ESXi

version 1.2

This VIB package provides a VMware Tools service (vmtoolsd) for running inside a nested ESXi virtual machine.

View More