Can I accomplish this simple CICD pipeline with CircleCI?

I’m evaluating CircleCI for one of my company project. Before I initiate expenses/pricing/sales team to get a trial license, I want to know whether I can achieve this simple pipeline with CircleCI.

workflows:
  schedule: <cron to run every 24hours>
  build-test-and-approval-deploy:
  # Aim of this workflow is to test output of a Python Code not the correctness of the code itself.
    jobs:
      - build  # Run a Python program from Repo1 that outputs a JSON feed. 
      - sanity-test: # Test sanity of JSON feed
      - open-pull-request: # commit above JSON in another repo Repo2 in a new Branch and open a PR
      - hold: # wait for manual approval of above pull request on Repo2
          type: approval
      - deploy: # Merge above PR into master in Repo2, delete the temp branch and create a new release.
          requires:
            - hold

I can’t see any issues with the outline you’ve created. All of that should be possible from within the jobs. note that there is a limit of 15 days to use the approval job. So as long as you expect to approve it within the 15 day window you should be okay. You could also merge the build/test/pull-request into a single job along with the approval job to reduce complexity.

Thanks Fernando.

To double check with you, the first step “build” will be run in GitHub Repo1 and later down the line, the pull request will be done in another GitHub Repo2. CircleCI needs to create branch, commits etc on second repo.

Also during “hold” step, do we have ability to send slack/email notification that a manual approval is waiting?

Lastly, I see CircleCI supports Artifacts. Does it have ability to “view” them too? Our artificats will be text files and ideal case would be to view them on the web app itself rather downloading.

Appreciate your thoughts, this will help in quickly completing my PoC and decisions.

Thank you.

I think you may need to interact with the GitHub API to perform some of those actions but there shouldn’t be any issues with performing those actions from within a job. You can add additional SSH keys to provide wider access to secure resources if need be. Or you can add a GitHub API key as a secure environment variable for any interactions that require using the API directly.

For notifications you wouldn’t do it in the approval job. It’s not a real job that you can add steps into. But you can add them to the end of the build job after it has performed all the other tasks successfully. Our slack orb can help simplify adding custom messages throughout your job,. It also has some examples on notifying when a workflow needs approval.

For artifacts you can indeed view them in the UI. They will be available in the artifacts tab on a completed job page. You can click through and view each file.