This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dependencies { | |
testCompile "junit:junit-dep:4.11" | |
testCompile "info.cukes:cucumber-scala_2.10:1.2.2"//TODO: Can be deleted? | |
testCompile "info.cukes:cucumber-core:1.2.2" | |
testCompile 'info.cukes:cucumber-java:1.2.2' | |
testCompile "info.cukes:cucumber-junit:1.2.2" //TODO: Not needed? | |
//If you'd like some dependencies | |
testCompile 'info.cukes:cucumber-spring:1.2.2' | |
testCompile 'org.springframework:spring-test:4.0.5.RELEASE' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git log `git describe --tags --abbrev=0`..HEAD --format=%s | grep -o "^\w*-\d*" | sort | uniq |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hubot: | |
build: . | |
restart: always | |
links: | |
- redis:redis | |
environment: | |
HUBOT_SLACK_TOKEN: <magic-token-here> | |
data: | |
image: redis | |
command: /bin/true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//http://javadoc.jenkins-ci.org/ | |
/* | |
* Script for upping the minor version of the starting job, named ARTIFACT_PROJECT | |
* We expect every version to arrive here following this version strategy: major.minor | |
*/ | |
import hudson.model.* | |
import jenkins.model.Jenkins | |
//Get the parameters | |
def originalVersion = build.buildVariableResolver.resolve("VERSION") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Using Spring to create a reader. Should be easy to write this yourself. | |
//file is the xml response you got stripped of SoapEnvelope and SoapBody. | |
def classpathResource: ClassPathResource = new ClassPathResource(file) | |
def inputStream: InputStream = classpathResource.getInputStream() | |
def xmlInputFactory: XMLInputFactory = XMLInputFactory.newInstance() | |
def xmlReader: XMLStreamReader = xmlInputFactory.createXMLStreamReader(inputStream) | |
//ObjectFactory you can find in your jax ws generated code | |
val instance: JAXBContext = JAXBContext.newInstance(classOf[ObjectFactory]) | |
val unmarshaller: Unmarshaller = instance.createUnmarshaller() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fabric.api import run | |
def whoami(): | |
run('whoami') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.idea/* | |
!.idea/runConfigurations/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task_that_failes = BashOperator( | |
task_id="task_that_failes", | |
bash_command="this-will-fail", | |
on_failure_callback=OpsGenieExceptionReporter(), | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class OpsGenieExceptionReporter(): | |
def __init__(self, connection_id: str = opsgenie_default,) -> None: | |
self.connection_id = connection_id | |
def __call__(self, context) -> requests.Response: | |
ti: TaskInstance = context["ti"] | |
json = { | |
"message": f"Something went terribly wrong with {ti.task_id}", | |
"description": f"See more at {ti.log_url}", | |
"responders": [{"name": "my-fancy-team", "type": "team"}], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class OpsGenieCloseHandler(): | |
def __init__(self, connection_id: str = "opsgenie_default",) -> None: | |
self.connection_id = connection_id | |
def __call__(self, context) -> requests.Response: | |
task_instance: TaskInstance = context['task_instance'] | |
if task_instance.try_number > 1: | |
# create the alias | |
alias = f"{ti.dag_id}.{ti.task_id}-{context['ds']}" | |