You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
At my job, we have a couple JIRA environments that we use in addition to our production environment. We use these other JIRA installs to test upgrades/updates to JIRA and to install and demo major changes and plugins.
We keep the look and feel of our production environment pretty much stock, so we needed a way to differentiate between our production environment and our other various JIRA installs. I've written some scripts that allow us to refresh these testing environments easily, so that we have current, relevant data pulled from our producton JIRA. Because these test installs can be so similar to our production JIRA after running the scripts, we needed a way to ensure that we are always aware which environment we are in.
Luckily, the JIRA REST API allows us to modify the look and feel of JIRA. And if we can schedule these API calls, in crontab for example, we can ensure that the look and feel for all of our environments are consistent all the time.
Here is a sample of the script we placed in the crontab of our test environments, scheduled to run every minute, that updates the UI/text colors, as well as the main site title:
#!/bin/sh ##TESTING ENVIRONMENT ##Change UI Colors ##Header Background Color /usr/bin/curl -k -D- -u ADMINUSER:ADMINPASSWORD -X PUT --data '{"value" : "#003b48"}' -H "Content-Type: application/json" https://TESTING.DOMAIN.COM/rest/api/2/application-properties/jira.lf.top.bgcolour ##Header Highlight Background Color /usr/bin/curl -k -D- -u ADMINUSER:ADMINPASSWORD -X PUT --data '{"value" : "#708090"}' -H "Content-Type: application/json" https://TESTING.DOMAIN.COM/rest/api/2/application-properties/jira.lf.top.hilightcolour ##Header Separator Color /usr/bin/curl -k -D- -u ADMINUSER:ADMINPASSWORD -X PUT --data '{"value" : "#ffffff"}' -H "Content-Type: application/json" https://jira-staging.trifecta.com/rest/api/2/application-properties/jira.lf.top.separator.bgcolor ##Header Text Color /usr/bin/curl -k -D- -u ADMINUSER:ADMINPASSWORD -X PUT --data '{"value" : "#ffffff"}' -H "Content-Type: application/json" https://TESTING.DOMAIN.COM/rest/api/2/application-properties/jira.lf.top.textcolour ##Menu Item Highlight Background Color /usr/bin/curl -k -D- -u ADMINUSER:ADMINPASSWORD -X PUT --data '{"value" : "#708090"}' -H "Content-Type: application/json" https://TESTING.DOMAIN.COM/rest/api/2/application-properties/jira.lf.menu.bgcolour ##Menu Item Highlight Text Color /usr/bin/curl -k -D- -u ADMINUSER:ADMINPASSWORD -X PUT --data '{"value" : "#ffffff"}' -H "Content-Type: application/json" https://TESTING.DOMAIN.COM/rest/api/2/application-properties/jira.lf.menu.textcolour ##Button Background Color /usr/bin/curl -k -D- -u ADMINUSER:ADMINPASSWORD -X PUT --data '{"value" : "#c0c0c0"}' -H "Content-Type: application/json" https://TESTING.DOMAIN.COM/rest/api/2/application-properties/jira.lf.hero.button.base.bg.colour ##Set Title /usr/bin/curl -k -D- -u ADMINUSER:ADMINPASSWORD -X PUT --data '{"value" : "TESTING ENVIRONMENT"}' -H "Content-Type: application/json" https://TESTING.DOMAIN.COM/rest/api/2/application-properties/jira.title
zack
Solutions Architect
Go2Group
Allentown, PA
11 accepted answers
1 comment