Loading .gitlab-ci.deploy.yml +0 −4 Original line number Diff line number Diff line Loading @@ -3,7 +3,3 @@ STACK: client environment: url: https://${PUBLIC_HOSTNAME} deploy-support-branch-development: variables: DD_VERSION: ${CI_COMMIT_SHORT_SHA} .gitlab-ci.yml +3 −3 Original line number Diff line number Diff line Loading @@ -4,13 +4,13 @@ include: file: '/scanning/dependency-scanning.yml' - project: 'redmic-project/gitlab-ci-templates' ref: master file: '/packaging.yml' file: '/packaging-docker/docker-build.yml' - project: 'redmic-project/gitlab-ci-templates' ref: master file: '/deployment.yml' file: '/deployment-service/docker-deploy.yml' - project: 'redmic-project/gitlab-ci-templates' ref: master file: '/deployment-custom-image.yml' file: '/deployment-service/custom-image.yml' - local: '/.gitlab-ci.scan.yml' - local: '/.gitlab-ci.test.yml' - local: '/.gitlab-ci.build.yml' Loading Gruntfile.js +1 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ module.exports = function(grunt) { }); // Lee los ficheros con configuraciones para las tareas a ejecutar (propias o de terceros) glob.sync('./grunt/config/*.js').forEach(function(file) { glob.globSync('./grunt/config/*.js').forEach(function(file) { require(path.resolve(file))(grunt); }); Loading app/externalRequest.js +22 −0 Original line number Diff line number Diff line Loading @@ -74,6 +74,12 @@ function onOauthTokenRequest(req, res) { res.set('Content-Type', 'application/json'); if (!oauthUrl || !oauthUrl.length) { logger.error('Missing OAuth URL, set it using OAUTH_URL environment variable'); res.send('{}'); return; } const getTokenUrl = oauthUrl + '/token', reqLibrary = getTokenUrl.indexOf('https') === -1 ? http : https; Loading Loading @@ -147,6 +153,12 @@ function onConfigRequest(req, res) { configLastUpdated = Date.now(); }; if (!configUrl || !configUrl.length) { logger.error('Missing config URL, set it using CONFIG_URL environment variable'); res.send('{}'); return; } const reqLibrary = configUrl.indexOf('https') === -1 ? http : https; const internalReq = reqLibrary.request(configUrl, onOwnRequestResponse.bind(this, { Loading Loading @@ -178,6 +190,16 @@ function onSitemapRequest(_req, res) { sitemapLastUpdated = Date.now(); }; if (!sitemapUrl || !sitemapUrl.length) { logger.error('Missing sitemap URL, set it using SITEMAP_URL environment variable'); const emptySitemap = '<?xml version="1.0" encoding="UTF-8"?>\n<urlset ' + 'xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"/>'; res.send(emptySitemap); return; } const reqLibrary = sitemapUrl.indexOf('https') === -1 ? http : https; const internalReq = reqLibrary.request(sitemapUrl, onOwnRequestResponse.bind(this, { Loading app/index.js +13 −3 Original line number Diff line number Diff line const packageJson = require('../package.json'), version = process.env.VERSION || packageJson.version, let version; params = require('./params')(version), try { const fs = require('fs'); version = fs.readFileSync('/version', { encoding: 'utf8' }).trim(); } catch (e) { const packageJson = require('../package.json'); version = packageJson.version; } const params = require('./params')(version), logging = require('./logging'), logger = logging.logger; Loading Loading
.gitlab-ci.deploy.yml +0 −4 Original line number Diff line number Diff line Loading @@ -3,7 +3,3 @@ STACK: client environment: url: https://${PUBLIC_HOSTNAME} deploy-support-branch-development: variables: DD_VERSION: ${CI_COMMIT_SHORT_SHA}
.gitlab-ci.yml +3 −3 Original line number Diff line number Diff line Loading @@ -4,13 +4,13 @@ include: file: '/scanning/dependency-scanning.yml' - project: 'redmic-project/gitlab-ci-templates' ref: master file: '/packaging.yml' file: '/packaging-docker/docker-build.yml' - project: 'redmic-project/gitlab-ci-templates' ref: master file: '/deployment.yml' file: '/deployment-service/docker-deploy.yml' - project: 'redmic-project/gitlab-ci-templates' ref: master file: '/deployment-custom-image.yml' file: '/deployment-service/custom-image.yml' - local: '/.gitlab-ci.scan.yml' - local: '/.gitlab-ci.test.yml' - local: '/.gitlab-ci.build.yml' Loading
Gruntfile.js +1 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ module.exports = function(grunt) { }); // Lee los ficheros con configuraciones para las tareas a ejecutar (propias o de terceros) glob.sync('./grunt/config/*.js').forEach(function(file) { glob.globSync('./grunt/config/*.js').forEach(function(file) { require(path.resolve(file))(grunt); }); Loading
app/externalRequest.js +22 −0 Original line number Diff line number Diff line Loading @@ -74,6 +74,12 @@ function onOauthTokenRequest(req, res) { res.set('Content-Type', 'application/json'); if (!oauthUrl || !oauthUrl.length) { logger.error('Missing OAuth URL, set it using OAUTH_URL environment variable'); res.send('{}'); return; } const getTokenUrl = oauthUrl + '/token', reqLibrary = getTokenUrl.indexOf('https') === -1 ? http : https; Loading Loading @@ -147,6 +153,12 @@ function onConfigRequest(req, res) { configLastUpdated = Date.now(); }; if (!configUrl || !configUrl.length) { logger.error('Missing config URL, set it using CONFIG_URL environment variable'); res.send('{}'); return; } const reqLibrary = configUrl.indexOf('https') === -1 ? http : https; const internalReq = reqLibrary.request(configUrl, onOwnRequestResponse.bind(this, { Loading Loading @@ -178,6 +190,16 @@ function onSitemapRequest(_req, res) { sitemapLastUpdated = Date.now(); }; if (!sitemapUrl || !sitemapUrl.length) { logger.error('Missing sitemap URL, set it using SITEMAP_URL environment variable'); const emptySitemap = '<?xml version="1.0" encoding="UTF-8"?>\n<urlset ' + 'xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"/>'; res.send(emptySitemap); return; } const reqLibrary = sitemapUrl.indexOf('https') === -1 ? http : https; const internalReq = reqLibrary.request(sitemapUrl, onOwnRequestResponse.bind(this, { Loading
app/index.js +13 −3 Original line number Diff line number Diff line const packageJson = require('../package.json'), version = process.env.VERSION || packageJson.version, let version; params = require('./params')(version), try { const fs = require('fs'); version = fs.readFileSync('/version', { encoding: 'utf8' }).trim(); } catch (e) { const packageJson = require('../package.json'); version = packageJson.version; } const params = require('./params')(version), logging = require('./logging'), logger = logging.logger; Loading