- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
an hour ago - edited an hour ago
Greetings, fellow platform professionals! Are you tired of treating your carefully crafted ServiceNow updates like delicate glass sculptures that must be manually transferred between instances, all while praying an accidental update set doesn't shatter your progress? Is sharing your latest scope application with a colleague an exercise in administrative patience?
The solution to these modern development woes is both powerful and surprisingly straightforward: Source Control.
By integrating the ServiceNow IDE (the VS Code Extension) with GitHub and leveraging the intelligence of the Build Agent, we can modernize our workflow from mere instance configuration to a true, professional software development lifecycle.
In this detailed guide, we will embark on a beginning-to-end journey. We'll establish a GitHub connection and demonstrate the fundamental source control capabilities available directly within the ServiceNow IDE. Prepare to elevate your development environment and ditch those legacy management headaches.
The Unassailable Logic: Why GitHub + Build Agent is Essential
Adopting GitHub as your authoritative source for application code, facilitated by the ServiceNow Build Agent, provides three critical advantages for any serious development team:
- Effortless Migration and Collaboration: It lets you more easily save changes to move instance to instance or share apps with others. Your code becomes a portable, versioned asset, allowing for predictable deployments to development, test, and production environments, and simplifying collaboration via standard Git branching and merging.
- The Ultimate Safety Net (The "Undo" Button): You can rollback and revert changes easily. Accidents happen. Whether it's a misplaced semicolon or an entire function that needs removal, source control provides an instant history of your codebase. You can instantly revert to any previous, stable commit.
- Audited and Transparent History: You see clearly what code changes have been made by Build Agent or other developers. Every commit provides an immutable record of who made what modification and when. This high-fidelity audit trail is indispensable for compliance, code review, and debugging.
Ready to transcend the limits of update sets and embrace the future of ServiceNow application development? Let's proceed with the setup! 👇
Prerequisites
- Access to ServiceNow IDE
- Access to Build Agent (Zurich)
Contents
- Creating your GitHub access token for authentication – Part 1
- Create a new repository for your new or existing app. – Part 2
- Set up ServiceNow IDE to connect with your GitHub – Part 3
- Create a new branch and a README for your app with Build Agent – Part 4
- Navigating between branches– Part 5
Creating your GitHub access token for authentication – Part 1
- Click User Image -> Settings
- Scroll down and click Developer settings
- Click Personal access token -> Tokens (classic)
- Click Generate new token
- Click Generate new token (classic)
- Fill out the fields and specify ‘repo’ at a minimum I added workflow and packages for good measure! It’s best practice to set an expiration date but I’ve gone ahead and set ‘No expiration’
- Scroll to the bottom and click Generate token
- Save the token in your notepad or somewhere you can refer to it later.
Create a new repository for your new or existing app. – Part 2
- Go back to the home page on github
- Click the + and then click New repository
- Give it a Name and Description. Also note your GitHub Username – you will need this later.
- Click Create repository
- Note your Repository https url ending in .git – you will need this later.
Set up ServiceNow IDE to connect with your GitHub – Part 3
- Log in to you ServiceNow instance and navigate to ServiceNow IDEOpen a workspace with some code or create a new workspace and create a new app with Build Agent.
- Click Source Control Icon and then click Initialize Repository
- Give your default branch a name
- Click the + button to track / stage changes for all the files in the project
- Click the check box at the top to commit the changes to your repo
- Type in a commit message – then press ‘Enter’
- Click the 3 dots next to Source Control
- Click Push
- You will be prompted to Enter a github repository url - enter your git url ending in .git
- You should get a “Git credential not found" pop up in the bottom right – Click Configure
- You should get a pop-up like so.
- Enter you Git username and personal access token noted from the previous steps then click Submit
- Confirm this was success in the Output logs in the bottom console.
- Go back to your GitHub repository (refresh) – you will see your commit and pushed files
Create a new branch and a README for your app with Build Agent – Part 4
- In ServiceNow IDE > Source Control Tab click the 3 dots then click Branch > Create Branch
- Give it a name such as – “Branch-1” or “README-Branch”
- Go to Build Agent panel on the right and ask it to “Create a GitHub friendly README file for this application”
- Notice in Source Control we have a new file that’s under Untracked Changes. Click the + to Stage the change
- Click the check box next to Source Control to Commit the change
- Enter in a commit message – press ‘Enter’
- Push the changes to GitHub
- Go back to GitHub and select your new branch
- You should see your newly created and pushed README when you scroll down.
Navigating between branches– Part 5
- You can navigate between branches as ‘versions’ of your project by first clicking on any application file in your workspace.
- You will then see a new icon at the bottom left corner of the IDE
- This will open a pop-up to make it easy for you to switch between branches or create new ones. I personally use this to have different versions of my vibe coded apps.
- Remember to Build & Deploy the app if you want the code changes from a branch change to reflect in your live app.
Comparing Changes and Reverting Changes – Part 6
- Make changes to one of your files or just ask build agent to edit any part of your existing application.
- When you open Source Control and click on any of the files you can clearly see the changes that have been made
- You can also cleanly roll-back changes by clicking the ‘backward arrow’ in the source control list
- Pro-Tip: You can also select multiple changes from the list and roll them all back instead of doing them one by one.
And there you have it! By connecting the ServiceNow IDE and Build Agent to GitHub, you've successfully stepped into the modern era of application development.
You're no longer just saving changes; you're versioning them, collaborating seamlessly, and enjoying the powerful safety net of being able to rollback instantly. This process ensures your ServiceNow applications are built with transparency, stability, and the collaborative rigor they deserve.
Happy coding! Now go commit your greatness! 💪
- 33 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Great detail - thank you!
