Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
2923c48
move puppet logging to debug instead of info (#574)
Oct 17, 2018
33a4c2a
Terraform: Add project, organization, folder, service account tests t…
rileykarson Oct 17, 2018
e077beb
Terraform: Add import tests for CloudIoTRegistry (#576)
rileykarson Oct 17, 2018
84e25bd
Add Storage ObjectAccessControl to Terraform (#562)
rileykarson Oct 17, 2018
62afbbb
fix expand for machine type in composer environment (#571)
emilymye Oct 17, 2018
19ace70
Terraform: Add storage, missing project resource test files to MM. (#…
rileykarson Oct 18, 2018
1f6c48c
nested exclude for versioned properties (#575)
emilymye Oct 18, 2018
b6e66c2
Add OiCS link generation to the Terraform docs. (#572)
rileykarson Oct 19, 2018
3296816
add terraform-provider-google-beta to ci (#502)
danawillow Oct 19, 2018
633777d
add missing test back (#589)
danawillow Oct 19, 2018
7bf1036
InSpec nested objects & requires (#578)
slevenick Oct 19, 2018
51f2020
adding KMS key encryption to disks (#569)
Oct 20, 2018
c3fd5f9
adding all remaining tests (#593)
Oct 22, 2018
01f33c8
Add singular initialize method (#591)
slevenick Oct 22, 2018
3c57805
Remove puppet and chef from CI. (#598)
nat-henderson Oct 23, 2018
136d4e7
Adding ipv4 range back (#599)
Oct 23, 2018
16f510d
Ansible documentation refactor (#580)
rambleraptor Oct 23, 2018
f7a4e00
Add note about branch out of date message to PR template (#586)
rileykarson Oct 23, 2018
3238264
[Terraform]: Add support for Google Cloud Bigtable replication (#602)
rileykarson Oct 23, 2018
fe8675f
Add plural resource for InSpec (#594)
slevenick Oct 23, 2018
758f056
Removed all puppet and chef submodules. (#600)
nat-henderson Oct 24, 2018
2a12722
Remove puppet and chef from list of modules. (#601)
nat-henderson Oct 24, 2018
974728e
Add doc generation for inspec resources
slevenick Oct 24, 2018
631c6da
Merge branch 'master' into ground-up-6
slevenick Oct 24, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .ci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ These tools manage the downstream repositories of [magic-modules](https://github
Currently, they manage:

* terraform
* puppet
* chef
* ansible

# CI For Downstream Developers
Expand Down
208 changes: 35 additions & 173 deletions .ci/ci.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,13 @@ resources:
authorship_restriction: true
no_label: automerged

- name: terraform-intermediate
{% for v in vars.terraform_v.itervalues() %}
- name: {{ v.short_name }}-intermediate
type: git-branch
source:
uri: git@github.com:((github-account.username))/terraform-provider-google.git
uri: git@github.com:((github-account.username))/{{ v.provider_name }}.git
private_key: ((repo-key.private_key))
{% endfor %}

- name: ansible-intermediate
type: git-branch
Expand All @@ -62,30 +64,6 @@ resources:
uri: git@github.com:((github-account.username))/inspec-gcp.git
private_key: ((repo-key.private_key))

{% for module in vars.puppet_modules %}
- name: puppet-{{module}}-intermediate
type: git-branch
source:
{% if module == '_bundle' %}
uri: git@github.com:((github-account.username))/puppet-google.git
{% else %}
uri: git@github.com:((github-account.username))/puppet-google-{{module}}.git
{% endif %}
private_key: ((repo-key.private_key))
{% endfor %}

{% for module in vars.chef_modules %}
- name: chef-{{module}}-intermediate
type: git-branch
source:
{% if module == '_bundle' %}
uri: git@github.com:((github-account.username))/chef-google.git
{% else %}
uri: git@github.com:((github-account.username))/chef-google-{{module}}.git
{% endif %}
private_key: ((repo-key.private_key))
{% endfor %}

- name: mm-approved-prs
type: github-pull-request
source:
Expand Down Expand Up @@ -136,18 +114,25 @@ jobs:
status: pending
path: magic-modules
- aggregate:
{% for k, v in vars.terraform_v.iteritems() %}
- do:
# consumes: magic-modules-branched
# produces: terraform-generated
- task: generate-terraform
- task: generate-{{v.short_name}}
file: magic-modules-branched/.ci/magic-modules/generate-terraform.yml
# Puts 'terraform-generated' into the robot's fork.
- put: terraform-intermediate
params:
repository: terraform-generated
branch_file: magic-modules-branched/branchname
only_if_diff: true
force: true
VERSION: {{k}}
PROVIDER_NAME: {{v.provider_name}}
SHORT_NAME: {{v.short_name}}
# Puts 'terraform-generated' into the robot's fork.
- aggregate:
- put: {{v.short_name}}-intermediate
params:
repository: terraform-generated/{{k}}
branch_file: magic-modules-branched/branchname
only_if_diff: true
force: true
{% endfor %}
- do:
# consumes: magic-modules-branched
# produces: ansible-generated
Expand All @@ -172,43 +157,6 @@ jobs:
branch_file: magic-modules-branched/branchname
only_if_diff: true
force: true
{% if vars.puppet_modules %}
- do:
# consumes: magic-modules-branched
# produces: puppet-generated
- task: generate-puppet
file: magic-modules-branched/.ci/magic-modules/generate-puppet.yml
params:
PRODUCTS: {{','.join(vars.puppet_modules)}}
- aggregate:
{% for module in vars.puppet_modules %}
- put: puppet-{{module}}-intermediate
params:
repository: puppet-generated/{{module}}
branch_file: magic-modules-branched/branchname
only_if_diff: true
force: true
{% endfor %}
{% endif %}

{% if vars.chef_modules %}
- do:
# consumes: magic-modules-branched
# produces: chef-generated
- task: generate-chef
file: magic-modules-branched/.ci/magic-modules/generate-chef.yml
params:
PRODUCTS: {{','.join(vars.chef_modules)}}
- aggregate:
{% for module in vars.chef_modules %}
- put: chef-{{module}}-intermediate
params:
repository: chef-generated/{{module}}
branch_file: magic-modules-branched/branchname
only_if_diff: true
force: true
{% endfor %}
{% endif %}
on_failure:
put: magic-modules-new-prs
params:
Expand All @@ -224,8 +172,7 @@ jobs:
# This needs to match the username for the 'intermediate' resources.
GH_USERNAME: ((github-account.username))
CREDS: ((repo-key.private_key))
PUPPET_MODULES: {{','.join(vars.puppet_modules)}}
CHEF_MODULES: {{','.join(vars.chef_modules)}}
TERRAFORM_VERSIONS: "{{','.join(vars.terraform_properties_serialized)}}"
TERRAFORM_ENABLED: true
ANSIBLE_ENABLED: true
INSPEC_ENABLED: true
Expand All @@ -243,11 +190,18 @@ jobs:
version: every
trigger: true
params:
submodules: [build/terraform]
submodules: [{{','.join(vars.terraform_submodules)}}]
passed: [mm-generate]
- task: test
file: magic-modules/.ci/unit-tests/task.yml
timeout: 30m
- aggregate:
{% for v in vars.terraform_v.itervalues() %}
- task: test-{{v.short_name}}
file: magic-modules/.ci/unit-tests/task.yml
timeout: 30m
params:
PROVIDER_NAME: {{v.provider_name}}
SHORT_NAME: {{v.short_name}}
TEST_DIR: {{v.test_dir}}
{% endfor %}
on_failure:
do:
- get: magic-modules-new-prs
Expand Down Expand Up @@ -300,70 +254,6 @@ jobs:
context: inspec-tests
path: magic-modules-new-prs

- name: puppet-test
plan:
- get: magic-modules
version: every
trigger: true
params:
submodules:
{% for module in vars.puppet_submodules %}
- {{module}}
{% endfor %}
passed: [mm-generate]
- aggregate:
{% for module in vars.puppet_modules %}
- task: test-{{module}}
file: magic-modules/.ci/unit-tests/puppet.yml
timeout: 30m
params:
PRODUCT: {{module}}
{%- if vars.puppet_test_excludes.get(module) %}
EXCLUDE_PATTERN: {{','.join(vars.puppet_test_excludes[module])}}
{%- endif %}
{% endfor %}
on_failure:
do:
- get: magic-modules-new-prs
passed: [mm-generate]
- put: magic-modules-new-prs
params:
status: failure
context: puppet-tests
path: magic-modules-new-prs

- name: chef-test
plan:
- get: magic-modules
version: every
trigger: true
params:
submodules:
{% for module in vars.chef_submodules %}
- {{module}}
{% endfor %}
passed: [mm-generate]
- aggregate:
{% for module in vars.chef_modules %}
- task: test-{{module}}
file: magic-modules/.ci/unit-tests/chef.yml
timeout: 30m
params:
PRODUCT: {{module}}
{%- if vars.chef_test_excludes.get(module) %}
EXCLUDE_PATTERN: {{','.join(vars.chef_test_excludes[module])}}
{%- endif %}
{% endfor %}
on_failure:
do:
- get: magic-modules-new-prs
passed: [mm-generate]
- put: magic-modules-new-prs
params:
status: failure
context: chef-tests
path: magic-modules-new-prs

- name: create-prs
plan:
- get: magic-modules
Expand All @@ -373,12 +263,6 @@ jobs:
submodules: {{vars.all_submodules_yaml_format}}
passed:
- mm-generate
{%- if vars.chef_modules %}
- chef-test
{%- endif -%}
{%- if vars.puppet_modules %}
- puppet-test
{%- endif %}
- terraform-test
- ansible-test
- inspec-test
Expand All @@ -399,14 +283,7 @@ jobs:
TERRAFORM_REPO_USER: terraform-providers
ANSIBLE_REPO_USER: modular-magician
INSPEC_REPO_USER: modular-magician
{%- if vars.puppet_modules %}
PUPPET_REPO_USER: GoogleCloudPlatform
PUPPET_MODULES: {{','.join(vars.puppet_modules)}}
{%- endif %}
{%- if vars.chef_modules %}
CHEF_REPO_USER: GoogleCloudPlatform
CHEF_MODULES: {{','.join(vars.chef_modules)}}
{%- endif %}
TERRAFORM_VERSIONS: "{{','.join(vars.terraform_properties_serialized)}}"
on_failure:
put: magic-modules-new-prs
params:
Expand All @@ -420,9 +297,10 @@ jobs:
# the pipeline (when a PR needs to be updated), this does that updating by pushing
# the new code to the repository/branch from which a pull request is already open.
- aggregate:
- put: terraform-intermediate
{% for v in vars.terraform_v.itervalues() %}
- put: {{v.short_name}}-intermediate
params:
repository: magic-modules-with-comment/build/terraform
repository: magic-modules-with-comment/build/{{ v.short_name }}
branch_file: magic-modules-with-comment/original_pr_branch_name
# Every time a change runs through this pipeline, it will generate a commit with
# a different hash - the hash includes timestamps. Therefore, even if there's no
Expand All @@ -432,6 +310,7 @@ jobs:
# not push the update even though the commit hashes are different.
only_if_diff: true
force: true
{% endfor %}
- put: ansible-intermediate
params:
repository: magic-modules-with-comment/build/ansible
Expand All @@ -446,23 +325,6 @@ jobs:
# See comment on terraform-intermediate
only_if_diff: true
force: true
{% for module in vars.puppet_modules %}
- put: puppet-{{module}}-intermediate
params:
repository: magic-modules-with-comment/build/puppet/{{module}}
branch_file: magic-modules-with-comment/original_pr_branch_name
only_if_diff: true
force: true
{% endfor %}

{% for module in vars.chef_modules %}
- put: chef-{{module}}-intermediate
params:
repository: magic-modules-with-comment/build/chef/{{module}}
branch_file: magic-modules-with-comment/original_pr_branch_name
only_if_diff: true
force: true
{% endfor %}

# This isn't load-bearing - it's just aesthetic. It will also be a no-op the first
# time through, it works the same way as the preceding push.
Expand Down
Loading