Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

Recognition

  • Give kudos
  • My kudos

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to set up alerts when production code differs from SVN trunk

I am interested in setting up an email alert that would get triggered if the code in our production environment differs from what is in the SVN Trunk.

I am wondering if something like this could be accomplished using bamboo.

1 answer

0 votes
Jeyanthan I Atlassian Team Dec 28, 2017

From your description, I assume you have 2 branches in your SVN repository - a trunk and a production branch. Now you wanted to get an alert when there is a mismatch in both the branches. Please clarify if otherwise.

We can do so by the following sequence. 

Write a script (using a Script task) with the below logic.

- Do an svn diff against 2 branches. The below command lists a summary of files that have been added/modified/deleted

svn diff http://REPOS/trunk http://REPOS/branches/PRODUCTION --summarize

- If the result throws more lines, exit the script with exit 1

- This fails the build and sends you an email notification.

- You can now add a trigger to the plan, such that this build is run whenever a new commit is made in the repository.

Hope that helps.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 7.1 is here and is packed with value!

I'm happy to announce that Bamboo 7.1 has been released and it’s overflowing with awesome new features. Top-voted issues First and foremost, a bunch of JAC top voted issues has been delivered - y...

694 views 1 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you