Skip to content

Commit 6215665

Browse files
newmanwClinton Werthryanslatten
authored
SFTP plugin (#230)
* SFTP plugin * update android and update plugin * add read me and update package.json files * initial actions for build test and release. dockerfile fix * fix build * remove mongoose * update package json for mage service * force npm ci * remove test to check build * remove test dependency * force npm ci * fix test * readd action tests * add test a dependency for package * basic jasmine config update * add generic test.ts file for web tests * disable web tests * update sftp plugin output to match other plugins --------- Co-authored-by: Clinton Werth <[email protected]> Co-authored-by: Ryan <[email protected]>
1 parent 65882e8 commit 6215665

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+42683
-24
lines changed

.github/workflows/build_test.sftp.service.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: test with node ${{ matrix.node }}
3535
run: |
3636
cd plugins/sftp/service
37-
npm ci
37+
npm ci --force
3838
rm -rf node_modules/@ngageoint/mage.service/node_modules/mongoose
3939
npm test
4040
@@ -55,7 +55,7 @@ jobs:
5555
- name: build
5656
run: |
5757
cd plugins/sftp/service
58-
npm ci
58+
npm ci --force
5959
rm -rf node_modules/@ngageoint/mage.service/node_modules/mongoose
6060
npm run build
6161
- name: pack

.github/workflows/build_test.sftp.web-app.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,12 @@ jobs:
3434
npm run build
3535
env:
3636
NODE_OPTIONS: "--max_old_space_size=4096"
37-
- name: test
38-
run: |
39-
cd plugins/sftp/web
40-
npm run test-headless
37+
# Tests for the web app are currently just generic spec files generated from the angular cli.
38+
# need to revisit this after we can write some practical tests.
39+
# - name: test
40+
# run: |
41+
# cd plugins/sftp/web
42+
# npm run test-headless
4143
- name: pack
4244
run: |
4345
npm pack ./plugins/sftp/web/dist/main

.github/workflows/release.sftp_plugin.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ on:
88
type: string
99
required: true
1010

11+
# TODO: possibly use release branches to perform the release process
12+
# push:
13+
# branches:
14+
# - release/*
15+
# - prerelease/*
16+
# TODO: possibly use release event to perform the release process
17+
# release:
18+
1119
jobs:
1220

1321
config:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ scratch/
2020
/docker/auth-idp/ldap/db/*
2121
# this line must be last
2222
!.gitkeep
23+
.angular

Dockerfile

Lines changed: 41 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# Build service
21
FROM node:20.11.1 AS build-service
32

43
WORKDIR /service
@@ -25,7 +24,7 @@ FROM node:20.11.1 AS build-arcwebplugin
2524
WORKDIR /arcgiswebplugin
2625
COPY plugins/arcgis/web-app/package*.json ./
2726
RUN npm install
28-
COPY --from=build-service /service /arcgisserviceplugin/node_modules/@ngageoint/mage.service
27+
COPY --from=build-service /service /arcgiswebplugin/node_modules/@ngageoint/mage.service
2928
COPY plugins/arcgis/web-app/ ./
3029
RUN npm run build
3130
RUN npm pack ./dist/main
@@ -39,36 +38,63 @@ COPY plugins/arcgis/service/ ./
3938
RUN npm run build
4039
RUN npm pack
4140

42-
FROM node:20.11.1 AS build-imageserviceplugin
43-
WORKDIR /imageserviceplugin
44-
COPY plugins/image/service/package*.json ./
41+
# FROM node:20.11.1 AS build-imageserviceplugin
42+
# WORKDIR /imageserviceplugin
43+
# COPY plugins/image/service/package*.json ./
44+
# RUN npm install
45+
# COPY --from=build-service /service /imageserviceplugin/node_modules/@ngageoint/mage.service
46+
# RUN rm -rf /imageserviceplugin/node_modules/@ngageoint/mage.service/node_modules/mongoose
47+
# COPY plugins/image/service/ ./
48+
# RUN npm run build
49+
# RUN npm pack
50+
51+
FROM node:20.11.1 AS build-sftpserviceplugin
52+
WORKDIR /sftpserviceplugin
53+
COPY plugins/sftp/service/package*.json ./
54+
RUN ls -la /sftpserviceplugin
55+
RUN cat package.json
56+
RUN npm cache clean --force
4557
RUN npm install
46-
COPY --from=build-service /service /imageserviceplugin/node_modules/@ngageoint/mage.service
47-
RUN rm -rf /imageserviceplugin/node_modules/@ngageoint/mage.service/node_modules/mongoose
48-
COPY plugins/image/service/ ./
58+
COPY --from=build-service /service /sftpserviceplugin/node_modules/@ngageoint/mage.service
59+
COPY plugins/sftp/service/ ./
4960
RUN npm run build
5061
RUN npm pack
5162

63+
FROM node:20.11.1 AS build-sftpwebplugin
64+
# Build sftp service plugin
65+
WORKDIR /sftpwebplugin
66+
COPY plugins/sftp/web/package*.json ./
67+
RUN npm install
68+
COPY plugins/sftp/web/ ./
69+
RUN npm run build
70+
RUN npm pack ./dist/admin
71+
5272
# Build instance
5373
FROM node:20.11.1 AS build-instance
5474
COPY --from=build-service /service/ngageoint*.tgz /service/
5575
COPY --from=build-webapp /web-app/ngageoint*.tgz /web-app/
5676
COPY --from=build-arcwebplugin /arcgiswebplugin/ngageoint*.tgz /arcgiswebplugin/
5777
COPY --from=build-arcserviceplugin /arcgisserviceplugin/ngageoint*.tgz /arcgisserviceplugin/
58-
COPY --from=build-imageserviceplugin /imageserviceplugin/ngageoint*.tgz /imageserviceplugin/
78+
COPY --from=build-sftpwebplugin /sftpwebplugin/ngageoint*.tgz /sftpwebplugin/
79+
COPY --from=build-sftpserviceplugin /sftpserviceplugin/ngageoint*.tgz /sftpserviceplugin/
80+
# COPY --from=build-imageserviceplugin /imageserviceplugin/ngageoint*.tgz /imageserviceplugin/
5981

6082
WORKDIR /instance
61-
RUN npm install ../service/ngageoint-mage.service*.tgz \
62-
npm install ../web-app/ngageoint-mage.web-app*.tgz \
63-
npm install ../arcgiswebplugin/ngageoint*.tgz \
64-
npm install ../arcgisserviceplugin/ngageoint*.tgz \
65-
npm install ../imageserviceplugin/ngageoint*.tgz
83+
RUN ls -la ../sftpwebplugin
84+
RUN npm install ../sftpwebplugin/ngageoint*.tgz
85+
RUN npm install ../sftpserviceplugin/ngageoint*.tgz
86+
RUN npm install ../service/ngageoint-mage.service*.tgz
87+
RUN npm install ../web-app/ngageoint-mage.web-app*.tgz
88+
RUN npm install ../arcgiswebplugin/ngageoint*.tgz
89+
RUN npm install ../arcgisserviceplugin/ngageoint*.tgz
6690

6791

6892
ENV NODE_PATH=./node_modules
6993
ENTRYPOINT [ \
7094
"./node_modules/.bin/mage.service", \
7195
"--plugin", "@ngageoint/mage.image.service", \
7296
"--plugin", "@ngageoint/mage.arcgis.service", \
97+
"--plugin", "@ngageoint/mage.sftp.service", \
98+
"--web-plugin", "@ngageoint/mage.sftp.web", \
7399
"--web-plugin", "@ngageoint/mage.arcgis.web-app" \
74-
]
100+
]

instance/config.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,13 @@ module.exports = {
3434
plugins: {
3535
servicePlugins: [
3636
'@ngageoint/mage.arcgis.service',
37-
'@ngageoint/mage.image.service',
3837
'@ngageoint/mage.nga-msi',
3938
'@ngageoint/mage.random',
39+
'@ngageoint/mage.sftp.service'
4040
],
4141
webUIPlugins: [
42-
'@ngageoint/mage.arcgis.web-app'
42+
'@ngageoint/mage.arcgis.web-app',
43+
'@ngageoint/mage.sftp.web'
4344
],
4445
},
4546
}

instance/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
"@ngageoint/mage.image.service": "../plugins/image/service",
3131
"@ngageoint/mage.nga-msi": "../plugins/nga-msi",
3232
"@ngageoint/mage.random": "../plugins/random",
33+
"@ngageoint/mage.sftp.web": "../plugins/sftp/web/dist/main",
34+
"@ngageoint/mage.sftp.service": "../plugins/sftp/service",
3335
"@ngageoint/mage.service": "../service",
3436
"@ngageoint/mage.web-app": "../web-app/dist"
3537
}

plugins/arcgis/web-app/projects/main/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@ngageoint/mage.arcgis.web-app",
33
"version": "1.0.0",
44
"peerDependencies": {
5-
"@ngageoint/mage.web-app": "^6.2.9 || ^6.3.0-beta"
5+
"@ngageoint/mage.web-app": "^6.2.9 || ^6.3.0-beta.7"
66
},
77
"dependencies": {
88
"tslib": "^2.0.0"

plugins/sftp/README.md

Whitespace-only changes.

plugins/sftp/service/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/lib/
2+
*scratch*/

0 commit comments

Comments
 (0)