Skip to content

Commit 77bf803

Browse files
authored
Merge pull request #36593 from risk-hsy/SmithG3_risk/ECLWATCH_PREVIEW-10.0
feat: add nightly build of ECL Watch as a preview
2 parents 0ebe35c + 4c5b47d commit 77bf803

18 files changed

Lines changed: 231 additions & 22 deletions
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: "Download ECL Watch Nightly"
2+
description: "Download the latest non-expired ECL Watch nightly artifact into a package build tree."
3+
4+
inputs:
5+
destination:
6+
description: "Destination directory for the downloaded nightly dist files."
7+
required: true
8+
artifact-name:
9+
description: "Name of the ECL Watch nightly artifact."
10+
required: false
11+
default: eclwatch-nightly
12+
13+
runs:
14+
using: "composite"
15+
steps:
16+
- name: Locate latest ECL Watch nightly
17+
id: nightly
18+
uses: actions/github-script@v8
19+
env:
20+
NIGHTLY_ARTIFACT_NAME: ${{ inputs.artifact-name }}
21+
NIGHTLY_DESTINATION: ${{ inputs.destination }}
22+
with:
23+
github-token: ${{ github.token }}
24+
script: |
25+
const fs = require("fs");
26+
27+
const artifactName = process.env.NIGHTLY_ARTIFACT_NAME;
28+
const destination = process.env.NIGHTLY_DESTINATION;
29+
const [owner, repo] = context.repo.owner && context.repo.repo
30+
? [context.repo.owner, context.repo.repo]
31+
: "${{ github.repository }}".split("/");
32+
33+
fs.rmSync(destination, { recursive: true, force: true });
34+
fs.mkdirSync(destination, { recursive: true });
35+
36+
const artifacts = await github.paginate(github.rest.actions.listArtifactsForRepo, {
37+
owner,
38+
repo,
39+
name: artifactName,
40+
per_page: 100
41+
});
42+
43+
const artifact = artifacts
44+
.filter(item => !item.expired && item.workflow_run?.id)
45+
.sort((left, right) => Date.parse(right.created_at) - Date.parse(left.created_at))[0];
46+
47+
if (!artifact) {
48+
core.setFailed(`Unable to find a non-expired ${artifactName} artifact in ${owner}/${repo}.`);
49+
return;
50+
}
51+
52+
core.info(`Using ${artifactName} artifact ${artifact.id} from run ${artifact.workflow_run.id}, created ${artifact.created_at}.`);
53+
core.setOutput("run-id", String(artifact.workflow_run.id));
54+
55+
- name: Download latest ECL Watch nightly
56+
uses: actions/download-artifact@v8
57+
with:
58+
name: ${{ inputs.artifact-name }}
59+
path: ${{ inputs.destination }}
60+
repository: ${{ github.repository }}
61+
run-id: ${{ steps.nightly.outputs.run-id }}
62+
github-token: ${{ github.token }}

.github/workflows/build-docker-community.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ on:
6565

6666
permissions:
6767
contents: write
68+
actions: read
6869

6970
jobs:
7071
build:
@@ -140,6 +141,12 @@ jobs:
140141
- name: Print Vars
141142
run: echo "${{ toJson(steps.vars.outputs)}}"
142143

144+
- name: Download ECL Watch Nightly
145+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
146+
uses: ./HPCC-Platform/.github/actions/download-eclwatch-nightly
147+
with:
148+
destination: ${{ steps.vars.outputs.folder_build }}/esp/src/build/dist-nightly
149+
143150
- name: Set up Docker Buildx
144151
id: buildx
145152
uses: docker/setup-buildx-action@v4

.github/workflows/build-docker-enterprise.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ on:
5555

5656
permissions:
5757
contents: read
58+
actions: read
5859

5960
jobs:
6061
build:
@@ -130,6 +131,12 @@ jobs:
130131
- name: Print Vars
131132
run: echo "${{ toJson(steps.vars.outputs)}}"
132133

134+
- name: Download ECL Watch Nightly
135+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
136+
uses: ./HPCC-Platform/.github/actions/download-eclwatch-nightly
137+
with:
138+
destination: ${{ steps.vars.outputs.folder_build }}/esp/src/build/dist-nightly
139+
133140
- name: Checkout LN
134141
uses: actions/checkout@v6
135142
with:

.github/workflows/build-docker-internal.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ on:
5555

5656
permissions:
5757
contents: read
58+
actions: read
5859

5960
jobs:
6061
build:
@@ -130,6 +131,12 @@ jobs:
130131
- name: Print Vars
131132
run: echo "${{ toJson(steps.vars.outputs)}}"
132133

134+
- name: Download ECL Watch Nightly
135+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
136+
uses: ./HPCC-Platform/.github/actions/download-eclwatch-nightly
137+
with:
138+
destination: ${{ steps.vars.outputs.folder_build }}/esp/src/build/dist-nightly
139+
133140
- name: Checkout LN
134141
uses: actions/checkout@v6
135142
with:

.github/workflows/build-docker.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ on:
6969

7070
permissions:
7171
contents: read
72+
actions: read
7273

7374
jobs:
7475

@@ -129,6 +130,12 @@ jobs:
129130
run: |
130131
echo "${{ toJSON(steps.vars.outputs) }}"
131132
133+
- name: Download ECL Watch Nightly
134+
if: ${{ startsWith(github.ref, 'refs/tags/') && inputs.upload-package == true }}
135+
uses: ./HPCC-Platform/.github/actions/download-eclwatch-nightly
136+
with:
137+
destination: ${{ github.workspace }}/build/esp/src/build/dist-nightly
138+
132139
- name: Set up Docker Buildx
133140
id: buildx
134141
uses: docker/setup-buildx-action@v4

.github/workflows/build-eclwatch.yml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,40 +14,34 @@ jobs:
1414
build:
1515
name: "Build eclwatch"
1616
runs-on: ubuntu-latest
17-
strategy:
18-
matrix:
19-
node: ["24", "22"]
20-
fail-fast: false
2117

2218
steps:
23-
- name: Free additional disk space (remove Android SDK + Tools)
24-
run: |
25-
sudo rm -rf /usr/local/lib/android
19+
2620
- uses: actions/checkout@v6
2721
with:
2822
submodules: "recursive"
2923

3024
- uses: actions/setup-node@v6
3125
with:
32-
node-version: ${{ matrix.node }}
26+
node-version: 24
27+
cache: 'npm'
28+
cache-dependency-path: ${{ github.workspace }}/esp/src/package-lock.json
3329

3430
- name: Install Dependencies
3531
working-directory: ${{ github.workspace }}/esp/src
3632
run: npm ci
3733

38-
- name: Lint
39-
working-directory: ${{ github.workspace }}/esp/src
40-
run: npm run lint
41-
4234
- name: Build
4335
working-directory: ${{ github.workspace }}/esp/src
36+
env:
37+
ECLWATCH_DIST_URL: /esp/files/dist-nightly/
4438
run: npm run build
4539

4640
- name: Upload Package
47-
if: ${{ matrix.node == '22' && inputs.asset-name}}
41+
if: ${{ inputs.asset-name }}
4842
uses: actions/upload-artifact@v7
4943
with:
5044
name: ${{ inputs.asset-name }}
5145
path: |
52-
${{ github.workspace }}/esp/src/build/**/*
46+
${{ github.workspace }}/esp/src/build/dist/**/*
5347
if-no-files-found: error

.github/workflows/build-gh_runner.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ on:
6868

6969
permissions:
7070
contents: read
71+
actions: read
7172
packages: read
7273

7374
jobs:
@@ -185,6 +186,12 @@ jobs:
185186
run: |
186187
echo "${{ toJSON(steps.vars.outputs) }}"
187188
189+
- name: Download ECL Watch Nightly
190+
if: ${{ startsWith(github.ref, 'refs/tags/') && inputs.upload-package == true }}
191+
uses: ./HPCC-Platform/.github/actions/download-eclwatch-nightly
192+
with:
193+
destination: ${{ github.workspace }}/build/esp/src/build/dist-nightly
194+
188195
- uses: actions/cache@v5
189196
id: cache
190197
with:

.github/workflows/build-vcpkg.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,3 +356,9 @@ jobs:
356356
cmake-configuration-ex: '-DCMAKE_OSX_ARCHITECTURES=arm64 -DUSE_CPPUNIT=OFF -DCLIENTTOOLS_ONLY=ON -DINCLUDE_PLUGINS=OFF -DUSE_AZURE=OFF -DUSE_CASSANDRA=OFF -DSUPPRESS_CASSANDRAEMBED=ON -DUSE_JAVA=OFF -DUSE_OPENLDAP=OFF'
357357
secrets: inherit
358358

359+
build-build-eclwatch:
360+
if: ${{ github.event_name == 'schedule' }}
361+
uses: ./.github/workflows/build-eclwatch.yml
362+
with:
363+
asset-name: 'eclwatch-nightly'
364+
secrets: inherit

.github/workflows/test-regression-suite-k8s.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ on:
1616

1717
permissions:
1818
contents: read
19+
actions: read
1920

2021
jobs:
2122
build-docker:

esp/src/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ file(COPY
3636
${CMAKE_CURRENT_SOURCE_DIR}/GetUserName.html
3737
${CMAKE_CURRENT_SOURCE_DIR}/index.html
3838
${CMAKE_CURRENT_SOURCE_DIR}/Login.html
39+
${CMAKE_CURRENT_SOURCE_DIR}/nightly.html
3940
${CMAKE_CURRENT_SOURCE_DIR}/lws.config.js
4041
${CMAKE_CURRENT_SOURCE_DIR}/package-lock.json
4142
${CMAKE_CURRENT_SOURCE_DIR}/package.json
@@ -386,6 +387,7 @@ set ( SRCS
386387
${CMAKE_CURRENT_SOURCE_DIR}/GetUserName.html
387388
${CMAKE_CURRENT_SOURCE_DIR}/index.html
388389
${CMAKE_CURRENT_SOURCE_DIR}/Login.html
390+
${CMAKE_CURRENT_SOURCE_DIR}/nightly.html
389391
${CMAKE_CURRENT_SOURCE_DIR}/lws.config.js
390392
${CMAKE_CURRENT_SOURCE_DIR}/package-lock.json
391393
${CMAKE_CURRENT_SOURCE_DIR}/package.json

0 commit comments

Comments
 (0)