diff --git a/.ci/ci.yml.tmpl b/.ci/ci.yml.tmpl index 3f20130755a1..1512636ac3f7 100644 --- a/.ci/ci.yml.tmpl +++ b/.ci/ci.yml.tmpl @@ -339,7 +339,7 @@ jobs: {% for v in vars.terraform_v.itervalues() %} - put: {{v.short_name}}-intermediate params: - repository: magic-modules-with-comment/build/{{ v.short_name }} + repository: magic-modules/build/{{ v.short_name }} branch_file: branchname/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 @@ -354,7 +354,7 @@ jobs: {% endfor %} - put: ansible-intermediate params: - repository: magic-modules-with-comment/build/ansible + repository: magic-modules/build/ansible branch_file: branchname/original_pr_branch_name # See comment on terraform-intermediate only_if_diff: true @@ -363,23 +363,13 @@ jobs: skip_clone: true - put: inspec-intermediate params: - repository: magic-modules-with-comment/build/inspec + repository: magic-modules/build/inspec branch_file: branchname/original_pr_branch_name # See comment on terraform-intermediate only_if_diff: true force: true get_params: skip_clone: true - # 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. - - put: magic-modules - params: - repository: magic-modules-with-comment/ - branch_file: branchname/original_pr_branch_name - only_if_diff: true - force: true - get_params: - skip_clone: true - task: create-or-update-pr file: magic-modules/.ci/magic-modules/create-pr.yml params: @@ -399,6 +389,15 @@ jobs: get_params: skip_clone: true + - put: magic-modules + params: + repository: magic-modules/ + branch_file: branchname/original_pr_branch_name + only_if_diff: true + force: true + get_params: + skip_clone: true + # Once everything is done and working, post the updated information to the # magic-modules PR. - put: magic-modules-new-prs diff --git a/.ci/magic-modules/create-pr.sh b/.ci/magic-modules/create-pr.sh index 178013cd1417..598a7eb12732 100755 --- a/.ci/magic-modules/create-pr.sh +++ b/.ci/magic-modules/create-pr.sh @@ -67,7 +67,7 @@ if [ -n "$TERRAFORM_REPO_USER" ]; then fi git checkout -b "$BRANCH_NAME" - if hub pull-request -b "$TERRAFORM_REPO_USER/$PROVIDER_NAME:master" -F ./downstream_body > ./tf_pr 2> ./tf_pr_err ; then + if hub pull-request -b "$TERRAFORM_REPO_USER/$PROVIDER_NAME:master" -h "$ORIGINAL_PR_BRANCH" -F ./downstream_body > ./tf_pr 2> ./tf_pr_err ; then DEPENDENCIES="${DEPENDENCIES}depends: $(cat ./tf_pr) ${NEWLINE}" LABELS="${LABELS}${PROVIDER_NAME}," else @@ -96,7 +96,7 @@ if [ -n "$ANSIBLE_REPO_USER" ]; then fi git checkout -b "$BRANCH_NAME" - if hub pull-request -b "$ANSIBLE_REPO_USER/ansible:devel" -F ./downstream_body > ./ansible_pr 2> ./ansible_pr_err ; then + if hub pull-request -b "$ANSIBLE_REPO_USER/ansible:devel" -h "$ORIGINAL_PR_BRANCH" -F ./downstream_body > ./ansible_pr 2> ./ansible_pr_err ; then DEPENDENCIES="${DEPENDENCIES}depends: $(cat ./ansible_pr) ${NEWLINE}" LABELS="${LABELS}ansible," else @@ -122,7 +122,7 @@ fi fi git checkout -b "$BRANCH_NAME" - if hub pull-request -b "$INSPEC_REPO_USER/inspec-gcp:master" -F ./downstream_body > ./inspec_pr 2> ./inspec_pr_err ; then + if hub pull-request -b "$INSPEC_REPO_USER/inspec-gcp:master" -h "$ORIGINAL_PR_BRANCH" -F ./downstream_body > ./inspec_pr 2> ./inspec_pr_err ; then DEPENDENCIES="${DEPENDENCIES}depends: $(cat ./inspec_pr) ${NEWLINE}" LABELS="${LABELS}inspec," else