Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync master with staging #356

Merged
merged 50 commits into from
May 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
e80b8f9
PCHR-3353: Set custom field group that should not be editable to is_r…
ajesamson Feb 26, 2018
09729ee
PCHR-3353: Coding standard refactor
ajesamson Feb 26, 2018
3a8c5df
PCHR-3353: Code refactor for Jenkins build failure
ajesamson Feb 28, 2018
6cdf539
Merge pull request #317 from compucorp/PCHR-3353-set-custom-field-gro…
ajesamson Feb 28, 2018
5af6344
PCHR-3376: Remove "Case Statuses" from items to clone to "Tasks" menu
mickadoo Mar 13, 2018
2778446
PCHR-3376: Add upgrader to set weights and permissions
mickadoo Mar 13, 2018
fea0636
PCHR-3376: (from review) reduce API calls
mickadoo Mar 13, 2018
2fa84ea
Merge pull request #325 from compucorp/PCHR-3376-update-permissions
mickadoo Mar 13, 2018
432c591
PCHR-3376: Change label
mickadoo Mar 15, 2018
d64624a
Merge pull request #326 from compucorp/PCHR-3299-qa-fixes
mickadoo Mar 15, 2018
fc1985a
Merge pull request #343 from compucorp/PCHR-3162-configurability-changes
mickadoo Apr 19, 2018
c04b371
PCHR-3592: Add slack notifications to jenkinsfile
Apr 24, 2018
02a47cd
Merge pull request #349 from compucorp/PCHR-3592-set-up-jenkins-slack
AkA84 Apr 25, 2018
eecc4fa
PCHR-3635: Update npm dependencies
Apr 27, 2018
6c88ea3
Merge pull request #352 from compucorp/PCHR-3635-fix-hoek-github-warning
AkA84 Apr 27, 2018
30649e4
PCHR-3635: Update package-lock.json
Apr 27, 2018
47703f9
PCHR-3400: Change Workflow help text
reneolivo Mar 2, 2018
697ae8c
PCHR-3400: PR Feedback
reneolivo Mar 2, 2018
6ccb633
PCHR-3402: Remove non relevant tabs from workflows configuration
reneolivo Mar 4, 2018
49a8728
PCHR-3403: Replace action dropdown with add timeline button
reneolivo Mar 5, 2018
caef6c4
PCHR-3403: Move help text outside of case type form
reneolivo Mar 6, 2018
e272714
PCHR-3405: Rename the case status for Ongoing and Resolved to In Prog…
reneolivo Apr 9, 2018
469dfd5
PCHR-3416: Hide reserved activity types
deb1990 Apr 9, 2018
f6abf78
PCHR-3405: PR Feedback
reneolivo Apr 9, 2018
949befe
PCHR-3529: POC
deb1990 Apr 13, 2018
4d2d04e
PCHR-3529: Change dropdown placeholder
deb1990 Apr 13, 2018
9d0ae80
PCHR-3529: Move core dependies
deb1990 Apr 13, 2018
ef5aa9a
PCHR-3529: Fix tasks
deb1990 Apr 13, 2018
74b3dbf
PCHR-3529: Move T&A test files
deb1990 Apr 13, 2018
a5ef9f5
PCHR-3529: Unit tests
deb1990 Apr 16, 2018
de62ef4
PCHR-3529: PR Feedback
deb1990 Apr 17, 2018
dd6669b
PCHR-3529: Add activity options loader
deb1990 Apr 17, 2018
b20ce96
PCHR-3529: Change controller logic
deb1990 Apr 17, 2018
cfd3574
PCHR-3529: PR Feedback changes
deb1990 Apr 17, 2018
4e4e9c2
PCHR-3575: Hide Columns and Show component type
deb1990 Apr 17, 2018
a7b4395
PCHR-3575: Hide Columns and Show component type
deb1990 Apr 17, 2018
657b7c4
PCHR-3575: Unit Tests
deb1990 Apr 18, 2018
6512dc0
PCHR-3575: PR Feedback
deb1990 Apr 18, 2018
c432c30
PCHR-3596: Rename T&A Modal
deb1990 Apr 20, 2018
9b3d267
PCHR-3417: Add upgrader to remove activity types not needed by the ex…
reneolivo Apr 23, 2018
6e189f1
PCHR-3417: Fix lint issues
reneolivo Apr 23, 2018
0be17fe
PCHR-3417: Refactor activity uninstall function
reneolivo Apr 23, 2018
ecc22b5
PCHR-3417: PR Feedback
reneolivo Apr 23, 2018
0adee25
PCHR-3417: Add missing activity type to be removed
reneolivo Apr 25, 2018
c6e387a
Merge pull request #355 from compucorp/PCHR-3635-additional-fix
AkA84 Apr 27, 2018
5d973a6
Merge branch 'staging' into PCHR-3369-tasks-and-workflows-ux-improvem…
reneolivo Apr 27, 2018
9eb8de7
PCHR-3369: Fix package-lock.json file
reneolivo Apr 27, 2018
56b875d
Merge pull request #354 from compucorp/PCHR-3369-tasks-and-workflows-…
reneolivo Apr 30, 2018
9d2c6e1
PCHR-3638: Bump ext version
davialexandre Apr 30, 2018
bbf8411
Merge pull request #358 from compucorp/PCHR-3638-bump-version
davialexandre Apr 30, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 55 additions & 14 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pipeline {
stages {
stage('Pre-tasks execution') {
steps {
sendBuildStartdNotification()
sendBuildStartNotification()

// Print all Environment variables
sh 'printenv | sort'
Expand Down Expand Up @@ -161,26 +161,34 @@ pipeline {
/*
* Sends a notification when the build starts
*/
def sendBuildStartdNotification() {
def message = 'Building ' + getBuildTargetLink() + '. ' + getReportLink()
def sendBuildStartNotification() {
def msgHipChat = 'Building ' + getBuildTargetLink('hipchat') + '. ' + getReportLink('hipchat')
def msgSlack = 'Building ' + getBuildTargetLink('slack') + '. ' + getReportLink('slack')

sendHipchatNotification('YELLOW', message)
sendHipchatNotification('YELLOW', msgHipChat)
sendSlackNotification('warning', msgSlack)
}

/*
* Sends a notification when the build is completed successfully
*/
def sendBuildSuccessNotification() {
def message = getBuildTargetLink() + ' built successfully. Time: $BUILD_DURATION. ' + getReportLink()
sendHipchatNotification('GREEN', message)
def msgHipChat = getBuildTargetLink('hipchat') + ' built successfully. Time: $BUILD_DURATION. ' + getReportLink('hipchat')
def msgSlack = getBuildTargetLink('slack') + ' built successfully. Time: ' + getBuildDuration(currentBuild) + '. ' + getReportLink('slack')

sendHipchatNotification('GREEN', msgHipChat)
sendSlackNotification('good', msgSlack)
}

/*
* Sends a notification when the build fails
*/
def sendBuildFailureNotification() {
def message = 'Failed to build ' + getBuildTargetLink() + '. Time: $BUILD_DURATION. No. of failed tests: ${TEST_COUNTS,var=\"fail\"}. ' + getReportLink()
sendHipchatNotification('RED', message)
def msgHipChat = 'Failed to build ' + getBuildTargetLink('hipchat') + '. Time: $BUILD_DURATION. No. of failed tests: ${TEST_COUNTS,var=\"fail\"}. ' + getReportLink('hipchat')
def msgSlack = 'Failed to build ' + getBuildTargetLink('slack') + '. Time: ' + getBuildDuration(currentBuild) + '. ' + getReportLink('slack')

sendHipchatNotification('RED', msgHipChat)
sendSlackNotification('danger', msgSlack)
}

/*
Expand All @@ -190,16 +198,38 @@ def sendHipchatNotification(String color, String message) {
hipchatSend color: color, message: message, notify: true
}

/*
* Sends a notification to Slack
*/
def sendSlackNotification(String color, String message) {
slackSend color: color, message: message, notify: true
}

/*
* Returns the build duration without the "and counting" suffix
*/
def getBuildDuration(build) {
return build.durationString.replace(' and counting', '')
}

/*
* Returns a link to what is being built. If it's a PR, then it's a link to the pull request itself.
* If it's a branch, then it's a link in the format http://github.com/org/repo/tree/branch
*/
def getBuildTargetLink() {
if(buildIsForAPullRequest()) {
return "<a href=\"${env.CHANGE_URL}\">\"${env.CHANGE_TITLE}\"</a>"
def getBuildTargetLink(String client) {
def link = ''
def forPR = buildIsForAPullRequest()

switch (client) {
case 'hipchat':
link = forPR ? "<a href=\"${env.CHANGE_URL}\">\"${env.CHANGE_TITLE}\"</a>" : '<a href="' + getRepositoryUrlForBuildBranch() + '">"' + env.BRANCH_NAME + '"</a>'
break;
case 'slack':
link = forPR ? "<${env.CHANGE_URL}|${env.CHANGE_TITLE}>" : '<' + getRepositoryUrlForBuildBranch() + '|' + env.BRANCH_NAME + '>'
break;
}

return '<a href="' + getRepositoryUrlForBuildBranch() + '">"' + env.BRANCH_NAME + '"</a>'
return link
}

/*
Expand All @@ -222,8 +252,19 @@ def getRepositoryUrlForBuildBranch() {
/*
* Returns the Blue Ocean build report URL for the current job
*/
def getReportLink() {
return 'Click <a href="$BLUE_OCEAN_URL">here</a> to see the build report'
def getReportLink(String client) {
def link = ''

switch (client) {
case 'hipchat':
link = 'Click <a href="$BLUE_OCEAN_URL">here</a> to see the build report'
break
case 'slack':
link = "Click <${env.RUN_DISPLAY_URL}|here> to see the build report"
break
}

return link
}

def cloneRepositories(String envBranch) {
Expand Down
Loading