Merge branch 'main' into develop
commit
fd0778d096
|
@ -1,2 +1,9 @@
|
||||||
ogWebconsole/.env
|
ogWebconsole/.env
|
||||||
ogWebconsole/test-results/ogGui-junit-report.xml
|
ogWebconsole/test-results/ogGui-junit-report.xml
|
||||||
|
node_modules/
|
||||||
|
### Debian packaging
|
||||||
|
debian/oggui
|
||||||
|
debian/*.substvars
|
||||||
|
debian/*.log
|
||||||
|
debian/.debhelper/
|
||||||
|
debian/files
|
||||||
|
|
|
@ -1,4 +1,13 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
## [0.9.2] - 2025-03-19
|
||||||
|
### Changed
|
||||||
|
- Jenkinsfile to pubilsh packages in repo in case og release
|
||||||
|
|
||||||
|
## [0.9.1] - 2025-03-12
|
||||||
|
### ⚡ Changed
|
||||||
|
- Se ha modificado el acceso a Mercure añadiendo nueva variable de entorno.
|
||||||
|
|
||||||
|
|
||||||
## [0.9.0] - 2025-3-4
|
## [0.9.0] - 2025-3-4
|
||||||
### 🔹 Added
|
### 🔹 Added
|
||||||
- Integracion con Mercure. Subscriber tanto en "Trazas" con en "Clientes".
|
- Integracion con Mercure. Subscriber tanto en "Trazas" con en "Clientes".
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
oggui (1.0) unstable; urgency=low
|
|
||||||
|
|
||||||
* Initial release.
|
|
||||||
|
|
||||||
-- Your Name <nicolas.arenas@qindel.com> Thu, 01 Jan 1970 00:00:00 +0000
|
|
|
@ -1,9 +0,0 @@
|
||||||
Package: oggui
|
|
||||||
Version: %%VERSION%%
|
|
||||||
Section: base
|
|
||||||
Priority: optional
|
|
||||||
Architecture: all
|
|
||||||
Depends: nginx , npm , nodejs
|
|
||||||
Maintainer: Nicolas Arenas <nicolas.arenas@qindel.com>
|
|
||||||
Description: Description of the ogcore package
|
|
||||||
This is a longer description of the ogcore package.
|
|
|
@ -1,21 +0,0 @@
|
||||||
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
|
||||||
Upstream-Name: ogcore
|
|
||||||
Source: <source URL>
|
|
||||||
|
|
||||||
Files: *
|
|
||||||
Copyright: 2023 Your Name <your.email@example.com>
|
|
||||||
License: GPL-3+
|
|
||||||
This package is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
.
|
|
||||||
This package is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
.
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this package; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
|
||||||
MA 02110-1301 USA.
|
|
|
@ -1,40 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Asegurarse de que el usuario exista
|
|
||||||
USER="opengnsys"
|
|
||||||
HASH_FILE="/opt/opengnsys/oggui/var/lib/oggui/oggui.config.hash"
|
|
||||||
CONFIG_FILE="/opt/opengnsys/oggui/src/.env"
|
|
||||||
|
|
||||||
# Provisionar base de datos si es necesario en caso de instalación.
|
|
||||||
|
|
||||||
|
|
||||||
# Detectar si es una instalación nueva o una actualización
|
|
||||||
if [ "$1" = "configure" ] && [ -z "$2" ]; then
|
|
||||||
cd /opt/opengnsys/oggui/src/
|
|
||||||
npm install -g @angular/cli
|
|
||||||
npm install
|
|
||||||
/usr/local/bin/ng build --base-href=/ --output-path=dist/oggui --optimization=true --configuration=production --localize=false
|
|
||||||
cp -pr /opt/opengnsys/oggui/src/dist/oggui/browser/* /opt/opengnsys/oggui/browser/
|
|
||||||
md5sum "$CONFIG_FILE" > "$HASH_FILE"
|
|
||||||
ln -s /opt/opengnsys/oggui/etc/systemd/system/oggui.service /etc/systemd/system/oggui.service
|
|
||||||
systemctl daemon-reload
|
|
||||||
systemctl enable oggui
|
|
||||||
elif [ "$1" = "configure" ] && [ -n "$2" ]; then
|
|
||||||
cd /opt/opengnsys/oggui
|
|
||||||
echo "Actualización desde la versión $2"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Cambiar la propiedad de los archivos al usuario especificado
|
|
||||||
chown opengnsys:www-data /opt/opengnsys/
|
|
||||||
chown -R opengnsys:www-data /opt/opengnsys/oggui
|
|
||||||
# Install http server stuff
|
|
||||||
ln -s /opt/opengnsys/oggui/etc/nginx/oggui.conf /etc/nginx/sites-enabled/oggui.conf
|
|
||||||
# Reiniciar servicios si es necesario
|
|
||||||
# systemctl restart nombre_del_servicio
|
|
||||||
|
|
||||||
systemctl daemon-reload
|
|
||||||
systemctl restart nginx
|
|
||||||
|
|
||||||
exit 0
|
|
|
@ -0,0 +1,82 @@
|
||||||
|
@Library('jenkins-shared-library') _
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'jenkins-slave'
|
||||||
|
}
|
||||||
|
environment {
|
||||||
|
DEBIAN_FRONTEND = 'noninteractive'
|
||||||
|
DEFAULT_DEV_NAME = 'Opengnsys Team'
|
||||||
|
DEFAULT_DEV_EMAIL = 'opengnsys@qindel.com'
|
||||||
|
}
|
||||||
|
options {
|
||||||
|
skipDefaultCheckout()
|
||||||
|
}
|
||||||
|
parameters {
|
||||||
|
string(name: 'DEV_NAME', defaultValue: '', description: 'Nombre del desarrollador')
|
||||||
|
string(name: 'DEV_EMAIL', defaultValue: '', description: 'Email del desarrollador')
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Prepare Workspace') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
env.BUILD_DIR = "${WORKSPACE}/oggui"
|
||||||
|
sh "mkdir -p ${env.BUILD_DIR}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Checkout') {
|
||||||
|
steps {
|
||||||
|
dir("${env.BUILD_DIR}") {
|
||||||
|
checkout scm
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Generate Changelog') {
|
||||||
|
when {
|
||||||
|
expression {
|
||||||
|
return env.TAG_NAME != null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
def devName = params.DEV_NAME ? params.DEV_NAME : env.DEFAULT_DEV_NAME
|
||||||
|
def devEmail = params.DEV_EMAIL ? params.DEV_EMAIL : env.DEFAULT_DEV_EMAIL
|
||||||
|
|
||||||
|
generateDebianChangelog(env.BUILD_DIR, devName, devEmail)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Build') {
|
||||||
|
steps {
|
||||||
|
dir("${env.BUILD_DIR}") {
|
||||||
|
sh '''
|
||||||
|
dpkg-buildpackage -us -uc
|
||||||
|
mkdir -p ../artifacts && mv ../*.deb ../*.changes ../*.buildinfo ../artifacts/
|
||||||
|
ssh aptly@172.17.8.68 "rm -rf /var/tmp/opengnsys/debian-repo/oggui && mkdir -p /var/tmp/opengnsys/debian-repo/oggui"
|
||||||
|
scp -r ../artifacts/* aptly@172.17.8.68:/var/tmp/opengnsys/debian-repo/oggui/
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage ('Publish to Debian Repository') {
|
||||||
|
when {
|
||||||
|
expression {
|
||||||
|
return env.TAG_NAME != null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
agent { label 'debian-repo' }
|
||||||
|
steps {
|
||||||
|
sh "aptly repo add opengnsys-devel /var/tmp/opengnsys/debian-repo/oggui/*.deb"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
notifyBuildStatus('narenas@qindel.com')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
oggui (0.0.1-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Add debian files
|
||||||
|
* Update .gitignore
|
||||||
|
* refs #1637 refactor: remove unused client edit and create components; add manage client component
|
||||||
|
* refs #1619. Style: enhance cards view layout and paginator integration in groups component
|
||||||
|
* refactor: update paginator settings and improve page change handling in groups component
|
||||||
|
* Merge branch 'develop' of ssh://ognproject.evlt.uma.es:21987/opengnsys/oggui into develop
|
||||||
|
* style: clean up and optimize CSS for groups component; enhance HTML structure and improve responsiveness
|
||||||
|
* Updated groups paginator
|
||||||
|
* Merge branch 'develop' of ssh://ognproject.evlt.uma.es:21987/opengnsys/oggui into develop
|
||||||
|
* refs #1567. New subnet field: 'dns'
|
||||||
|
|
||||||
|
-- Tu Nombre <tuemail@example.com> Mon, 10 Mar 2025 14:48:36 +0000
|
|
@ -0,0 +1 @@
|
||||||
|
12
|
|
@ -0,0 +1,13 @@
|
||||||
|
Source: oggui
|
||||||
|
Section: web
|
||||||
|
Priority: optional
|
||||||
|
Maintainer: Nicolas Arenas <nicolas.arenas@qindel.com>
|
||||||
|
Build-Depends: debhelper (>= 12), nodejs, npm
|
||||||
|
Standards-Version: 4.5.0
|
||||||
|
|
||||||
|
Package: oggui
|
||||||
|
Architecture: any
|
||||||
|
Maintainer: Nicolas Arenas <nicolas.arenas@qindel.com>
|
||||||
|
Depends: ${shlibs:Depends}, ${misc:Depends}, nginx, nodejs, npm
|
||||||
|
Description: OpenGnsys GUI
|
||||||
|
Una interfaz gráfica para OpenGnsys.
|
|
@ -0,0 +1 @@
|
||||||
|
oggui
|
|
@ -0,0 +1,2 @@
|
||||||
|
oggui_1.0.1+deb-pkg20250310-1_amd64.buildinfo web optional
|
||||||
|
oggui_1.0.1+deb-pkg20250310-1_amd64.deb web optional
|
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
. /usr/share/debconf/confmodule
|
||||||
|
|
||||||
|
db_input high opengnsys/oggui_ogcoreUrl || true
|
||||||
|
db_input high opengnsys/oggui_ogmercureUrl || true
|
||||||
|
|
||||||
|
|
||||||
|
db_go
|
|
@ -0,0 +1,9 @@
|
||||||
|
ogWebconsole/dist/oggui/browser /opt/opengnsys/oggui/browser/
|
||||||
|
etc /opt/opengnsys/oggui/
|
||||||
|
bin /opt/opengnsys/oggui/
|
||||||
|
var /opt/opengnsys/oggui/
|
||||||
|
ogWebconsole/*.json /opt/opengnsys/oggui/src/
|
||||||
|
ogWebconsole/*.js /opt/opengnsys/oggui/src/
|
||||||
|
ogWebconsole/src /opt/opengnsys/oggui/src/
|
||||||
|
ogWebconsole/ssl/* /opt/opengnsys/oggui/etc/nginx/certs/
|
||||||
|
|
|
@ -0,0 +1,50 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
. /usr/share/debconf/confmodule
|
||||||
|
|
||||||
|
db_get opengnsys/oggui_ogcoreUrl
|
||||||
|
OGCORE_URL="$RET"
|
||||||
|
db_get opengnsys/oggui_ogmercureUrl
|
||||||
|
OGMERCURE_URL="$RET"
|
||||||
|
|
||||||
|
# Asegurarse de que el usuario exista
|
||||||
|
USER="opengnsys"
|
||||||
|
HASH_FILE="/opt/opengnsys/oggui/var/lib/oggui/oggui.config.hash"
|
||||||
|
CONFIG_FILE="/opt/opengnsys/oggui/src/.env"
|
||||||
|
|
||||||
|
# Detectar si es una instalación nueva o una actualización
|
||||||
|
if [ "$1" = "configure" ] && [ -z "$2" ]; then
|
||||||
|
cd /opt/opengnsys/oggui/src/
|
||||||
|
echo NG_APP_BASE_API_URL=$OGCORE_URL > "$CONFIG_FILE"
|
||||||
|
echo NG_APP_OGCORE_MERCURE_BASE_URL=$OGMERCURE_URL >> "$CONFIG_FILE"
|
||||||
|
npm install -g @angular/cli
|
||||||
|
npm install
|
||||||
|
/usr/local/bin/ng build --base-href=/ --output-path=dist/oggui --optimization=true --configuration=production --localize=false
|
||||||
|
cp -pr /opt/opengnsys/oggui/src/dist/oggui/browser /opt/opengnsys/oggui/
|
||||||
|
md5sum "$CONFIG_FILE" > "$HASH_FILE"
|
||||||
|
ln -s /opt/opengnsys/oggui/etc/systemd/system/oggui.service /etc/systemd/system/oggui.service
|
||||||
|
ln -s /opt/opengnsys/oggui/etc/nginx/oggui.conf /etc/nginx/sites-enabled/oggui.conf
|
||||||
|
mkdir -p /etc/nginx/certs/
|
||||||
|
cp -p /opt/opengnsys/oggui/etc/nginx/certs/* /etc/nginx/certs/
|
||||||
|
chown -R www-data:www-data /etc/nginx/certs
|
||||||
|
systemctl daemon-reload
|
||||||
|
systemctl enable oggui
|
||||||
|
# systemctl restart nombre_del_s
|
||||||
|
systemctl daemon-reload
|
||||||
|
systemctl restart nginx
|
||||||
|
elif [ "$1" = "configure" ] && [ -n "$2" ]; then
|
||||||
|
cd /opt/opengnsys/oggui
|
||||||
|
echo "Actualización desde la versión $2"
|
||||||
|
/usr/local/bin/ng build --base-href=/ --output-path=dist/oggui --optimization=true --configuration=production --localize=false
|
||||||
|
rm -rf /opt/opengnsys/oggui/browser
|
||||||
|
cp -pr /opt/opengnsys/oggui/src/dist/oggui/browser /opt/opengnsys/oggui/
|
||||||
|
md5sum "$CONFIG_FILE" > "$HASH_FILE"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Cambiar la propiedad de los archivos al usuario especificado
|
||||||
|
chown opengnsys:www-data /opt/opengnsys/
|
||||||
|
chown -R opengnsys:www-data /opt/opengnsys/oggui
|
||||||
|
chmod 755 /opt/opengnsys/oggui/bin/start-oggui.sh
|
||||||
|
exit 0
|
|
@ -0,0 +1,6 @@
|
||||||
|
# Automatically added by dh_installdebconf/13.14.1ubuntu5
|
||||||
|
if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
|
||||||
|
. /usr/share/debconf/confmodule
|
||||||
|
db_purge
|
||||||
|
fi
|
||||||
|
# End automatically added section
|
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -x
|
||||||
|
|
||||||
|
if [ "$1" = "upgrade" ]; then
|
||||||
|
# Eliminar enlaces simbólicos creados en postinst
|
||||||
|
rm -f /etc/systemd/system/oggui.service
|
||||||
|
rm -f /etc/nginx/sites-enabled/oggui.conf
|
||||||
|
systemctl daemon-reload
|
||||||
|
systemctl restart nginx
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
|
@ -0,0 +1,9 @@
|
||||||
|
Template: opengnsys/oggui_ogcoreUrl
|
||||||
|
Type: string
|
||||||
|
Default: https://127.0.0.1:8443
|
||||||
|
Description: Introduzca la URL delAPI de OgCore
|
||||||
|
|
||||||
|
Template: opengnsys/oggui_ogmercureUrl
|
||||||
|
Type: string
|
||||||
|
Default: https://127.0.0.1:3000/.well-known/mercure
|
||||||
|
Description: Introduzca el endpoint de mercure
|
|
@ -0,0 +1,20 @@
|
||||||
|
#!/usr/bin/make -f
|
||||||
|
|
||||||
|
%:
|
||||||
|
dh $@
|
||||||
|
|
||||||
|
override_dh_auto_build:
|
||||||
|
cd ogWebconsole && npm install
|
||||||
|
cd ogWebconsole && /usr/local/bin/ng build --base-href=/ --output-path=dist/oggui --optimization=true --configuration=production --localize=false
|
||||||
|
|
||||||
|
override_dh_auto_install:
|
||||||
|
dh_auto_install
|
||||||
|
mkdir -p debian/oggui/opt/opengnsys/oggui/browser
|
||||||
|
mkdir -p debian/oggui/opt/opengnsys/oggui/src/
|
||||||
|
cp -pr ogWebconsole/dist/oggui/browser/* debian/oggui/opt/opengnsys/oggui/browser/
|
||||||
|
rm -rf debian/oggui/opt/opengnsys/oggui/browser/node_modules
|
||||||
|
cp -pr etc debian/oggui/opt/opengnsys/oggui/
|
||||||
|
cp -pr bin debian/oggui/opt/opengnsys/oggui/
|
||||||
|
cp -pr var debian/oggui/opt/opengnsys/oggui/
|
||||||
|
cp -p ogWebconsole/.env debian/oggui/opt/opengnsys/oggui/src/
|
||||||
|
md5sum debian/oggui/opt/opengnsys/oggui/src/.env > debian/oggui/opt/opengnsys/oggui/var/lib/oggui/oggui.config.hash
|
|
@ -1,5 +1,5 @@
|
||||||
server {
|
server {
|
||||||
listen 4200;
|
listen 4200 ssl;
|
||||||
server_name localhost;
|
server_name localhost;
|
||||||
|
|
||||||
root /opt/opengnsys/oggui/browser;
|
root /opt/opengnsys/oggui/browser;
|
||||||
|
@ -13,7 +13,8 @@ server {
|
||||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
||||||
try_files $uri =404;
|
try_files $uri =404;
|
||||||
}
|
}
|
||||||
|
ssl_certificate /opt/opengnsys/oggui/etc/nginx/certs/oggui.uds-test.net.crt.pem;
|
||||||
|
ssl_certificate_key /opt/opengnsys/oggui/etc/nginx/certs/oggui.uds-test.net.key.pem;
|
||||||
# Configuración para evitar problemas con rutas de Angular
|
# Configuración para evitar problemas con rutas de Angular
|
||||||
error_page 404 /index.html;
|
error_page 404 /index.html;
|
||||||
}
|
}
|
Loading…
Reference in New Issue