forked from cloud-custodian/cloud-custodian
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #235 from newscorp-ghfb/release
[AUTOMATED] Changes from Sandbox
- Loading branch information
Showing
15 changed files
with
607 additions
and
778 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,16 +22,11 @@ jobs: | |
uses: morganschoen/temporary-branch-action@3f774b2579f6044ca852f6c3f64b5d3d6d8c455d | ||
with: | ||
base: master | ||
- name: target specific customization | ||
run: | | ||
git switch ${{ steps.temp-branch.outputs.branch }} | ||
sudo chown -R "${USER:-$(id -un)}" . | ||
shell: bash | ||
- name: commit changes to temp branch | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
branch: ${{ steps.temp-branch.outputs.branch }} | ||
- name: sync temp branch to target master branch | ||
- name: sync temp branch to target release branch | ||
uses: wei/git-sync@v3 | ||
with: | ||
source_repo: [email protected]:newscorp-ghfb/cloud-custodian.git | ||
|
@@ -44,4 +39,4 @@ jobs: | |
uses: dawidd6/action-delete-branch@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branches: ${{ steps.temp-branch.outputs.branch }} | ||
branches: ${{ steps.temp-branch.outputs.branch }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,9 +48,12 @@ jobs: | |
jenkins-url: "https://jenkins.ncttools.io" | ||
jenkins-token: ${{ secrets.JENKINS_API_TOKEN }} | ||
jenkins-user: ${{ secrets.JENKINS_API_USERNAME }} | ||
jenkins-job: ${{ github.event.repository.name }} | ||
# jenkins-job: ${{ github.event.repository.name }}/release | ||
jenkins-job: nct-cloud-custodian-sandbox/release | ||
jenkins-wait-job: "wait" | ||
jenkins-ssl-verify: "true" | ||
jenkins-job-params: '{"anyParam": "anyValue"}' | ||
|
||
- name: notify slack on failure (plan) | ||
if: startsWith(steps.jenkins-job-apply.outputs.job_status, 'FAIL') | ||
uses: tokorom/action-slack-incoming-webhook@main | ||
|
@@ -64,7 +67,7 @@ jobs: | |
"color": "danger", | ||
"fields": [ | ||
{ | ||
"title": "${{github.event.repository.name}}: Nightly Jeeves sandbox validation failed. ", | ||
"title": "${{github.event.repository.name}}: Nightly sandbox validation failed. ", | ||
"value": "Skipping sync to prod release branch. Please review errors in build # <https://jenkins.ncttools.io/view/AWS%20Landing%20Zone%20Sandbox/job/${{github.event.repository.name}}/${{steps.jenkins-job-apply.outputs.job_build_number}}/console|${{steps.jenkins-job-apply.outputs.job_build_number}}>" | ||
} | ||
] | ||
|
@@ -76,50 +79,19 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout main | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: master | ||
fetch-depth: 0 | ||
- name: checkout target | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: newscorp-ghfb/cloud-custodian | ||
ssh-key: ${{ secrets.GIT_SYNC_DESTINATION_PRIVATE_KEY }} | ||
path: nct-lz-aws-toolIAM | ||
# fetch-depth: 0 | ||
- name: create temp branch | ||
id: temp-branch | ||
uses: morganschoen/temporary-branch-action@main | ||
with: | ||
base: master | ||
# - name: target specific customization | ||
# run: | | ||
# git switch ${{ steps.temp-branch.outputs.branch }} | ||
# sed -i "s/@Library('nct-jenkins-shared-library-sandbox')_/@Library('nct-jenkins-shared-library')_/g" Jenkinsfile | ||
# for dir in accounts/*; do | ||
# [[ "$dir" == *"bu_roles"* || "$dir" == *"tests"* ]] && continue | ||
# for dir2 in $dir/*; do | ||
# [[ "$dir2" = *"bu_roles"* || "$dir2" == *"tests"* ]] && continue | ||
# if [ -d $dir2 ]; then | ||
# echo "del $dir2" | ||
# rm -rf "$dir2" | ||
# fi | ||
# done | ||
# done | ||
# for dir in nct-lz-aws-toolIAM/accounts/*; do | ||
# [[ "$dir" == *"bu_roles"* || "$dir" == *"tests"* ]] && continue | ||
# for dir2 in $dir/*; do | ||
# [[ "$dir2" = *"bu_roles"* || "$dir2" == *"tests"* ]] && continue | ||
# if [ -d $dir2 ]; then | ||
# target_dir2=$(sed 's/nct-lz-aws-toolIAM\///' <<< $dir2) | ||
# target_dir=$(sed 's/nct-lz-aws-toolIAM\///' <<< $dir) | ||
# echo "copy $dir2 $target_dir2" | ||
# mkdir -p $target_dir && cp -r $dir2 $target_dir2 | ||
# fi | ||
# done | ||
# done | ||
# rm -rf nct-lz-aws-toolIAM | ||
# sudo chown -R "${USER:-$(id -un)}" . | ||
# shell: bash | ||
- name: Fetch branch in Sandbox | ||
run: | | ||
git fetch | ||
git push --set-upstream origin ${{ steps.temp-branch.outputs.branch }} | ||
- name: commit changes to temp branch | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
|
@@ -131,7 +103,7 @@ jobs: | |
source_repo: [email protected]:newscorp-ghfb/cloud-custodian-sandbox.git | ||
source_branch: ${{ steps.temp-branch.outputs.branch }} | ||
source_ssh_private_key: ${{ secrets.GIT_SYNC_SOURCE_PRIVATE_KEY }} | ||
destination_repo: [email protected]:newscorp-ghfb/nct-cloud-custodian.git | ||
destination_repo: [email protected]:newscorp-ghfb/cloud-custodian.git | ||
destination_branch: release | ||
destination_ssh_private_key: ${{ secrets.GIT_SYNC_DESTINATION_PRIVATE_KEY }} | ||
- name: delete temp branch | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.