Skip to content

Commit

Permalink
fix deepsee globals export
Browse files Browse the repository at this point in the history
  • Loading branch information
evshvarov committed Nov 11, 2022
1 parent ba7e532 commit dadcfd8
Show file tree
Hide file tree
Showing 9 changed files with 116 additions and 77 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/bump-module-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: versionbump

on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
release:
types:
- released

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Bump version
run: |
git config --global user.name 'ProjectBot'
git config --global user.email '[email protected]'
VERSION=$(sed -n '0,/.*<Version>\(.*\)<\/Version>.*/s//\1/p' module.xml)
VERSION=`echo $VERSION | awk -F. '/[0-9]+\./{$NF++;print}' OFS=.`
sed -i "0,/<Version>\(.*\)<\/Version>/s//<Version>$VERSION<\/Version>/" module.xml
git add module.xml
git commit -m 'auto bump version'
git push
28 changes: 28 additions & 0 deletions .github/workflows/runtests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: unittest

on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
release:
types:
- released

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build and Test
uses: docker/build-push-action@v2
with:
context: .
push: false
load: true
tags: ${{ github.repository }}:${{ github.sha }}
build-args: TESTS=1
40 changes: 23 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
ARG IMAGE=store/intersystems/irishealth:2019.3.0.308.0-community
ARG IMAGE=store/intersystems/iris-community:2019.3.0.309.0
ARG IMAGE=store/intersystems/iris-community:2019.4.0.379.0
ARG IMAGE=store/intersystems/iris-community:2020.1.0.199.0
ARG IMAGE=intersystemsdc/irishealth-community:2020.3.0.200.0-zpm
ARG IMAGE=intersystemsdc/iris-community:2020.4.0.547.0-zpm
ARG IMAGE=containers.intersystems.com/intersystems/iris:2021.1.0.215.0
ARG IMAGE=intersystemsdc/iris-community
FROM $IMAGE

USER root
WORKDIR /home/irisowner/irisbuild

WORKDIR /opt/irisapp
RUN chown ${ISC_PACKAGE_MGRUSER}:${ISC_PACKAGE_IRISGROUP} /opt/irisapp
## install git
## USER root
##RUN apt update && apt-get -y install git
##USER ${ISC_PACKAGE_MGRUSER}

USER irisowner
ARG TESTS=0
ARG MODULE="dc-sample-template"
ARG NAMESPACE="IRISAPP"

COPY Installer.cls .
COPY src src
COPY irissession.sh /
SHELL ["/irissession.sh"]
## Embedded Python environment
ENV IRISUSERNAME "_SYSTEM"
ENV IRISPASSWORD "SYS"
ENV IRISNAMESPACE $NAMESPACE
ENV PYTHON_PATH=/usr/irissys/bin/
ENV PATH "/usr/irissys/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/irisowner/bin"

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

# bringing the standard shell back
SHELL ["/bin/bash", "-c"]
RUN --mount=type=bind,src=.,dst=. \
#pip3 install -r requirements.txt && \
iris start IRIS && \
iris session IRIS < iris.script && \
([ $TESTS -eq 0 ] || iris session iris -U $NAMESPACE "##class(%ZPM.PackageManager).Shell(\"test $MODULE -v -only\",1,1)") && \
iris stop IRIS quietly
32 changes: 0 additions & 32 deletions Installer.cls

This file was deleted.

7 changes: 3 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ services:
context: .
dockerfile: Dockerfile
restart: always
ports:
command: --check-caps false
ports:
- 1972
- 51773
- 52773
- 53773
volumes:
- ~/iris.key:/usr/irissys/mgr/iris.key
- ./:/irisdev/app
- ./:/irisrun/repo
21 changes: 21 additions & 0 deletions iris.script
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Unexpire passwords to simplify dev mode. Comment these two lines for Production use
zn "%SYS"
Do ##class(Security.Users).UnExpireUserPasswords("*")

; enabling callin for Embedded Python
do ##class(Security.Services).Get("%Service_CallIn",.prop)
set prop("Enabled")=1
set prop("AutheEnabled")=48
do ##class(Security.Services).Modify("%Service_CallIn",.prop)

// create IRISAPP namespace
do $SYSTEM.OBJ.Load("/home/irisowner/irisbuild/Installer.cls", "ck")
set sc = ##class(App.Installer).setup()


// load all the code of the project as a ZPM package
zn "IRISAPP"
do ##class(dev.code).workdir("/irisrun/repo/src")

zpm "load /home/irisowner/irisbuild/ -v":1:1
halt
19 changes: 0 additions & 19 deletions irissession.sh

This file was deleted.

2 changes: 1 addition & 1 deletion src/dev/FileManExtension.cls
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Method OnAfterDelete(InternalName As %String) As %Status

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

while dir '= ..workdir()
while dir '= ##class(dev.code).workdir()
{
set rs = ##class(%File).FileSetFunc(dir, , , 1)
quit:rs.%Next()=1
Expand Down
14 changes: 10 additions & 4 deletions src/dev/code.cls
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,17 @@ ClassMethod exportDeepSeeArtefacts() As %Status
set artefact = $list(artefacts,i)
continue:$data(@("^"_artefact))=0

;
set artefact = artefact_".GBL"
set filename = ..filename(artefact)
do ..mkdir(filename)

set sc = ..fixXMLLine(artefact, filename_".xml")
set filename=$p(filename,".GBL")
set fileglobalname=$p(filename,"gbl")_"gbl/"
set fileglobalname=fileglobalname_$tr($p($p(filename,"gbl",2),"/",2,*),"/",".")
;
;B "L"
;do ..mkdir(filename)

set sc = ..fixXMLLine(artefact, fileglobalname_".xml")
}

return sc
Expand Down Expand Up @@ -312,7 +318,7 @@ ClassMethod inFilter(ByRef filtermask, filename) As %Boolean

/// get the filtermask for the repository.
/// looks for .gitignore file and applies all the lines to filters
ClassMethod setIgnore(ByRef filtermask,verbose)
ClassMethod setIgnore(ByRef filtermask, verbose)
{
// working with .gitignore file
// gitignore consists of masks of filtering files
Expand Down

0 comments on commit dadcfd8

Please sign in to comment.