Skip to content

Commit

Permalink
Add pipeline for terraform-google-jenkins
Browse files Browse the repository at this point in the history
  • Loading branch information
ingwarr committed May 16, 2019
1 parent b3001bc commit 0f9a244
Showing 1 changed file with 129 additions and 0 deletions.
129 changes: 129 additions & 0 deletions infra/concourse/pipelines/terraform-google-jenkins.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
resource_types:

- name: pull-request
type: docker-image
source:
repository: teliaoss/github-pr-resource

resources:
- name: pull-request
type: pull-request
webhook_token: ((jenkins.github_webhook_token))
source:
repository: terraform-google-modules/terraform-google-jenkins
access_token: ((github.pr-access-token))

- name: lint-test-image
type: docker-image
source:
repository: gcr.io/cloud-foundation-cicd/cft/lint
username: _json_key
password: ((sa.google))

- name: integration-test-image
type: docker-image
source:
repository: gcr.io/cloud-foundation-cicd/cft/kitchen-terraform
tag: 0.11.10_216.0.0_1.19.1_0.1.10
username: _json_key
password: ((sa.google))

jobs:

- name: lint-tests
public: true
plan:
- get: pull-request
trigger: true
version: every
- put: notify-lint-test-pending
resource: pull-request
params:
path: pull-request
context: lint-tests
status: pending
- get: lint-test-image
trigger: true
- task: run
image: lint-test-image
config:
platform: linux
inputs:
- name: pull-request
path: terraform-google-jenkins
- name: lint-test-image
run:
path: make
args: ['-s']
dir: terraform-google-jenkins
on_success:
put: notify-lint-test-success
resource: pull-request
params:
path: pull-request
context: lint-tests
status: success
on_failure:
put: notify-lint-test-failure
resource: pull-request
params:
path: pull-request
context: lint-tests
status: failure
on_abort:
put: notify-lint-test-error
resource: pull-request
params:
path: pull-request
context: lint-tests
status: error

- name: integration-tests
public: true
plan:
- get: pull-request
trigger: true
version: every
- put: notify-integration-test-pending
resource: pull-request
params:
path: pull-request
context: integration-tests
status: pending
- get: integration-test-image
trigger: true
- task: run-tests
image: integration-test-image
config:
platform: linux
inputs:
- name: pull-request
path: terraform-google-jenkins
run:
path: make
args: ['-s', 'test_integration']
dir: terraform-google-jenkins
params:
PROJECT_ID: ((jenkins.phoogle_project_id))
SERVICE_ACCOUNT_JSON: ((jenkins.phoogle_sa))
on_success:
put: notify-integration-test-success
resource: pull-request
params:
path: pull-request
context: integration-tests
status: success
on_failure:
put: notify-integration-test-failure
resource: pull-request
params:
path: pull-request
context: integration-tests
status: failure
on_abort:
put: notify-integration-test-error
resource: pull-request
params:
path: pull-request
context: integration-tests
status: error

0 comments on commit 0f9a244

Please sign in to comment.