Skip to content

Commit

Permalink
add Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
r-cemper committed May 21, 2024
1 parent 3869b34 commit fcd9792
Show file tree
Hide file tree
Showing 20 changed files with 977 additions and 588 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**/.DS_Store
iris-main.log
.git
11 changes: 11 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
*.cls linguist-language=ObjectScript
*.mac linguist-language=ObjectScript
*.int linguist-language=ObjectScript
*.inc linguist-language=ObjectScript
*.csp linguist-language=Html

*.sh text eol=lf
*.cls text eol=lf
*.mac text eol=lf
*.int text eol=lf
Dockerfil* text eol=lf
12 changes: 12 additions & 0 deletions .github/workflows/objectscript-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: objectscriptquality
on: push

jobs:
linux:
name: Linux build
runs-on: ubuntu-latest

steps:
- name: Execute ObjectScript Quality Analysis
run: wget https://raw.githubusercontent.com/litesolutions/objectscriptquality-jenkins-integration/master/iris-community-hook.sh && sh ./iris-community-hook.sh

19 changes: 19 additions & 0 deletions .github/workflows_build-push-gcr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Cloud Run Deploy

on:
push:
branches:
- master
- main
workflow_dispatch:

jobs:
deploy:
uses: intersystems-community/demo-deployment/.github/workflows/deployment.yml@master
with:
# Replace the name: parameter below to have your application deployed at
# https://project-name.demo.community.intersystems.com/
name: project-name
secrets:
# Do not forget to add Secret in GitHub Repoository Settings with name SERVICE_ACCOUNT_KEY
SERVICE_ACCOUNT_KEY: ${{ secrets.SERVICE_ACCOUNT_KEY }}
28 changes: 28 additions & 0 deletions .github/workflows_bump-module-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: versionbump

on:
push:
branches:
- master
- main
release:
types:
- released
permissions:
contents: write

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
25 changes: 25 additions & 0 deletions .github/workflows_github-registry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build and publish a Docker image to ghcr.io
on:

# publish on pushes to the main branch (image tagged as "latest")
# image name: will be: ghcr.io/${{ github.repository }}:latest
# e.g.: ghcr.io/intersystems-community/intersystems-iris-dev-template:latest
push:
branches:
- master

jobs:
docker_publish:
runs-on: "ubuntu-20.04"

steps:
- uses: actions/checkout@v2

# https://github.com/marketplace/actions/push-to-ghcr
- name: Build and publish a Docker image for ${{ github.repository }}
uses: macbre/push-to-ghcr@master
with:
image_name: ${{ github.repository }}
github_token: ${{ secrets.GITHUB_TOKEN }}
# optionally push to the Docker Hub (docker.io)
# docker_io_token: ${{ secrets.DOCKER_IO_ACCESS_TOKEN }} # see https://hub.docker.com/settings/security
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
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.DS_Store
iris-main.log
.env
.git

17 changes: 17 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"recommendations": [
"eamodio.gitlens",
"georgejames.gjlocate",
"github.copilot",
"intersystems-community.servermanager",
"intersystems-community.sqltools-intersystems-driver",
"intersystems-community.testingmanager",
"intersystems-community.vscode-objectscript",
"intersystems.language-server",
"mohsen1.prettify-json",
"ms-azuretools.vscode-docker",
"ms-python.python",
"ms-python.vscode-pylance",
"ms-vscode-remote.remote-containers"
]
}
18 changes: 18 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "objectscript",
"request": "launch",
"name": "ObjectScript Debug Class",
"program": "##class(dc.sample.ObjectScript).Test()",
},
{
"type": "objectscript",
"request": "attach",
"name": "ObjectScript Attach",
"processId": "${command:PickProcess}",
"system": true
}
]
}
22 changes: 22 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"files.associations": {

"Dockerfile*": "dockerfile",
"iris.script": "objectscript"
},
"objectscript.conn" :{
"active": true,
"ns": "USER",
"username": "_SYSTEM",
"password": "SYS",
"docker-compose": {
"service": "iris",
"internalPort": 52773
},
"links": {
"UnitTest Portal": "${serverUrl}/csp/sys/%25UnitTest.Portal.Home.cls?$NAMESPACE=IRISAPP"
}
},
"intersystems.testingManager.client.relativeTestRoot": "tests"

}
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# fake for OEX docker detection
Loading

0 comments on commit fcd9792

Please sign in to comment.