diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ffeda8..8d9ea42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ # 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. diff --git a/Jenkins/Jenkinsfile-deb-pkg b/Jenkins/Jenkinsfile-deb-pkg index 59886e4..f032770 100644 --- a/Jenkins/Jenkinsfile-deb-pkg +++ b/Jenkins/Jenkinsfile-deb-pkg @@ -55,12 +55,23 @@ pipeline { 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 && mkdir -p /var/tmp/opengnsys/debian-repo" - scp -r ../artifacts/* aptly@172.17.8.68:/var/tmp/opengnsys/debian-repo/ + 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 { @@ -68,10 +79,4 @@ pipeline { } } } -// stage ('Publish to Debian Repository') { -// agent { label 'debian-repo' } -// steps { -// sh "aptly repo add opengnsys-devel /var/tmp/opengnsys/debian-repo/*.deb" -// } -// } diff --git a/debian/oggui.config b/debian/oggui.config index f0fa9f6..a938da8 100644 --- a/debian/oggui.config +++ b/debian/oggui.config @@ -5,6 +5,7 @@ set -e . /usr/share/debconf/confmodule db_input high opengnsys/oggui_ogcoreUrl || true +db_input high opengnsys/oggui_ogmercureUrl || true db_go diff --git a/debian/oggui.postinst b/debian/oggui.postinst index 651dcb6..fac41ce 100644 --- a/debian/oggui.postinst +++ b/debian/oggui.postinst @@ -6,6 +6,9 @@ set -e 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" @@ -20,10 +23,11 @@ CONFIG_FILE="/opt/opengnsys/oggui/src/.env" 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/browser/ + 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 systemctl daemon-reload diff --git a/debian/oggui.templates b/debian/oggui.templates index b4e5863..dc0d172 100644 --- a/debian/oggui.templates +++ b/debian/oggui.templates @@ -3,3 +3,7 @@ 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