Skip to content

Commit

Permalink
updating release pipeline to run off prs
Browse files Browse the repository at this point in the history
  • Loading branch information
rambleraptor committed Feb 20, 2019
1 parent fba6f37 commit 8729fe8
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .ci/magic-modules/release-ansible.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -x

# Install dependencies for Template Generator
pushd "magic-modules-gcp"
pushd "magic-modules-new-prs"
bundle install

# Setup SSH keys.
Expand All @@ -19,7 +19,7 @@ chmod 400 ~/github_private_key
ssh-agent bash -c "ssh-add ~/github_private_key; git submodule update --remote --init build/ansible"
popd

pushd "magic-modules-gcp/build/ansible"
pushd "magic-modules-new-prs/build/ansible"
# Setup Git config.
git config --global user.email "magic-modules@google.com"
git config --global user.name "Modular Magician"
Expand Down
4 changes: 2 additions & 2 deletions .ci/magic-modules/release-ansible.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ image_resource:
tag: '1.1'

inputs:
- name: magic-modules-gcp
- name: magic-modules-new-prs

run:
path: "magic-modules-gcp/.ci/magic-modules/release-ansible.sh"
path: "magic-modules-new-prs/.ci/magic-modules/release-ansible.sh"

params:
GITHUB_TOKEN: ""
20 changes: 18 additions & 2 deletions .ci/release.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,28 @@ resource_types:
source:
repository: frodenas/gcs-resource

- name: github-pull-request
type: docker-image
source:
repository: gcr.io/magic-modules/concourse-github-pr-resource
tag: '1.1'

resources:
- name: magic-modules-gcp
type: git-branch
source:
uri: git@github.com:GoogleCloudPlatform/magic-modules.git
private_key: ((repo-key.private_key))

- name: magic-modules-new-prs
type: github-pull-request
source:
repo: GoogleCloudPlatform/magic-modules
private_key: ((repo-key.private_key))
access_token: ((github-account.password))
authorship_restriction: true
no_label: automerged

- name: gcp-bucket
type: gcs-resource
source:
Expand All @@ -45,9 +60,10 @@ jobs:
plan:
- get: night-trigger
trigger: true
- get: magic-modules-gcp
- get: magic-modules-new-prs
trigger: false
- task: build
file: magic-modules-gcp/.ci/magic-modules/release-ansible.yml
file: magic-modules-new-prs/.ci/magic-modules/release-ansible.yml
params:
GITHUB_TOKEN: ((github-account.password))
CREDS: ((repo-key.private_key))
Expand Down

0 comments on commit 8729fe8

Please sign in to comment.