mirror of
https://github.com/sartography/cr-connect-bpmn.git
synced 2025-02-28 16:10:43 +00:00
commit
dfc4c09b6b
@ -38,7 +38,7 @@ deploy:
|
|||||||
skip_cleanup: true
|
skip_cleanup: true
|
||||||
on:
|
on:
|
||||||
all_branches: true
|
all_branches: true
|
||||||
condition: $TRAVIS_BRANCH =~ ^(dev|testing|demo|training|staging|master)$
|
condition: $TRAVIS_BRANCH =~ ^(dev|testing|demo|training|staging|master|rrt\/.*)$
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email:
|
email:
|
||||||
|
44
deploy.sh
44
deploy.sh
@ -4,23 +4,45 @@
|
|||||||
pip install --user awscli;
|
pip install --user awscli;
|
||||||
export PATH=$PATH:$HOME/.local/bin;
|
export PATH=$PATH:$HOME/.local/bin;
|
||||||
|
|
||||||
|
function branch_to_tag () {
|
||||||
|
if [ "$1" == "latest" ]; then echo "production"; 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
|
||||||
|
}
|
||||||
|
|
||||||
|
REPO="sartography/cr-connect-bpmn"
|
||||||
|
TAG=$(branch_to_tag "$TRAVIS_BRANCH")
|
||||||
|
|
||||||
|
DEPLOY_APP="bpmn"
|
||||||
|
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]}")
|
||||||
|
fi
|
||||||
|
|
||||||
|
DEPLOY_PATH="$DEPLOY_GROUP/$DEPLOY_STAGE/$DEPLOY_APP"
|
||||||
|
echo "REPO = $REPO"
|
||||||
|
echo "TAG = $TAG"
|
||||||
|
echo "DEPLOY_PATH = $DEPLOY_PATH"
|
||||||
|
|
||||||
# Build and push Docker image to Docker Hub
|
# Build and push Docker image to Docker Hub
|
||||||
echo "$DOCKER_TOKEN" | docker login -u "$DOCKER_USERNAME" --password-stdin || exit 1
|
echo "$DOCKER_TOKEN" | docker login -u "$DOCKER_USERNAME" --password-stdin || exit 1
|
||||||
REPO="sartography/cr-connect-bpmn"
|
docker build -f Dockerfile -t "$REPO:$TAG" . || exit 1
|
||||||
TAG=$(if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo "$TRAVIS_BRANCH" ; fi)
|
|
||||||
COMMIT=${TRAVIS_COMMIT::8}
|
|
||||||
|
|
||||||
docker build -f Dockerfile -t "$REPO:$COMMIT" . || exit 1
|
|
||||||
docker tag "$REPO:$COMMIT" "$REPO:$TAG" || exit 1
|
|
||||||
docker tag "$REPO:$COMMIT" "$REPO:travis-$TRAVIS_BUILD_NUMBER" || exit 1
|
|
||||||
docker push "$REPO" || exit 1
|
docker push "$REPO" || exit 1
|
||||||
|
|
||||||
# Wait for Docker Hub
|
# Wait for Docker Hub
|
||||||
echo "Publishing to Docker Hub..."
|
echo "Publishing to Docker Hub..."
|
||||||
sleep 30
|
sleep 30
|
||||||
|
|
||||||
# Notify DC/OS that Docker image has been updated
|
# Notify UVA DCOS that Docker image has been updated
|
||||||
echo "Refreshing DC/OS..."
|
echo "Refreshing DC/OS..."
|
||||||
STAGE=$(if [ "$TRAVIS_BRANCH" == "master" ]; then echo "production"; else echo "$TRAVIS_BRANCH" ; fi)
|
aws sqs send-message --region "$AWS_DEFAULT_REGION" --queue-url "$AWS_SQS_URL" --message-body "$DEPLOY_PATH" || exit 1
|
||||||
echo "STAGE = $STAGE"
|
|
||||||
aws sqs send-message --region "$AWS_DEFAULT_REGION" --queue-url "$AWS_SQS_URL" --message-body "crconnect/$STAGE/bpmn" || exit 1
|
|
||||||
|
@ -16,7 +16,7 @@ interface NavItem {
|
|||||||
templateUrl: './navbar.component.html',
|
templateUrl: './navbar.component.html',
|
||||||
styleUrls: ['./navbar.component.scss']
|
styleUrls: ['./navbar.component.scss']
|
||||||
})
|
})
|
||||||
export class NavbarComponent implements OnInit {
|
export class NavbarComponent {
|
||||||
navLinks: NavItem[];
|
navLinks: NavItem[];
|
||||||
user: User;
|
user: User;
|
||||||
isSignedIn = isSignedIn;
|
isSignedIn = isSignedIn;
|
||||||
@ -28,9 +28,6 @@ export class NavbarComponent implements OnInit {
|
|||||||
this._loadUser();
|
this._loadUser();
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
}
|
|
||||||
|
|
||||||
isLinkActive(path: string) {
|
isLinkActive(path: string) {
|
||||||
return path === this.router.url;
|
return path === this.router.url;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user