Commit f2fbe14c authored by rees_s's avatar rees_s
Browse files

Further cleanup of the build system.

parent 595807aa
......@@ -131,4 +131,18 @@ This log describes the functionality of tagged versions within the repository.
Known Bugs:
* To be assessed.
Release Date: 2021-05-26
* [2.4.2](https://gitlab.psi.ch/wica_panels/gfa-ilk-panels/tags/2.4.2)
Completed overhaul of build system.
Dependencies:
* Works with [ilk-wc-factory](https://git.psi.ch/controls_highlevel_applications/ilk-wc-factory) [V2.4.2](https://git.psi.ch/controls_highlevel_applications/ilk-wc-factory/-/tags/2.4.2)
* Works with [ilkcs](https://git.psi.ch/controls_highlevel_applications/ch.psi.ilkcs) V1.2.0
* Works with [ilkdb](https://git.psi.ch/controls_highlevel_applications/ch.psi.ilkdb) V2.1.3.
Known Bugs:
* To be assessed.
Release Date: 2021-05-26
\ No newline at end of file
......@@ -19,27 +19,27 @@ to customise the files held in the project templates areas for each installation
# How to build
The ```build_xxx``` script populates the build area with the installation files needed for the
different sites:
The ```*:*:build``` scripts populate the build area with the installation files needed for the different sites:
```
npm run build_xxx
npm run <facility>:<target>:build
where xxx = 'hipa', 'proscan' or 'ilktest' (supports both develoment and production servers)
Where:
<facility> = 'hipa', 'proscan' or 'ilktest'
<target> = 'prod' (all facilities) or 'dev' (only 'ilktest').
```
# How to deploy
# How to publish and deploy
The ```dist_xxx``` script publishes the installation files created in the build area to the appropriate
deployment branches on the GitLab Server from where they can be deployed (either automatically or manually)
to the relevant servers.
The ```*:*:publish``` script pushes the installation files created in the build area to the appropriate
deployment branches on the GitLab Server from where they are deployed on the relevant servers.
```
npm run dist_publish_yyy
npm run <facility>:<target>:publish
where yyy = 'hipa', 'proscan', 'prod' or 'dev'
Where:
<facility> = 'hipa', 'proscan' or 'ilktest'
<target> = 'prod' (all facilities) or 'dev' (only 'ilktest').
```
# Project Changes and Tagged Releases
* See the [CHANGELOG.md](CHANGELOG.md) file for further information.
......@@ -88,16 +88,16 @@ function __dist_deploy() {
deployCommand="deploy?gitUrl=git@gitlab.psi.ch:wica_panels/gfa-ilk-panels.git";
devServer="https://gfa-ilk-dev.psi.ch:8443"
prodServer="https://gfa-ilk-prod.psi.ch:8443"
hipaServer="https://hipa-ilk-dev.psi.ch:8443"
proscanServer="https://proscan-ilk-prod.psi.ch:8443"
hipaServer="https://127.19.10.55:8443"
proscanServer="https://172.25.11.44:8443"
if [[ "$1" == "dist_ilktest_dev" ]]; then
curl -k -H "${contentType}" -X POST "${devServer}/${deployCommand}";
elif [[ "$1" == "dist_ilktest_prod" ]]; then
curl -k -H "${contentType}" -X POST "${prodServer}/${deployCommand}";
elif [[ "$1" == "dist_hipa_prod" ]]; then
curl -x socks5h://0:8080 -k -H "${contentType}" -X POST "${hipaServer}/${deployCommand}";
curl -x socks5-hostname://0:8080 -k -H "${contentType}" -X POST "${hipaServer}/${deployCommand}";
elif [[ "$1" == "dist_proscan_prod" ]]; then
curl -x socks5h://0:8080 -k -H "${contentType}" -X POST "${proscanServer}/${deployCommand}";
curl -x socks5h://0:8081 -k -H "${contentType}" -X POST "${proscanServer}/${deployCommand}";
else
echo "Trigger deployment by the autodeploy server associated with the supplied dist area."
fi
......
{
"name": "gfa-ilk-panels",
"version": "2.4.1",
"version": "2.4.2",
"description": "GFA Interlock Panels",
"main": "",
"scripts": {
"info": "npm-scripts-info",
"cleanall": "rm -rf build",
"build:clean": "rm -rf build",
"?ilktest:dev": "Builds and publishes the ILKTEST site to the GFA ILK Development Server",
"ilktest:dev": "npm-run-all ilktest:dev:*",
......@@ -44,7 +44,12 @@
"?npm": "Perform NPM housekeeping tasks.",
"npm:version": "echo $npm_package_version",
"npm:update": "npm update",
"npm:update-to-latest": "npm-check-updates -u && npm install"
"npm:update-to-latest": "npm-check-updates -u && npm install",
"?socks": "Starts HTTP the SOCKS Server needed for deployments at HIP and PROSCAN.",
"socks:help": "echo The command to start the socks http proxy is: 'ssh -D 8080 -f -C -q -N username@facility-ilk'",
"socks:hipa": "ssh -D 8080 -f -C -q -N rees_s@hipa-ilk",
"socks:proscan": "ssh -D 8081 -f -C -q -N rees_s@proscan-ilk"
},
"repository": {
"type": "git",
......
......@@ -6,7 +6,7 @@ export function load_ilkdb_explorer_tool_template( template )
.replaceAll('__FACILITY_OVERVIEW_TOOL__', 'hipa-facility-overview-tool.html' )
.replaceAll('__ILKCS_COMMAND_TOOL__', 'hipa-ilkcs-command-tool.html' )
.replaceAll('__ILKDB_SERVER_URL__', 'https://hipa-ilk.psi.ch:9443' )
.replaceAll('__VERSION__', '2.4.1' );
.replaceAll('__VERSION__', '2.4.2' );
}
export function load_ilkcs_command_tool_template( template )
......@@ -15,7 +15,7 @@ export function load_ilkcs_command_tool_template( template )
.replaceAll('__FACILITY_OVERVIEW_TOOL__', 'hipa-facility-overview-tool.html' )
.replaceAll('__ILKDB_EXPLORER_TOOL__', 'hipa-ilkdb-explorer-tool.html' )
.replaceAll('__ILKCS_SERVER_URL__', 'https://hipa-ilk.psi.ch:10443' )
.replaceAll('__VERSION__', '2.4.1' );
.replaceAll('__VERSION__', '2.4.2' );
}
export function load_facility_overview_tool_template( template )
......@@ -28,5 +28,5 @@ export function load_facility_overview_tool_template( template )
.replaceAll('__ILKDB_SERVER_URL__', 'https://hipa-ilk.psi.ch:9443' )
.replaceAll('__CSS_SUPPORT_FILE__', './wc-register-view.css' )
.replaceAll('__JS_SUPPORT_FILE__', './hipa-tools-support.js' )
.replaceAll('__VERSION__', '2.4.1' );
.replaceAll('__VERSION__', '2.4.2' );
}
\ No newline at end of file
......@@ -7,7 +7,7 @@ export function load_beam_permission_view_template( template )
.replaceAll( '__ILKDB_SERVER_URL__', 'https://hipa-ilk.psi.ch:9443' )
.replaceAll( '__FACILITY_SVG_FILE__', 'hipa-rps.svg' )
.replaceAll( '__JS_SUPPORT_FILE__', './hipa-ui-support.js' )
.replaceAll( '__VERSION__', '2.4.1' )
.replaceAll( '__VERSION__', '2.4.2' )
}
export function load_interlock_view_template( template )
......@@ -17,5 +17,5 @@ export function load_interlock_view_template( template )
.replaceAll( '__ILKCS_SERVER_URL__', 'https://hipa-ilk.psi.ch:10443' )
.replaceAll( '__FACILITY_SVG_FILE__', 'hipa-rps.svg' )
.replaceAll( '__JS_SUPPORT_FILE__', './hipa-ui-support.js' )
.replaceAll( '__VERSION__', '2.4.1' )
.replaceAll( '__VERSION__', '2.4.2' )
}
......@@ -22,6 +22,8 @@ export default () => {
// eslint-disable-next-line no-undef
const buildTarget = process.env.BUILD_PROD ? "build/ilktest_prod" : "build/ilktest_dev";
const indexFile = process.env.BUILD_PROD ? "ilktest-prod-index.html" : "ilktest-dev-index.html";
return [ {
input: 'src/sites/ilktest/test/ilktest-test-support.js',
output: {
......@@ -33,8 +35,7 @@ export default () => {
copy({
targets: [
// Install ILKTEST Index
{src: "src/ilktest/ilktest-prod-index.html", dest: buildTarget },
{src: "src/ilktest/ilktest-dev-index.html", dest: buildTarget },
{src: "src/sites/ilktest/" + indexFile, dest: buildTarget, rename: "index.html" },
{src: "src/common/assets/background.jpg", dest: buildTarget },
// Install ILKTEST Test Component Support Assets
......
......@@ -6,7 +6,7 @@ export function load_ilkdb_explorer_tool_template( template, ilkdbServerUrl )
.replaceAll('__FACILITY_OVERVIEW_TOOL__', 'ilktest-facility-overview-tool.html' )
.replaceAll('__ILKCS_COMMAND_TOOL__', 'ilktest-ilkcs-command-tool.html' )
.replaceAll('__ILKDB_SERVER_URL__', ilkdbServerUrl )
.replaceAll('__VERSION__', '2.4.1' );
.replaceAll('__VERSION__', '2.4.2' );
}
export function load_ilkcs_command_tool_template( template, ilkcsServerUrl )
......@@ -15,7 +15,7 @@ export function load_ilkcs_command_tool_template( template, ilkcsServerUrl )
.replaceAll('__FACILITY_OVERVIEW_TOOL__', 'ilktest-facility-overview-tool.html' )
.replaceAll('__ILKDB_EXPLORER_TOOL__', 'ilktest-ilkdb-explorer-tool.html' )
.replaceAll('__ILKCS_SERVER_URL__', ilkcsServerUrl )
.replaceAll('__VERSION__', '2.4.1' );
.replaceAll('__VERSION__', '2.4.2' );
}
export function load_facility_overview_tool_template( template, ilkdbServerUrl )
......@@ -27,5 +27,5 @@ export function load_facility_overview_tool_template( template, ilkdbServerUrl )
.replaceAll('__ILKDB_SERVER_URL__', ilkdbServerUrl )
.replaceAll('__CSS_SUPPORT_FILE__', './wc-register-view.css' )
.replaceAll('__JS_SUPPORT_FILE__', './ilktest-tools-support.js' )
.replaceAll('__VERSION__', '2.4.1' );
.replaceAll('__VERSION__', '2.4.2' );
}
\ No newline at end of file
......@@ -7,7 +7,7 @@ export function load_proscan_beam_permission_view_template( template, ilkcsServe
.replaceAll( '__ILKCS_SERVER_URL__', ilkcsServerUrl )
.replaceAll( '__FACILITY_SVG_FILE__', 'proscan-rps.svg' )
.replaceAll( '__JS_SUPPORT_FILE__', './ilktest-ui-support.js' )
.replaceAll( '__VERSION__', '2.4.1' )
.replaceAll( '__VERSION__', '2.4.2' )
}
export function load_proscan_interlock_view_template( template, ilkcsServerUrl )
......@@ -17,7 +17,7 @@ export function load_proscan_interlock_view_template( template, ilkcsServerUrl )
.replaceAll( '__ILKCS_SERVER_URL__', ilkcsServerUrl )
.replaceAll( '__FACILITY_SVG_FILE__', 'proscan-rps.svg' )
.replaceAll( '__JS_SUPPORT_FILE__', './ilktest-ui-support.js' )
.replaceAll( '__VERSION__', '2.4.1' )
.replaceAll( '__VERSION__', '2.4.2' )
}
export function load_hipa_beam_permission_view_template( template, ilkcsServerUrl )
......@@ -27,7 +27,7 @@ export function load_hipa_beam_permission_view_template( template, ilkcsServerUr
.replaceAll( '__ILKCS_SERVER_URL__', ilkcsServerUrl )
.replaceAll( '__FACILITY_SVG_FILE__', 'proscan-rps.svg' )
.replaceAll( '__JS_SUPPORT_FILE__', './ilktest-ui-support.js' )
.replaceAll( '__VERSION__', '2.4.1' )
.replaceAll( '__VERSION__', '2.4.2' )
}
export function load_hipa_interlock_view_template( template, ilkcsServerUrl )
......@@ -37,5 +37,5 @@ export function load_hipa_interlock_view_template( template, ilkcsServerUrl )
.replaceAll( '__ILKCS_SERVER_URL__', ilkcsServerUrl )
.replaceAll( '__FACILITY_SVG_FILE__', 'proscan-rps.svg' )
.replaceAll( '__JS_SUPPORT_FILE__', './ilktest-ui-support.js' )
.replaceAll( '__VERSION__', '2.4.1' )
.replaceAll( '__VERSION__', '2.4.2' )
}
......@@ -53,7 +53,7 @@ export default [
{
input: 'src/sites/proscan/ui/proscan-ui-support.js',
output: {
dir: 'sites/proscan_prod/ui',
dir: 'build/proscan_prod/ui',
format: 'esm',
sourcemap: true,
},
......@@ -61,18 +61,18 @@ export default [
copy({
targets: [
// Install PROSCAN UI Component Support Assets
{ src: "src/common/ui/assets/beam-permission-view-colors.css", dest: "sites/proscan_prod/ui" },
{ src: "src/common/ui/assets/interlock-view-colors.css", dest: "sites/proscan_prod/ui" },
{ src: "src/common/ui/assets/proscan-rps.svg", dest: "sites/proscan_prod/ui" },
{ src: "src/common/ui/assets/beam-permission-view-colors.css", dest: "build/proscan_prod/ui" },
{ src: "src/common/ui/assets/interlock-view-colors.css", dest: "build/proscan_prod/ui" },
{ src: "src/common/ui/assets/proscan-rps.svg", dest: "build/proscan_prod/ui" },
// Install PROSCAN UI Components
{
src: "src/common/ui/templates/beam-permission-view.template.html", dest: "sites/proscan_prod/ui",
src: "src/common/ui/templates/beam-permission-view.template.html", dest: "build/proscan_prod/ui",
transform: (contents) => PROSCAN_UI_SUBS.load_beam_permission_view_template( contents.toString() ),
rename: "proscan-beam-permission-view.html",
},
{
src: "src/common/ui/templates/interlock-view.template.html", dest: "sites/proscan_prod/ui",
src: "src/common/ui/templates/interlock-view.template.html", dest: "build/proscan_prod/ui",
transform: (contents) => PROSCAN_UI_SUBS.load_interlock_view_template( contents.toString() ),
rename: "proscan-interlock-view.html"
},
......
......@@ -6,7 +6,7 @@ export function load_ilkdb_explorer_tool_template( template )
.replaceAll('__FACILITY_OVERVIEW_TOOL__', 'proscan-facility-overview-tool.html' )
.replaceAll('__ILKCS_COMMAND_TOOL__', 'proscan-ilkcs-command-tool.html' )
.replaceAll('__ILKDB_SERVER_URL__', 'https://proscan-ilk.psi.ch:9443' )
.replaceAll('__VERSION__', '2.4.1' );
.replaceAll('__VERSION__', '2.4.2' );
}
export function load_ilkcs_command_tool_template( template )
......@@ -15,7 +15,7 @@ export function load_ilkcs_command_tool_template( template )
.replaceAll('__FACILITY_OVERVIEW_TOOL__', 'proscan-facility-overview-tool.html' )
.replaceAll('__ILKDB_EXPLORER_TOOL__', 'proscan-ilkdb-explorer-tool.html' )
.replaceAll('__ILKCS_SERVER_URL__', 'https://proscan-ilk.psi.ch:10443' )
.replaceAll('__VERSION__', '2.4.1' );
.replaceAll('__VERSION__', '2.4.2' );
}
export function load_facility_overview_tool_template( template )
......@@ -27,5 +27,5 @@ export function load_facility_overview_tool_template( template )
.replaceAll('__ILKDB_SERVER_URL__', 'https://proscan-ilk.psi.ch:9443' )
.replaceAll('__CSS_SUPPORT_FILE__', './wc-register-view.css' )
.replaceAll('__JS_SUPPORT_FILE__', './proscan-tools-support.js' )
.replaceAll('__VERSION__', '2.4.1' );
.replaceAll('__VERSION__', '2.4.2' );
}
\ No newline at end of file
......@@ -7,7 +7,7 @@ export function load_beam_permission_view_template( template )
.replaceAll( '__ILKCS_SERVER_URL__', 'https://proscan-ilk.psi.ch:10443' )
.replaceAll( '__FACILITY_SVG_FILE__', 'proscan-rps.svg' )
.replaceAll( '__JS_SUPPORT_FILE__', './proscan-ui-support.js' )
.replaceAll( '__VERSION__', '2.4.1' )
.replaceAll( '__VERSION__', '2.4.2' )
}
export function load_interlock_view_template( template )
......@@ -17,5 +17,5 @@ export function load_interlock_view_template( template )
.replaceAll( '__ILKCS_SERVER_URL__', 'https://proscan-ilk.psi.ch:10443' )
.replaceAll( '__FACILITY_SVG_FILE__', 'proscan-rps.svg' )
.replaceAll( '__JS_SUPPORT_FILE__', './proscan-ui-support.js' )
.replaceAll( '__VERSION__', '2.4.1' )
.replaceAll( '__VERSION__', '2.4.2' )
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment