Oracle - Repository Polling - Scheduled (v5.8+)

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

 

 

Product
Version
Database
Documentation reference
Bamboo
 V5.8.X V5.9.X V5.10.X V5.11.X V5.12.X V5.13.X
OraclePolling the repository for changes

Lets find out how to get Bamboo's repository polling scheduled values from Oracle database along with updating those values.

Get repository polling as Scheduled 

/* 
 * Bamboo version: 5.8+
 * Database: Oracle
 * Triggers: 'Repository polling' > 'Polling strategy' > 'Scheduled'
 */
select B.FULL_KEY PLAN_KEY,
       B.TITLE TITLE,
       VL.PLUGIN_KEY REPOSITORY_TYPE,
       XMLTYPE(BD.XML_DEFINITION_DATA).EXTRACT('//triggerDefinition/pluginKey[text()="com.atlassian.bamboo.triggers.atlassian-bamboo-triggers:poll"]/../config/item/key[text()="repository.change.poll.type"]/../value[text()="CRON"]/../../item/key[text()="repository.change.poll.cronExpression"]/../value/text()').getStringVal() SCHEDULED,
       BD.BUILD_DEFINITION_ID BUILD_DEFINITION_ID
  from VCS_LOCATION VL
  join PLAN_VCS_LOCATION PVL on PVL.VCS_LOCATION_ID = VL.VCS_LOCATION_ID
  join BUILD B on PVL.PLAN_ID = B.BUILD_ID
  join BUILD_DEFINITION BD on B.BUILD_ID = BD.BUILD_ID
 where B.SUSPENDED_FROM_BUILDING = 0
   and XMLTYPE(BD.XML_DEFINITION_DATA).EXTRACT('//triggerDefinition/pluginKey[text()="com.atlassian.bamboo.triggers.atlassian-bamboo-triggers:poll"]/../config/item/key[text()="repository.change.poll.type"]/../value[text()="CRON"]/../../item/key[text()="repository.change.poll.cronExpression"]/../value/text()').getStringVal() IS NOT NULL
 order by SCHEDULED desc, PLAN_KEY, TITLE;

What expect from query above:

PLAN_KEY

TITLE

SCHEDULED

BUILD_DEFINITION_ID

REP-GIT

Git

0 0 12 ? * *

425985
REP-SUBSubversion0 0 13 ? * *451238

Last modified on Nov 2, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.