Skip to content

Commit

Permalink
Merge pull request #35 from newscorp-ghfb/STORY/PE-3322_refactor_sync…
Browse files Browse the repository at this point in the history
…_wfs

Story/pe 3322 refactor sync wfs
  • Loading branch information
morganschoen authored May 16, 2024
2 parents fa7488b + 74af36d commit 275493d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 34 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/nightly-sync-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ jobs:
env:
INCOMING_WEBHOOK_URL: ${{ secrets.NIGHTLY_SYNC_SLACK_WEBHOOK_URL }}
with:
text: "${{github.event.repository.name}}: Nightly cloud-custodian sync from sandbox\n:git-pull-request: New PR ready for review: \
<${{steps.create-pr.outputs.pr_url}}|${{steps.create-pr.outputs.pr_number}}> <!here>"
text: |
${{github.event.repository.name}}: Nightly cloud-custodian sync from Release to Main for Sandbox
:git-pull-request: New PR ready for review: <${{steps.create-pr.outputs.pr_url}}|${{steps.create-pr.outputs.pr_number}}> <!here>
33 changes: 1 addition & 32 deletions .github/workflows/nightly-sync-to-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,38 +10,7 @@ jobs:
outputs:
status: ${{ steps.jenkins-job-apply.outputs.job_status }}
steps:
#- name: trigger jenkins validation job (destroy)
# id: jenkins-job-destroy
# uses: morganschoen/build-jenkins-job@master
# with:
# 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-params: '{"action": "destroy", "bu": "nna", "account": "newstechnonprodinfeng"}'
# jenkins-wait-job: "wait"
# jenkins-ssl-verify: "true"
#- name: notify slack on failure (destroy)
# if: startsWith(steps.jenkins-job-destroy.outputs.job_status, 'FAIL')
# uses: tokorom/action-slack-incoming-webhook@main
# env:
# INCOMING_WEBHOOK_URL: ${{ secrets.NIGHTLY_SYNC_SLACK_WEBHOOK_URL }}
# with:
# text:
# attachments: |
# [
# {
# "color": "danger",
# "fields": [
# {
# "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-destroy.outputs.job_build_number}}/console|${{steps.jenkins-job-destroy.outputs.job_build_number}}>"
# }
# ]
# }
# ]
- name: trigger jenkins validation job (plan)
# if: startsWith(steps.jenkins-job-destroy.outputs.job_status, 'SUCCESS')
id: jenkins-job-apply
uses: morganschoen/build-jenkins-job@master
with:
Expand All @@ -68,7 +37,7 @@ jobs:
"fields": [
{
"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}}>"
"value": "Skipping sync to prod release branch. Please review errors in build # <https://jenkins.ncttools.io/job/nct-cloud-custodian-sandbox/job/release/${{steps.jenkins-job-apply.outputs.job_build_number}}/console|${{steps.jenkins-job-apply.outputs.job_build_number}}>"
}
]
}
Expand Down

0 comments on commit 275493d

Please sign in to comment.