Skip to content

Commit

Permalink
stablishing develop branch and enabling build workflow trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
francav committed Apr 26, 2024
1 parent 5149ee6 commit 31c77fe
Show file tree
Hide file tree
Showing 154 changed files with 2,645 additions and 2,601 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: deploy
name: Deploy

on:
workflow_dispatch:
Expand Down
74 changes: 74 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Build artifacts

on:
push:
branches:
- main
- develop
workflow_dispatch:

env:
REGISTRY: ghcr.io
REPOSITORY_OWNER: wkspower
KEYCLOAK_URL: http://localhost:8082
WKS_API_URL: http://localhost:8081
WKS_STORAGE_API_URL: http://localhost:8085
WEBSOCKET_ENABLED: false
WEBSOCKET_URL: ws://localhost:8484
TOPIC_CASE_CREATE: case-create
TOPIC_CREATE_HUMAN_TASK: human-task-create
NOVU_ENABLED: false
NOVU_PUBLISHER_API_URL: http://localhost:3002

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v3

- name: Extract tag name
id: extract_tag
run: echo "::set-output name=tag::$(echo ${GITHUB_REF#refs/tags/})"

- name: Set up jdk 18
uses: actions/setup-java@v3
with:
java-version: "18"
distribution: "temurin"

- name: Set up maven
uses: stCarolas/[email protected]
with:
maven-version: 3.8.2

- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build all for backend api
run: mvn -B package --file apps/java/pom.xml

- name: Install dependencies for case-portal
run: yarn --cwd apps/react/case-portal install

- name: Build for case-portal
env:
NODE_OPTIONS: "--max_old_space_size=4096"
run: |
export REACT_APP_KEYCLOAK_URL="${{ env.KEYCLOAK_URL }}"
export REACT_APP_API_URL="${{ env.WKS_API_URL }}"
export REACT_APP_STORAGE_URL="${{ env.WKS_STORAGE_API_URL }}"
export REACT_APP_WEBSOCKETS_ENABLED="${{ env.WEBSOCKET_ENABLED }}"
export REACT_APP_WEBSOCKETS_URL="${{ env.WEBSOCKET_URL }}"
export REACT_APP_WEBSOCKETS_CASE_CREATED="${{ env.TOPIC_CASE_CREATE }}"
export REACT_APP_WEBSOCKETS_HUMAN_TASK_CREATED="${{ env.TOPIC_CREATE_HUMAN_TASK }}"
export REACT_APP_NOVU_ENABLED="${{ env.NOVU_ENABLED }}"
export REACT_APP_NOVU_PUBLISHER_API_URL="${{ env.NOVU_PUBLISHER_API_URL }}"
yarn --cwd apps/react/case-portal build
33 changes: 0 additions & 33 deletions .github/workflows/jarDeploy.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: tags
name: Release - Build and Publish Docker Images

on:
push:
Expand Down
13 changes: 7 additions & 6 deletions apps/react/case-portal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,13 @@
"simplebar-react": "^3.2.4"
},
"scripts": {
"start": "webpack serve --mode=development --port 3001",
"build": "eslint --fix . && webpack --mode=production",
"test": "jest",
"lint": "eslint --fix .",
"format": "prettier --write \"**/*.{js,jsx,json,css,scss,md}\"",
"format:check": "prettier --check \"**/*.{js,jsx,json,css,scss,md}\""
"start": "echo 'Starting development server...' && webpack serve --mode=development --port 3001",
"build": "echo 'Running ESLint...' && eslint . && echo 'Checking code formatting...' && prettier --check \"**/*.{js,jsx,json,css,scss,md}\" && echo 'Building for production...' && webpack --mode=production",
"lint:fix": "echo 'Fixing linting issues...' && eslint --fix .",
"lint:check": "echo 'Checking for linting issues...' && eslint .",
"format:fix": "echo 'Fixing code formatting...' && prettier --write \"**/*.{js,jsx,json,css,scss,md}\"",
"format:check": "echo 'Checking code formatting...' && prettier --check \"**/*.{js,jsx,json,css,scss,md}\"",
"test": "echo 'Running tests...' && jest"
},
"babel": {
"presets": [
Expand Down
32 changes: 16 additions & 16 deletions apps/react/case-portal/src/SessionStoreContext.js
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
import React, { useContext } from 'react';
import React, { useContext } from 'react'

const SessionStoreContext = React.createContext({});
export const SessionStoreProvider = SessionStoreContext.Provider;
export const SessionStoreConsumer = SessionStoreContext.Consumer;
const SessionStoreContext = React.createContext({})
export const SessionStoreProvider = SessionStoreContext.Provider
export const SessionStoreConsumer = SessionStoreContext.Consumer

export function withStore(WrappedComponent) {
function WithStoreComponent(props) {
return (
<SessionStoreConsumer>
{(stores) => <WrappedComponent {...props} {...stores} />}
</SessionStoreConsumer>
);
)
}
return WithStoreComponent;
return WithStoreComponent
}

export const useSession = () => {
const attrs = useContext(SessionStoreContext);
return attrs['keycloak'];
};
const attrs = useContext(SessionStoreContext)
return attrs['keycloak']
}

export const useMenu = () => {
const attrs = useContext(SessionStoreContext);
return attrs['menu'];
};
const attrs = useContext(SessionStoreContext)
return attrs['menu']
}

export const useBpmEngine = () => {
const attrs = useContext(SessionStoreContext);
return attrs['bpmEngine'];
};
const attrs = useContext(SessionStoreContext)
return attrs['bpmEngine']
}

export default SessionStoreContext;
export default SessionStoreContext
12 changes: 6 additions & 6 deletions apps/react/case-portal/src/assets/images/auth/AuthBackground.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// material-ui
import { useTheme } from '@mui/material/styles';
import { Box } from '@mui/material';
import { useTheme } from '@mui/material/styles'
import { Box } from '@mui/material'

// ==============================|| AUTH BLUR BACK SVG ||============================== //

const AuthBackground = () => {
const theme = useTheme();
const theme = useTheme()
return (
<Box
sx={{ position: 'absolute', filter: 'blur(18px)', zIndex: -1, bottom: 0 }}
Expand Down Expand Up @@ -33,7 +33,7 @@ const AuthBackground = () => {
/>
</svg>
</Box>
);
};
)
}

export default AuthBackground;
export default AuthBackground
2 changes: 1 addition & 1 deletion apps/react/case-portal/src/common/caseStatus.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export const CaseStatus = {
WipCaseStatus: Symbol('WIP_CASE_STATUS'),
ClosedCaseStatus: Symbol('CLOSED_CASE_STATUS'),
ArchivedCaseStatus: Symbol('ARCHIVED_CASE_STATUS'),
};
}
10 changes: 5 additions & 5 deletions apps/react/case-portal/src/components/@extended/AnimateButton.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import PropTypes from 'prop-types';
import PropTypes from 'prop-types'

// third-party
import { motion } from 'framer-motion';
import { motion } from 'framer-motion'

// ==============================|| ANIMATION BUTTON ||============================== //

Expand All @@ -15,15 +15,15 @@ export default function AnimateButton({ children, type }) {
<motion.div whileHover={{ scale: 1 }} whileTap={{ scale: 0.9 }}>
{children}
</motion.div>
);
)
}
}

AnimateButton.propTypes = {
children: PropTypes.node,
type: PropTypes.oneOf(['slide', 'scale', 'rotate']),
};
}

AnimateButton.defaultProps = {
type: 'scale',
};
}
64 changes: 32 additions & 32 deletions apps/react/case-portal/src/components/@extended/Breadcrumbs.js
Original file line number Diff line number Diff line change
@@ -1,52 +1,52 @@
import PropTypes from 'prop-types';
import { useEffect, useState } from 'react';
import { Link, useLocation } from 'react-router-dom';
import PropTypes from 'prop-types'
import { useEffect, useState } from 'react'
import { Link, useLocation } from 'react-router-dom'

// material-ui
import MuiBreadcrumbs from '@mui/material/Breadcrumbs';
import { Grid, Typography } from '@mui/material';
import MainCard from '../MainCard';
import MuiBreadcrumbs from '@mui/material/Breadcrumbs'
import { Grid, Typography } from '@mui/material'
import MainCard from '../MainCard'

const Breadcrumbs = ({ navigation, title, ...others }) => {
const location = useLocation();
const [main, setMain] = useState();
const [item, setItem] = useState();
const location = useLocation()
const [main, setMain] = useState()
const [item, setItem] = useState()

// set active item state
const getCollapse = (menu) => {
if (menu.children) {
menu.children.filter((collapse) => {
if (collapse.type && collapse.type === 'collapse') {
getCollapse(collapse);
getCollapse(collapse)
} else if (collapse.type && collapse.type === 'item') {
if (location.pathname === collapse.url) {
setMain(menu);
setItem(collapse);
setMain(menu)
setItem(collapse)
}
}
return false;
});
return false
})
}
};
}

useEffect(() => {
navigation?.items?.map((menu) => {
if (menu.type && menu.type === 'group') {
getCollapse(menu);
getCollapse(menu)
}
return false;
});
});
return false
})
})

// only used for component demo breadcrumbs
if (location.pathname === '/breadcrumbs') {
location.pathname = '/dashboard/analytics';
location.pathname = '/dashboard/analytics'
}

let mainContent;
let itemContent;
let breadcrumbContent = <Typography />;
let itemTitle = '';
let mainContent
let itemContent
let breadcrumbContent = <Typography />
let itemTitle = ''

// collapse item
if (main && main.type === 'collapse') {
Expand All @@ -59,17 +59,17 @@ const Breadcrumbs = ({ navigation, title, ...others }) => {
>
{main.title}
</Typography>
);
)
}

// items
if (item && item.type === 'item') {
itemTitle = item.title;
itemTitle = item.title
itemContent = (
<Typography variant='subtitle1' color='textPrimary'>
{itemTitle}
</Typography>
);
)

// main
if (item.breadcrumbs !== false) {
Expand Down Expand Up @@ -109,16 +109,16 @@ const Breadcrumbs = ({ navigation, title, ...others }) => {
)}
</Grid>
</MainCard>
);
)
}
}

return breadcrumbContent;
};
return breadcrumbContent
}

Breadcrumbs.propTypes = {
navigation: PropTypes.object,
title: PropTypes.bool,
};
}

export default Breadcrumbs;
export default Breadcrumbs
Loading

0 comments on commit 31c77fe

Please sign in to comment.