Pack: BitBucket - Sensor not working?


(LuisN) #1

Sorry for the mass list of questions im posting

Are sensors always running? Q i ask is on a site i found to debug the sensors i ran this

sudo /opt/stackstorm/st2/bin/st2sensorcontainer --config-file=/etc/st2/st2.conf --sensor-ref=bitbucket.RepositorySensor

its running the sensor, why isnt this running already?
Trying to figure out why i keep getting these 2 errors

WARNING [-] branch(master) doesn’t exist in the repository(USERNAME_OMITTED/incident-management) [time data ‘2019-02-25T22:00:17+00:00’ does not match format ‘%Y-%m-%dT%H:%M:%SZ’]

WARNING [-] branch(master) doesn’t exist in the repository(USERNAME_OMITTED/incident-management)

Also, will this sensor send the output via ChatOps?


#2

Those aren’t errors, they are warnings. Make sure the configured repository on Bitbucket has a master branch, or specify a different branch.

Generally, yes, sensors run all the time, but you need to have a rule configured to act on the triggers emitted from the sensor.

What is the issue you are actually having?

The sensor has nothing to do with ChatOps. You can configure ChatOps to work with Bitbucket and Jira with aliases. See the ChatOps documentation for more information:
https://docs.stackstorm.com/chatops/aliases.html


(LuisN) #3

Let me back track a bit,

I installed the pack stackform-bitbucket from GitHub - StackStorm-Exchange/stackstorm-bitbucket: Pack which allows integration with Bitbucket.

from the cli i can perfectly execute a create repo, confirm via bb console. Added a test file and made a commit to the master branch and pushed. am i not understanding the part where it says under sensors:

RepositorySensor

This sensor monitors the BitBucket(Cloud/Server) repositories and dispatches following bitbucket.repository_event trigger.


#4

Our documentation on Sensors and Triggers should help, especially the section on Debugging a sensor from a pack.