From f19b897e2253ba82ad38e82df515c596e95e3120 Mon Sep 17 00:00:00 2001 From: gitromba Date: Tue, 14 Jul 2020 13:19:42 +0200 Subject: [PATCH 1/3] remove local Jenkinsfile in favor of shared pipeline --- .Jenkinsfile | 151 --------------------------------------------------- 1 file changed, 151 deletions(-) delete mode 100644 .Jenkinsfile diff --git a/.Jenkinsfile b/.Jenkinsfile deleted file mode 100644 index 7aee54c3..00000000 --- a/.Jenkinsfile +++ /dev/null @@ -1,151 +0,0 @@ -pipeline { - agent { - label 'builder' - } - stages { - stage('Resolve TAO dependencies') { - environment { - GITHUB_ORGANIZATION='oat-sa' - REPO_NAME='oat-sa/extension-tao-testtaker' - } - steps { - sh( - label : 'Create build build directory', - script: 'mkdir -p build' - ) - - withCredentials([string(credentialsId: 'jenkins_github_token', variable: 'GIT_TOKEN')]) { - sh( - label : 'Run the Dependency Resolver', - script: ''' -changeBranch=$CHANGE_BRANCH -TEST_BRANCH="${changeBranch:-$BRANCH_NAME}" -echo "select branch : ${TEST_BRANCH}" -docker run --rm \\ --e "GITHUB_ORGANIZATION=${GITHUB_ORGANIZATION}" \\ --e "GITHUB_SECRET=${GIT_TOKEN}" \\ -tao/dependency-resolver oat:dependencies:resolve --main-branch ${TEST_BRANCH} --repository-name ${REPO_NAME} > build/dependencies.json - -cat > build/composer.json <<- composerjson -{ - "repositories": [ - { - "type": "vcs", - "url": "https://github.com/${REPO_NAME}", - "no-api": true - } - ], -composerjson -tail -n +2 build/dependencies.json >> build/composer.json - ''' - ) - sh( - label: 'composer.json', - script: 'cat build/composer.json' - ) - } - } - } - stage('Install') { - agent { - docker { - image 'alexwijn/docker-git-php-composer' - args "-v $BUILDER_CACHE_DIR/composer:/tmp/.composer-cache -e COMPOSER_CACHE_DIR=/tmp/.composer-cache" - reuseNode true - } - } - environment { - HOME = '.' - } - options { - skipDefaultCheckout() - } - steps { - dir('build') { - sh( - label: 'Install/Update sources from Composer', - script: 'COMPOSER_DISCARD_CHANGES=true composer install --prefer-dist --no-interaction --no-ansi --no-progress --no-suggest' - ) - sh( - label: 'Add phpunit', - script: 'composer require phpunit/phpunit:^8.5 --no-progress' - ) - sh( - label: "Extra filesystem mocks", - script: ''' -mkdir -p taoQtiItem/views/js/mathjax/ && touch taoQtiItem/views/js/mathjax/MathJax.js -mkdir -p tao/views/locales/en-US/ - echo "{\\"serial\\":\\"${BUILD_ID}\\",\\"date\\":$(date +%s),\\"version\\":\\"3.3.0-${BUILD_NUMBER}\\",\\"translations\\":{}}" > tao/views/locales/en-US/messages.json -mkdir -p tao/views/locales/en-US/ - ''' - ) - } - } - } - stage('Tests') { - parallel { - stage('Backend Tests') { - when { - expression { - fileExists('build/taoTestTaker/test/unit') - } - } - agent { - docker { - image 'alexwijn/docker-git-php-composer' - reuseNode true - } - } - options { - skipDefaultCheckout() - } - steps { - dir('build'){ - sh( - label: 'Run backend tests', - script: './vendor/bin/phpunit taoTestTaker/test/unit' - ) - } - } - } - stage('Frontend Tests') { - when { - expression { - fileExists('build/taoTestTaker/views/build/grunt/test.js') - } - } - agent { - docker { - image 'btamas/puppeteer-git' - args "-v $BUILDER_CACHE_DIR/npm:/tmp/.npm-cache -e npm_config_cache=/tmp/.npm-cache" - reuseNode true - } - } - environment { - HOME = '.' - } - options { - skipDefaultCheckout() - } - steps { - dir('build/tao/views/build') { - sh( - label: 'Install tao-core frontend extensions', - script: 'npm install' - ) - sh ( - label : 'Run frontend tests', - script: 'npx grunt connect:test taotesttakertest' - ) - } - } - } - } - } - } - post { - always { - cleanWs disableDeferredWipeout: true - } - } -} From 33573a60898b5703da72be66cb89eda49f072e73 Mon Sep 17 00:00:00 2001 From: gitromba Date: Wed, 15 Jul 2020 11:22:46 +0200 Subject: [PATCH 2/3] bump manifest version --- manifest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.php b/manifest.php index 10ca5585..04893727 100755 --- a/manifest.php +++ b/manifest.php @@ -40,7 +40,7 @@ 'label' => 'Test-taker core extension', 'description' => 'TAO TestTaker extension', 'license' => 'GPL-2.0', - 'version' => '7.7.1', + 'version' => '7.7.2', 'author' => 'Open Assessment Technologies, CRP Henri Tudor', 'requires' => [ 'generis' => '>=12.15.0', From d9960da95c86c98ab7d9eebead88020a04267bb9 Mon Sep 17 00:00:00 2001 From: Ivan Klimchuk Date: Fri, 17 Jul 2020 12:00:28 +0300 Subject: [PATCH 3/3] bundle assets --- views/js/loader/taoTestTaker.min.js.map | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/js/loader/taoTestTaker.min.js.map b/views/js/loader/taoTestTaker.min.js.map index 6b12ef94..860012a1 100644 --- a/views/js/loader/taoTestTaker.min.js.map +++ b/views/js/loader/taoTestTaker.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["../controller/routes.js","../controller/testtaker/editSubject.js","module-create.js"],"names":[],"mappings":"AAmBA,MAAA,CAAA,gCAAA,CAAA,EAAA,CAAA,UAAA,CACA,aAEA,MAAA,CACA,UAAA,CACA,QAAA,CACA,YAAA,kCADA,CADA,CADA,CAOA,CAVA,C,CCCA,MAAA,CAAA,+CAAA,CAAA,CACA,QADA,CAEA,SAFA,CAAA,CAGA,SAAA,CAAA,CAAA,IAAA,CAAA,CACA,MAAA,CACA,KADA,iBACA,CACA,CAAA,CAAA,WAAA,CAAA,CAAA,IAAA,CAAA,UAAA,CACA,IAAA,CAAA,CAAA,CAAA,IAAA,CAAA,CAAA,CAAA,QAAA,EACA,CAFA,CAGA,CALA,CAOA,CAXA,C,CCnBA,MAAA,CAAA,yCAAA,CAAA,UAAA,CAAA,CAAA,C","sourcesContent":["/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2014-2019 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);\n */\n\n//@see http://forge.taotesting.com/projects/tao/wiki/Front_js\ndefine('taoTestTaker/controller/routes',[],function(){\n 'use strict';\n\n return {\n 'TestTaker' : {\n 'actions' : {\n 'editSubject' : 'controller/testtaker/editSubject'\n }\n }\n };\n});\n\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2019 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);\n *\n * @author Ilya Yarkavets \n */\n\ndefine('taoTestTaker/controller/testtaker/editSubject',[\n 'jquery',\n 'ui/lock'\n], function($, lock){\n return {\n start() {\n $('#lock-box').each(function() {\n lock($(this)).register();\n });\n }\n };\n});\n\n","\ndefine(\"taoTestTaker/loader/taoTestTaker.bundle\", function(){});\n"]} \ No newline at end of file +{"version":3,"sources":["../controller/routes.js","../controller/testtaker/editSubject.js","module-create.js"],"names":[],"mappings":"AAmBA,MAAA,CAAA,gCAAA,CAAA,EAAA,CAAA,UAAA,CACA,aAEA,MAAA,CACA,UAAA,CACA,QAAA,CACA,YAAA,kCADA,CADA,CADA,CAOA,CAVA,C,CCCA,MAAA,CAAA,+CAAA,CAAA,CACA,QADA,CAEA,SAFA,CAAA,CAGA,SAAA,CAAA,CAAA,IAAA,CAAA,CACA,MAAA,CACA,KADA,iBACA,CACA,CAAA,CAAA,WAAA,CAAA,CAAA,IAAA,CAAA,UAAA,CACA,IAAA,CAAA,CAAA,CAAA,IAAA,CAAA,CAAA,CAAA,QAAA,EACA,CAFA,CAGA,CALA,CAOA,CAXA,C,CCnBA,MAAA,CAAA,yCAAA,CAAA,UAAA,CAAA,CAAA,C","sourcesContent":["/**\r\n * This program is free software; you can redistribute it and/or\r\n * modify it under the terms of the GNU General Public License\r\n * as published by the Free Software Foundation; under version 2\r\n * of the License (non-upgradable).\r\n *\r\n * This program is distributed in the hope that it will be useful,\r\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r\n * GNU General Public License for more details.\r\n *\r\n * You should have received a copy of the GNU General Public License\r\n * along with this program; if not, write to the Free Software\r\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\r\n *\r\n * Copyright (c) 2014-2019 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);\r\n */\r\n\r\n//@see http://forge.taotesting.com/projects/tao/wiki/Front_js\r\ndefine('taoTestTaker/controller/routes',[],function(){\r\n 'use strict';\r\n\r\n return {\r\n 'TestTaker' : {\r\n 'actions' : {\r\n 'editSubject' : 'controller/testtaker/editSubject'\r\n }\r\n }\r\n };\r\n});\r\n\n","/**\r\n * This program is free software; you can redistribute it and/or\r\n * modify it under the terms of the GNU General Public License\r\n * as published by the Free Software Foundation; under version 2\r\n * of the License (non-upgradable).\r\n *\r\n * This program is distributed in the hope that it will be useful,\r\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r\n * GNU General Public License for more details.\r\n *\r\n * You should have received a copy of the GNU General Public License\r\n * along with this program; if not, write to the Free Software\r\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\r\n *\r\n * Copyright (c) 2019 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);\r\n *\r\n * @author Ilya Yarkavets \r\n */\r\n\r\ndefine('taoTestTaker/controller/testtaker/editSubject',[\r\n 'jquery',\r\n 'ui/lock'\r\n], function($, lock){\r\n return {\r\n start() {\r\n $('#lock-box').each(function() {\r\n lock($(this)).register();\r\n });\r\n }\r\n };\r\n});\r\n\n","\ndefine(\"taoTestTaker/loader/taoTestTaker.bundle\", function(){});\n"]} \ No newline at end of file