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...
Apr 04, 2022
fling logo of Druid 4G-5G core deployment automation on vSphere

Druid 4G-5G core deployment automation on vSphere

version 1.0

Automate Druid Software 4G/5G core application on VMware stack using terraform script

Dec 20, 2012
fling logo of View Controlled Recompose Script

View Controlled Recompose Script

version 1.1

This script performs a Controlled Recompose of a VMware View Linked Clone Pool of Virtual Desktops. It first identifies a free desktop and recomposes it to create the first Replica Desktop.

Feb 09, 2021
fling logo of Virtualized High Performance Computing Toolkit

Virtualized High Performance Computing Toolkit

version 0.1.0

This toolkit is intended to facilitate managing the lifecycle of these special configurations by leveraging vSphere APIs.

May 23, 2022
fling logo of Virtual Machine Desired State Configuration

Virtual Machine Desired State Configuration

version 1.1.3 (4092207)

Virtual Machine Desired State Configuration (VMDSC) allows virtual administrators to specify VM CPU/Memory desired state which will take effect upon the next Guest OS reboot. This removes the burden of having to schedule a downtime window with the business/app owners.

Aug 13, 2012
fling logo of vFabric Data Director Service Gateway for CloudFoundry

vFabric Data Director Service Gateway for CloudFoundry

version 1.0

vFabric Data Director Service Gateway for Cloud Foundry enables service providers to deliver a vFabric Postgres database-as-a-service solution based on CloudFoundry.org and vFabric Data Director.

Jul 02, 2021
fling logo of Edge Services Observability

Edge Services Observability

version 0.1.0

Edge Services Observability is a tool used to monitor Edge Services running on Unified Access Gateways. We’ve provided readily available dashboards to help you easily understand.

View More