0

I have a scheduled workflow that stopped running all of the sudden. Its supposed to run once a week, the last time it ran the config looked like

workflows:
  version: 2
  commit-workflow:
    jobs:
      - deploy-dev:
          context: msd-npn-site-deploy
      - deploy-stg:
          requires:
            - deploy-dev
          context: msd-npn-site-deploy
  scheduled-workflow:
    triggers:
      - schedule:
          cron: "0 5 * * 1"
          filters:
            branches:
              only:
                - master
    jobs:
      - build-ami:
          context: msd-npn-packer-credentials
      - refresh-dev:
          requires:
            - build-ami
          context: msd-npn-site-deploy
      - hold:
          type: approval
          requires:
            - refresh-dev
      - refresh-stg:
          requires:
            - hold
          context: msd-npn-site-deploy

During its run it failed on the refresh-stg step. I then changed it to

workflows:
  version: 2
  commit-workflow:
    jobs:
      - deploy-dev:
          context: msd-npn-site-deploy
      - deploy-stg:
          requires:
            - deploy-dev
          context: msd-npn-site-deploy
      - hold:
          type: approval
          requires:
            - deploy-stg
      - deploy-prod:
          requires:
            - hold
          context: msd-prod-site-deploy
  scheduled-workflow:
    triggers:
      - schedule:
          #cron: "0 5 * * 1"
          cron: "* * * * *"
          filters:
            branches:
              only:
                - master
    jobs:
      - build-ami:
          context: msd-npn-packer-credentials
      - refresh-dev:
          requires:
            - build-ami
          context: msd-npn-site-deploy
      - hold:
          type: approval
          requires:
            - refresh-dev
      - refresh-stg:
          requires:
            - hold
          context: msd-npn-site-deploy
      - hold:
          type: approval
          requires:
            - refresh-stg
      - refresh-prod:
          requires:
            - hold
          context: msd-prod-site-deploy

and it stopped running. I now have the cron set to run every minute to test cron: "* * * * *" and it is not running at all. The commit workflow is working. The branch master is correct

4

1 回答 1

0

问题是我有两个同名的审批工作hold。给他们不同的名字修复了它。

于 2021-04-10T18:45:31.910 回答