Skip to content

Commit f353721

Browse files
Merge pull request #763 from vaibhavbhuva/release-5.2.0
Megre Release 5.2.0 into master
2 parents 922b86e + c7c385c commit f353721

File tree

214 files changed

+10183
-542
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

214 files changed

+10183
-542
lines changed

Jenkinsfile

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,39 +9,30 @@ node() {
99
ansiColor('xterm') {
1010
stage('Checkout') {
1111
cleanWs()
12-
if (params.github_release_tag == "") {
13-
dir('content-plugins') {
12+
13+
dir('content-plugins'){
1414
checkout scm
1515
commit_hash = sh(script: 'git rev-parse --short HEAD', returnStdout: true).trim()
16-
branch_name = sh(script: 'git name-rev --name-only HEAD | rev | cut -d "/" -f1| rev', returnStdout: true).trim()
17-
artifact_version = branch_name + "_" + commit_hash
18-
println(ANSI_BOLD + ANSI_YELLOW + "github_release_tag not specified, using the latest commit hash: " + commit_hash + ANSI_NORMAL)
19-
}
20-
}else {
21-
dir('content-plugins') {
22-
def scmVars = checkout scm
23-
checkout scm: [$class: 'GitSCM', branches: [[name: "refs/tags/${params.github_release_tag}"]], userRemoteConfigs: [[url: scmVars.GIT_URL]]]
24-
artifact_version = params.github_release_tag
25-
println(ANSI_BOLD + ANSI_YELLOW + "github_release_tag specified, building from github_release_tag: " + params.github_release_tag + ANSI_NORMAL)
26-
}
16+
artifact_version = sh(script: "echo " + params.github_release_tag.split('/')[-1] + "_" + commit_hash + "_" + env.BUILD_NUMBER, returnStdout: true).trim()
2717
}
28-
18+
19+
2920

3021
echo "artifact_version: " + artifact_version
3122

3223
stage('Build') {
3324
sh """
34-
zip -r content-plugins.zip content-plugins
25+
zip -r content-plugins.zip content-plugins
3526
"""
3627
}
37-
38-
39-
28+
29+
30+
4031
stage('ArchiveArtifacts') {
4132
sh """
4233
mkdir content-plugins-artifacts
4334
cp content-plugins.zip content-plugins-artifacts
44-
zip -j content-plugins-artifacts.zip:${artifact_version} content-plugins-artifacts/*
35+
zip -j content-plugins-artifacts.zip:${artifact_version} content-plugins-artifacts/*
4536
"""
4637
archiveArtifacts "content-plugins-artifacts.zip:${artifact_version}"
4738
sh """echo {\\"artifact_name\\" : \\"content-plugins-artifacts.zip\\", \\"artifact_version\\" : \\"${artifact_version}\\", \\"node_name\\" : \\"${env.NODE_NAME}\\"} > metadata.json"""

auto_build_deploy

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
@Library('deploy-conf') _
2+
node() {
3+
try {
4+
String ANSI_GREEN = "\u001B[32m"
5+
String ANSI_NORMAL = "\u001B[0m"
6+
String ANSI_BOLD = "\u001B[1m"
7+
String ANSI_RED = "\u001B[31m"
8+
String ANSI_YELLOW = "\u001B[33m"
9+
10+
11+
tag_name = env.JOB_NAME.split("/")[-1]
12+
pre_checks()
13+
ansiColor('xterm') {
14+
stage('Checkout') {
15+
cleanWs()
16+
dir('content-plugins'){
17+
def scmVars = checkout scm
18+
checkout scm: [$class: 'GitSCM', branches: [[name: "refs/tags/$tag_name"]], userRemoteConfigs: [[url: scmVars.GIT_URL]]]
19+
artifact_version = tag_name
20+
}
21+
}
22+
echo "artifact_version: " + artifact_version
23+
24+
// stage Build
25+
sh """
26+
zip -r content-plugins.zip content-plugins
27+
"""
28+
29+
// stage archive artifacts
30+
sh """
31+
mkdir content-plugins-artifacts
32+
cp content-plugins.zip content-plugins-artifacts
33+
zip -j content-plugins-artifacts.zip:${artifact_version} content-plugins-artifacts/*
34+
"""
35+
archiveArtifacts "content-plugins-artifacts.zip:${artifact_version}"
36+
sh """echo {\\"artifact_name\\" : \\"content-plugins-artifacts.zip\\", \\"artifact_version\\" : \\"${artifact_version}\\", \\"node_name\\" : \\"${env.NODE_NAME}\\"} > metadata.json"""
37+
archiveArtifacts artifacts: 'metadata.json', onlyIfSuccessful: true
38+
currentBuild.description = "${artifact_version}"
39+
40+
}
41+
currentBuild.result = "SUCCESS"
42+
slack_notify(currentBuild.result, tag_name)
43+
email_notify()
44+
auto_build_deploy()
45+
}
46+
47+
catch (err) {
48+
currentBuild.result = "FAILURE"
49+
slack_notify(currentBuild.result, tag_name)
50+
email_notify()
51+
throw err
52+
}
53+
54+
55+
}

az_copy.sh

Lines changed: 0 additions & 97 deletions
This file was deleted.

org.ekstep.assetbrowser-1.3/editor/assetBrowser.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -818,19 +818,20 @@
818818
<div class="clearfix">&nbsp;</div>
819819
<div class="grouped required fields">
820820
<label for="ccByContribution" >Copyright & License:</label>
821-
<p class="licenseMessage">I understand and confirm that all resources and assets created through the content editor or uploaded on the platform shall be available for free and public use without limitations on the platform (web portal, applications and any other end user interface that the platform would enable) and will be licensed under terms & conditions and policy guidelines of the platform.</p>
822-
<div class="field">
821+
<p class="licenseMessage">I understand and confirm that all resources and assets created through the content editor or uploaded on the platform shall be available for free and public use without limitations on the platform (web portal, applications and any other end user interface that the platform would enable) and will be licensed under terms & conditions and policy guidelines of the platform. In doing so, the copyright and license of the original author is not infringed. </p>
822+
<!-- <input name="ccByContribution" type="hidden" value="{{$ctrl.DefaultTanantLicense}}"> -->
823+
<!-- <div class="field">
823824
<div class="ui radio checkbox">
824825
<input id="ccByContribution1" ng-disabled="$ctrl.hideLicenseField" name="ccByContribution" type="radio" ng-click="$ctrl.setPublic()" value="Creative Commons Attribution (CC BY)">
825826
<label for="ccByContribution1" ng-click="$ctrl.setPublic(); $ctrl.generateTelemetry({id: 'ccByContribution1', type: 'click', subtype: 'select', target: 'selectCCBYproperty'});">Yes, make it available to everyone</label>
826827
</div>
827-
</div>
828-
<div class="field">
828+
</div> -->
829+
<!-- <div class="field">
829830
<div class="ui radio checkbox">
830831
<input id="ccByContribution2" ng-disabled="$ctrl.hideLicenseField" name="ccByContribution" type="radio" ng-click="$ctrl.setPrivate()" value="">
831832
<label for="ccByContribution2" ng-click="$ctrl.setPrivate(); $ctrl.generateTelemetry({id: 'ccByContribution2', type: 'click', subtype: 'select', target: 'unselectCCBYproperty'});">No, don't share with anyone</label>
832833
</div>
833-
</div>
834+
</div> -->
834835
</div>
835836
</div>
836837
<div class="column" id="hideShowFields">

org.ekstep.assetbrowser-1.3/editor/assetbrowserapp.js

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ angular.module('assetbrowserapp').controller('browsercontroller', ['$scope', '$i
192192
identifier: obj.identifier,
193193
name: obj.name,
194194
mimeType: obj.mimeType,
195-
license: obj.license,
195+
// license: obj.license,
196196
contentType: obj.contentType
197197
});
198198
}
@@ -523,14 +523,17 @@ angular.module('assetbrowserapp').controller('browsercontroller', ['$scope', '$i
523523
}
524524
});
525525

526-
ctrl.setPublic = function(task) {
527-
ctrl.assetMeta.license = "Creative Commons Attribution (CC BY)";
528-
ctrl.asset.requiredField = 'required';
529-
ctrl.optional = false;
530-
if(task == 'hide') {
531-
ctrl.hideLicenseField = true;
532-
}
533-
}
526+
// ctrl.DefaultTanantLicense = ((ecEditor.getContext("defaultLicense")) ? ecEditor.getContext("defaultLicense") : "");
527+
// ctrl.assetMeta.license = ctrl.DefaultTanantLicense;
528+
529+
// ctrl.setPublic = function(task) {
530+
// ctrl.assetMeta.license = "Creative Commons Attribution (CC BY)";
531+
// ctrl.asset.requiredField = 'required';
532+
// ctrl.optional = false;
533+
// if(task == 'hide') {
534+
// ctrl.hideLicenseField = true;
535+
// }
536+
// }
534537

535538
ctrl.viewMore = function() {
536539
ecEditor.jQuery('.removeError').each(function() {
@@ -539,11 +542,11 @@ angular.module('assetbrowserapp').controller('browsercontroller', ['$scope', '$i
539542
ctrl.hideField = false;
540543
}
541544

542-
ctrl.setPrivate = function() {
543-
delete ctrl.assetMeta.license;
544-
ctrl.asset.requiredField = '';
545-
ctrl.optional = true;
546-
}
545+
// ctrl.setPrivate = function() {
546+
// delete ctrl.assetMeta.license;
547+
// ctrl.asset.requiredField = '';
548+
// ctrl.optional = true;
549+
// }
547550

548551
ctrl.showFileInfo = function() {
549552
var file;
@@ -647,8 +650,8 @@ angular.module('assetbrowserapp').controller('browsercontroller', ['$scope', '$i
647650
"createdFor": ecEditor._.keys(ecEditor.getContext('user').organisations),
648651
"contentType": "Asset",
649652
"osId": "org.ekstep.quiz.app",
650-
"language": content.language,
651-
"license": content.license
653+
"language": content.language
654+
// "license": content.license
652655
}
653656
}
654657
}
@@ -702,11 +705,9 @@ angular.module('assetbrowserapp').controller('browsercontroller', ['$scope', '$i
702705
var signedURL = res.data.result.pre_signed_url;
703706
var config = {
704707
processData: false,
705-
contentType : ctrl.mimeType,
706-
headers: {
707-
'x-ms-blob-type': 'BlockBlob'
708-
}
708+
contentType : ctrl.mimeType
709709
}
710+
config = $scope.contentService.appendCloudStorageHeaders(config);
710711
ctrl.uploadToSignedURL(signedURL, file, config, nodeID)
711712
}
712713
})
@@ -982,7 +983,7 @@ angular.module('assetbrowserapp').controller('browsercontroller', ['$scope', '$i
982983
identifier: obj.identifier,
983984
name: obj.name,
984985
mimeType: obj.mimeType,
985-
license: obj.license,
986+
//license: obj.license,
986987
contentType: obj.contentType
987988
});
988989
}else if(mediaType == 'video'){
@@ -991,7 +992,7 @@ angular.module('assetbrowserapp').controller('browsercontroller', ['$scope', '$i
991992
identifier: obj.identifier,
992993
name: obj.name,
993994
mimeType: obj.mimeType,
994-
license: obj.license,
995+
// license: obj.license,
995996
contentType: obj.contentType
996997
});
997998
}
@@ -1184,7 +1185,7 @@ angular.module('assetbrowserapp').controller('browsercontroller', ['$scope', '$i
11841185
});
11851186
} else if(res.data.result.license.valid){
11861187
ctrl.previewVideo(request.url, ctrl.plugin, request.provider)
1187-
ctrl.setPublic('hide');
1188+
// ctrl.setPublic('hide');
11881189
$scope.$safeApply();
11891190
}else{
11901191
ecEditor.dispatchEvent("org.ekstep.toaster:error", {
@@ -1240,7 +1241,7 @@ angular.module('assetbrowserapp').controller('browsercontroller', ['$scope', '$i
12401241
ecEditor.jQuery('.assetbrowser .ui.dropdown').dropdown();
12411242
ecEditor.jQuery('.assetbrowser .ui.radio.checkbox').checkbox();
12421243
ecEditor.jQuery('.field', '#hideShowFields').addClass('disabled');
1243-
ecEditor.jQuery("#ccByContribution1").click();
1244+
// ecEditor.jQuery("#ccByContribution1").click();
12441245

12451246
ecEditor.jQuery(document).one('change', '#assetName, #assetfile', function() {
12461247
ctrl.uploadBtnDisabled = false;

org.ekstep.assetbrowser-1.3/editor/plugin.js

Lines changed: 3 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)