---
title: "My first Concourse CI script - mapdata/ci/pipeline.yml"
author: "jXee"
date: "2017-06-02T11:59:45Z"
tags: []
categories: ["编程语言"]
slug: "my-first-concourse-ci-script-mapdata-ci-pipeline-yml"
draft: false
lastmod: "2017-06-02T16:08:03Z"
id: 2377487
url: "https://jxee.iteye.com/blog/2377487"
---

resource\_types:

 

\- name: aws-cloudformation-stack

  type: docker-image

  source:

    repository: xxx/aws-cloudformation-stack-resource

    tag: latest

 

resources:

 

\- name: mapdata

  type: git

  check\_every: 10s

  source:

    uri: https://github.com/xxx/mapdata.git

    branch: master

    username: {{github-username}}

    password: {{github-password}}

 

\- name: cloudformation

  type: git

  check\_every: 10s

  source:

    uri: https://github.com/xxx/mapdata.git

    branch: master

    username: {{github-username}}

    password: {{github-password}}

    paths: \['build/cloudformation/\*']

 

\- name: pipeline-task

  type: git

  source:

    uri: https://github.com/xxx/pipeline-task.git

    branch: master

    username: {{github-username}}

    password: {{github-password}}

 

\- name: version

  type: semver

  source:

    initial\_version: 1.0.0

    key: mapload/version

    bucket: xxx-artifact-ap-southeast-2

    access\_key\_id: {{aws-access-key}}

    secret\_access\_key: {{aws-secret-key}}

    region\_name: ap-southeast-2

 

\- name: map-data-stack

  type: aws-cloudformation-stack

  source:

    name: global-map-data

    region: ap-southeast-2

    

\- name: map-load

  type: s3

  source:

    bucket: xxx-artifact-ap-southeast-2

    access\_key\_id: {{aws-access-key}}

    secret\_access\_key: {{aws-secret-key}}

    region\_name: ap-southeast-2

    private: true

    regexp: mapload/mapload-(.\*).tgz

 

jobs:

 

\- name: dev

  serial: true

  plan:

  - aggregate:

    - get: mapdata

    - get: cloudformation

      trigger: true

    - get: version

    - get: pipeline-task

  - task: create-tags

    file: pipeline-task/cloudformation-utils/tasks/create-tags-json.yml

    params:

      ENVIRONMENT: dev

      ROLE: map-data

  - put: map-data-stack

    params:

      template: cloudformation/build/cloudformation/cloudformation.json

      tags: tags/tags.json

      capabilities: \[CAPABILITY\_IAM]

 

\- name: run-tools

  serial: true

  plan:

  - aggregate:

    - get: mapdata

    - get: version

      params: {bump: minor}

  - task: download-upload-rdf

    params:

      xxx\_USERNAME: {{map-username}}

      xxx\_PASSWORD: {{map-password}}

      IS\_DEV: true

    file: mapdata/ci/tasks/downloadFiles.yml

  - put: map-load

    params:

      file: mapload/mapload-\*.tgz

  - put: version

    params: {bump: minor}