Skip to content

Commit dadcfd8

Browse files
committed
fix deepsee globals export
1 parent ba7e532 commit dadcfd8

File tree

9 files changed

+116
-77
lines changed

9 files changed

+116
-77
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: versionbump
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- main
8+
pull_request:
9+
branches:
10+
- master
11+
- main
12+
release:
13+
types:
14+
- released
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Bump version
22+
run: |
23+
git config --global user.name 'ProjectBot'
24+
git config --global user.email '[email protected]'
25+
VERSION=$(sed -n '0,/.*<Version>\(.*\)<\/Version>.*/s//\1/p' module.xml)
26+
VERSION=`echo $VERSION | awk -F. '/[0-9]+\./{$NF++;print}' OFS=.`
27+
sed -i "0,/<Version>\(.*\)<\/Version>/s//<Version>$VERSION<\/Version>/" module.xml
28+
git add module.xml
29+
git commit -m 'auto bump version'
30+
git push

.github/workflows/runtests.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: unittest
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- main
8+
pull_request:
9+
branches:
10+
- master
11+
- main
12+
release:
13+
types:
14+
- released
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Build and Test
22+
uses: docker/build-push-action@v2
23+
with:
24+
context: .
25+
push: false
26+
load: true
27+
tags: ${{ github.repository }}:${{ github.sha }}
28+
build-args: TESTS=1

Dockerfile

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,31 @@
1-
ARG IMAGE=store/intersystems/irishealth:2019.3.0.308.0-community
2-
ARG IMAGE=store/intersystems/iris-community:2019.3.0.309.0
3-
ARG IMAGE=store/intersystems/iris-community:2019.4.0.379.0
4-
ARG IMAGE=store/intersystems/iris-community:2020.1.0.199.0
1+
ARG IMAGE=intersystemsdc/irishealth-community:2020.3.0.200.0-zpm
2+
ARG IMAGE=intersystemsdc/iris-community:2020.4.0.547.0-zpm
3+
ARG IMAGE=containers.intersystems.com/intersystems/iris:2021.1.0.215.0
54
ARG IMAGE=intersystemsdc/iris-community
65
FROM $IMAGE
76

8-
USER root
7+
WORKDIR /home/irisowner/irisbuild
98

10-
WORKDIR /opt/irisapp
11-
RUN chown ${ISC_PACKAGE_MGRUSER}:${ISC_PACKAGE_IRISGROUP} /opt/irisapp
9+
## install git
10+
## USER root
11+
##RUN apt update && apt-get -y install git
12+
##USER ${ISC_PACKAGE_MGRUSER}
1213

13-
USER irisowner
14+
ARG TESTS=0
15+
ARG MODULE="dc-sample-template"
16+
ARG NAMESPACE="IRISAPP"
1417

15-
COPY Installer.cls .
16-
COPY src src
17-
COPY irissession.sh /
18-
SHELL ["/irissession.sh"]
18+
## Embedded Python environment
19+
ENV IRISUSERNAME "_SYSTEM"
20+
ENV IRISPASSWORD "SYS"
21+
ENV IRISNAMESPACE $NAMESPACE
22+
ENV PYTHON_PATH=/usr/irissys/bin/
23+
ENV PATH "/usr/irissys/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/irisowner/bin"
1924

20-
RUN \
21-
do $SYSTEM.OBJ.Load("Installer.cls", "ck") \
22-
set sc = ##class(App.Installer).setup()
2325

24-
# bringing the standard shell back
25-
SHELL ["/bin/bash", "-c"]
26+
RUN --mount=type=bind,src=.,dst=. \
27+
#pip3 install -r requirements.txt && \
28+
iris start IRIS && \
29+
iris session IRIS < iris.script && \
30+
([ $TESTS -eq 0 ] || iris session iris -U $NAMESPACE "##class(%ZPM.PackageManager).Shell(\"test $MODULE -v -only\",1,1)") && \
31+
iris stop IRIS quietly

Installer.cls

Lines changed: 0 additions & 32 deletions
This file was deleted.

docker-compose.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ services:
55
context: .
66
dockerfile: Dockerfile
77
restart: always
8-
ports:
8+
command: --check-caps false
9+
ports:
910
- 1972
10-
- 51773
1111
- 52773
1212
- 53773
1313
volumes:
14-
- ~/iris.key:/usr/irissys/mgr/iris.key
15-
- ./:/irisdev/app
14+
- ./:/irisrun/repo

iris.script

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Unexpire passwords to simplify dev mode. Comment these two lines for Production use
2+
zn "%SYS"
3+
Do ##class(Security.Users).UnExpireUserPasswords("*")
4+
5+
; enabling callin for Embedded Python
6+
do ##class(Security.Services).Get("%Service_CallIn",.prop)
7+
set prop("Enabled")=1
8+
set prop("AutheEnabled")=48
9+
do ##class(Security.Services).Modify("%Service_CallIn",.prop)
10+
11+
// create IRISAPP namespace
12+
do $SYSTEM.OBJ.Load("/home/irisowner/irisbuild/Installer.cls", "ck")
13+
set sc = ##class(App.Installer).setup()
14+
15+
16+
// load all the code of the project as a ZPM package
17+
zn "IRISAPP"
18+
do ##class(dev.code).workdir("/irisrun/repo/src")
19+
20+
zpm "load /home/irisowner/irisbuild/ -v":1:1
21+
halt

irissession.sh

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/dev/FileManExtension.cls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ Method OnAfterDelete(InternalName As %String) As %Status
154154

155155
set dir = ##class(%File).ParentDirectoryName(fileName)
156156

157-
while dir '= ..workdir()
157+
while dir '= ##class(dev.code).workdir()
158158
{
159159
set rs = ##class(%File).FileSetFunc(dir, , , 1)
160160
quit:rs.%Next()=1

src/dev/code.cls

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,17 @@ ClassMethod exportDeepSeeArtefacts() As %Status
211211
set artefact = $list(artefacts,i)
212212
continue:$data(@("^"_artefact))=0
213213

214+
;
214215
set artefact = artefact_".GBL"
215216
set filename = ..filename(artefact)
216-
do ..mkdir(filename)
217-
218-
set sc = ..fixXMLLine(artefact, filename_".xml")
217+
set filename=$p(filename,".GBL")
218+
set fileglobalname=$p(filename,"gbl")_"gbl/"
219+
set fileglobalname=fileglobalname_$tr($p($p(filename,"gbl",2),"/",2,*),"/",".")
220+
;
221+
;B "L"
222+
;do ..mkdir(filename)
223+
224+
set sc = ..fixXMLLine(artefact, fileglobalname_".xml")
219225
}
220226

221227
return sc
@@ -312,7 +318,7 @@ ClassMethod inFilter(ByRef filtermask, filename) As %Boolean
312318

313319
/// get the filtermask for the repository.
314320
/// looks for .gitignore file and applies all the lines to filters
315-
ClassMethod setIgnore(ByRef filtermask,verbose)
321+
ClassMethod setIgnore(ByRef filtermask, verbose)
316322
{
317323
// working with .gitignore file
318324
// gitignore consists of masks of filtering files

0 commit comments

Comments
 (0)