NaCi vs ChatGPT: Which one is better for creating Salesforce CI/CD pipelines in seconds?

If you've been on the internet for the last few days, you have probably heard of ChatGPT, an AI app that can (among many other things) create almost production-ready apex code for you. It's really incredible!

New AI-Powered Chatbot Writes Code & Answers Salesforce Questions | Salesforce Ben
Share this article...With every year that passes, AI continues to amaze us with its automation skills and human-like insights. Everything from voice assistants to facial recognition is powered by AI and is creeping into our lives; it’s slowly becoming ubiquitous. This week, there has been… Read More

Can ChatGPT create a CI/CD Pipeline?

So I wanted to check if the app could create an entire YAML file for a Salesforce CI/CD pipeline. Here's what I asked:

create a github actions yaml file that deploys the delta changes from a salesforce org. The workflow should trigger when a pull request is closed against the "main" branch. The code should be scanned using the sfdx scanner.

And here's the result

The entire YAML file is this one:

name: SFDX Deploy on Pull Request Close
    branches: [main]
    types: [closed]
    runs-on: ubuntu-latest
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v1
          node-version: 12
      - uses: actions/setup-java@v1
      - uses: actions/setup-sfdx@v1
          sfdx-version: latest
      - run: sfdx force:auth:jwt:grant --clientid ${{ secrets.SFDX_CLIENT_ID }} --jwtkeyfile assets/server.key --username ${{ secrets.SFDX_USERNAME }} --setdefaultdevhubusername -a DevHub
      - run: sfdx force:source:deploy -u ${{ secrets.SFDX_USERNAME }} -d src -w 10
      - run: sfdx force:scan:run -u ${{ secrets.SFDX_USERNAME }} -r

Not bad!

What's missing

So, the above is not bad at all! I'm very impressed!

That said, it got a few these things wrong:

  • No delta package was created
  • It didn't use the sfdx scanner to scan the code

NaCi is the clear winner

With NaCi ( ) you can create a fully functional CI/CD pipeline in GitHub Actions (more CI servers coming soon), with just a few clicks

And the output YAML file is 100% accurate, here's a sample one:

salesforce-ci-cd-org-dev/pr-develop-branch.yml at master · salto-io/salesforce-ci-cd-org-dev
Contribute to salto-io/salesforce-ci-cd-org-dev development by creating an account on GitHub.

So turns out some old-school code, in this case, is better than AI. 😅

What do you think? Will AI impact how we think of DevOps and CI/CD?

Subscribe to become a Salesforce API and CI/CD expert