Merge branch 'rrt/dev' into rrt/testing

This commit is contained in:
Aaron Louie 2020-06-16 13:25:24 -04:00
commit 958474fb19
5 changed files with 40 additions and 38 deletions

View File

@ -16,7 +16,7 @@ before_install:
- psql -c 'create database crc_test;' -U postgres
install:
- pip install pipenv pytest coverage awscli
- pip install pipenv pytest coverage
- export PATH=$PATH:$HOME/.local/bin;
- pipenv install
@ -35,7 +35,7 @@ after_success:
deploy:
provider: script
script: bash deploy.sh
script: bash deploy.sh sartography/cr-connect-workflow
skip_cleanup: true
on:
all_branches: true

View File

@ -16,7 +16,8 @@ class MultiInstanceType(enum.Enum):
class NavigationItem(object):
def __init__(self, id, task_id, name, title, backtracks, level, indent, child_count, state, is_decision, task=None):
def __init__(self, id, task_id, name, title, backtracks, level, indent, child_count, state, is_decision,
task=None, lane=None):
self.id = id
self.task_id = task_id
self.name = name,

View File

@ -1,44 +1,45 @@
#!/bin/bash
#########################################################################
# Builds the Docker image for the current git branch on Travis CI and
# publishes it to Docker Hub.
#
# Parameters:
# $1: Docker Hub repository to publish to
#
# Required environment variables (place in Settings menu on Travis CI):
# $DOCKER_USERNAME: Docker Hub username
# $DOCKER_TOKEN: Docker Hub access token
#########################################################################
echo 'Building Docker image...'
DOCKER_REPO="$1"
function branch_to_tag () {
if [ "$1" == "latest" ]; then echo "production"; else echo "$1" ; fi
if [ "$1" == "master" ]; then echo "latest"; else echo "$1" ; fi
}
function branch_to_deploy_group() {
if [[ $1 =~ ^(rrt\/.*)$ ]]; then echo "rrt"; else echo "crconnect" ; fi
}
function branch_to_deploy_stage () {
if [ "$1" == "master" ]; then echo "production"; else echo "$1" ; fi
}
DOCKER_TAG=$(branch_to_tag "$TRAVIS_BRANCH")
REPO="sartography/cr-connect-workflow"
TAG=$(branch_to_tag "$TRAVIS_BRANCH")
DEPLOY_APP="backend"
DEPLOY_GROUP=$(branch_to_deploy_group "$TRAVIS_BRANCH")
DEPLOY_STAGE=$(branch_to_deploy_stage "$TRAVIS_BRANCH")
if [ "$DEPLOY_GROUP" == "rrt" ]; then
IFS='/' read -ra ARR <<< "$TRAVIS_BRANCH" # Split branch on '/' character
TAG=$(branch_to_tag "rrt_${ARR[1]}")
DEPLOY_STAGE=$(branch_to_deploy_stage "${ARR[1]}")
DOCKER_TAG=$(branch_to_tag "rrt_${ARR[1]}")
fi
DEPLOY_PATH="$DEPLOY_GROUP/$DEPLOY_STAGE/$DEPLOY_APP"
echo "REPO = $REPO"
echo "TAG = $TAG"
echo "DEPLOY_PATH = $DEPLOY_PATH"
echo "DOCKER_REPO = $DOCKER_REPO"
echo "DOCKER_TAG = $DOCKER_TAG"
# Build and push Docker image to Docker Hub
echo "$DOCKER_TOKEN" | docker login -u "$DOCKER_USERNAME" --password-stdin || exit 1
docker build -f Dockerfile -t "$REPO:$TAG" . || exit 1
docker push "$REPO" || exit 1
docker build -f Dockerfile -t "$DOCKER_REPO:$DOCKER_TAG" . || exit 1
# Wait for Docker Hub
# Push Docker image to Docker Hub
echo "Publishing to Docker Hub..."
sleep 30
# Notify UVA DCOS that Docker image has been updated
echo "Refreshing DC/OS..."
aws sqs send-message --region "$AWS_DEFAULT_REGION" --queue-url "$AWS_SQS_URL" --message-body "$DEPLOY_PATH" || exit 1
docker push "$DOCKER_REPO" || exit 1
echo "Done."

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_1j7idla" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.7.3">
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_1j7idla" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.7.0">
<bpmn:process id="Process_18biih5" isExecutable="true">
<bpmn:startEvent id="StartEvent_1">
<bpmn:outgoing>SequenceFlow_1pnq3kg</bpmn:outgoing>
@ -21,10 +21,10 @@
<bpmn:sequenceFlow id="SequenceFlow_1lmkn99" sourceRef="Task_Has_Bananas" targetRef="ExclusiveGateway_003amsm" />
<bpmn:exclusiveGateway id="ExclusiveGateway_003amsm" name="Has Bananas?">
<bpmn:incoming>SequenceFlow_1lmkn99</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_Yes_Bananas</bpmn:outgoing>
<bpmn:outgoing>SequenceFlow_A_Yes_Bananas</bpmn:outgoing>
<bpmn:outgoing>SequenceFlow_No_Bananas</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="SequenceFlow_Yes_Bananas" name="yes&#10;&#10;" sourceRef="ExclusiveGateway_003amsm" targetRef="Task_Num_Bananas">
<bpmn:sequenceFlow id="SequenceFlow_A_Yes_Bananas" name="yes&#10;&#10;" sourceRef="ExclusiveGateway_003amsm" targetRef="Task_Num_Bananas">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">has_bananas == True</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="SequenceFlow_No_Bananas" name="no" sourceRef="ExclusiveGateway_003amsm" targetRef="Task_Why_No_Bananas">
@ -36,7 +36,7 @@
<camunda:formField id="num_bananas" label="How Many Bananas do you have?" type="long" defaultValue="1" />
</camunda:formData>
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_Yes_Bananas</bpmn:incoming>
<bpmn:incoming>SequenceFlow_A_Yes_Bananas</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_02z84p5</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Task_Why_No_Bananas" name="Why no bananas" camunda:formKey="no_bananas">
@ -75,7 +75,7 @@
<dc:Bounds x="459" y="183" width="13" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0f3vx1l_di" bpmnElement="SequenceFlow_Yes_Bananas">
<bpmndi:BPMNEdge id="SequenceFlow_0f3vx1l_di" bpmnElement="SequenceFlow_A_Yes_Bananas">
<di:waypoint x="475" y="117" />
<di:waypoint x="560" y="117" />
<bpmndi:BPMNLabel>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_83c9f25" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.7.3">
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_83c9f25" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.7.0">
<bpmn:process id="Process_84bead4" isExecutable="true">
<bpmn:startEvent id="StartEvent_1">
<bpmn:outgoing>Flow_1ux3ndu</bpmn:outgoing>
@ -8,13 +8,13 @@
<bpmn:exclusiveGateway id="Gateway_1lh8c45" name="Decide Which Branch?">
<bpmn:incoming>Flow_1ut95vk</bpmn:incoming>
<bpmn:outgoing>Flow_1fok0lz</bpmn:outgoing>
<bpmn:outgoing>Flow_01he29w</bpmn:outgoing>
<bpmn:outgoing>Flow_21he29w</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="Flow_1ut95vk" sourceRef="Activity_07iglj7" targetRef="Gateway_1lh8c45" />
<bpmn:sequenceFlow id="Flow_1fok0lz" name="a" sourceRef="Gateway_1lh8c45" targetRef="Activity_19ig0xo">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">which_branch == 'a'</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="Flow_01he29w" name="b" sourceRef="Gateway_1lh8c45" targetRef="Activity_1hx53cu">
<bpmn:sequenceFlow id="Flow_21he29w" name="b" sourceRef="Gateway_1lh8c45" targetRef="Activity_1hx53cu">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">which_branch == 'b'</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:exclusiveGateway id="Gateway_0ikuwt5">
@ -52,7 +52,7 @@
<camunda:formField id="FormField_1l30p68" label="Do you like pie?" type="boolean" />
</camunda:formData>
</bpmn:extensionElements>
<bpmn:incoming>Flow_01he29w</bpmn:incoming>
<bpmn:incoming>Flow_21he29w</bpmn:incoming>
<bpmn:outgoing>Flow_0ozlczo</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Activity_1b15riu" name="Enter Task 3" camunda:formKey="form_task3">
@ -88,12 +88,12 @@
<di:waypoint x="630" y="177" />
<di:waypoint x="685" y="177" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_01he29w_di" bpmnElement="Flow_01he29w">
<bpmndi:BPMNEdge id="Flow_01he29w_di" bpmnElement="Flow_21he29w">
<di:waypoint x="450" y="202" />
<di:waypoint x="450" y="290" />
<di:waypoint x="530" y="290" />
<bpmndi:BPMNLabel>
<dc:Bounds x="462" y="243" width="6" height="14" />
<dc:Bounds x="462" y="243" width="7" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1fok0lz_di" bpmnElement="Flow_1fok0lz">