Commit 42e4bbc7 authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Merge branch 'dev' into 'master'

v0.26.0

See merge request redmic-project/client/web!102
parents 0de7a2c8 4fc70587
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -3,7 +3,3 @@
    STACK: client
  environment:
    url: https://${PUBLIC_HOSTNAME}

deploy-support-branch-development:
  variables:
    DD_VERSION: ${CI_COMMIT_SHORT_SHA}
+3 −3
Original line number Diff line number Diff line
@@ -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'
+1 −1
Original line number Diff line number Diff line
@@ -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);
	});
+22 −0
Original line number Diff line number Diff line
@@ -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;

@@ -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, {
@@ -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, {
+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