Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI fixes #1720

Merged
merged 7 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/forms-flow-web-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ jobs:
run: |
VER=$(cat VERSION)
echo "VERSION=$VER" >> $GITHUB_ENV

- name: Set version
if: ${{ github.ref == 'refs/heads/master' }}
working-directory: .
run: |
VER=$(cat VERSION)
VER=${VER/-alpha/''}
echo "VERSION=$VER" >> $GITHUB_ENV

- run: echo ${{ env.VERSION }}

- run: npm ci
Expand All @@ -55,4 +55,4 @@ jobs:
env:
BUCKET: ${{ secrets.BUCKET}}
VERSION: ${{ env.VERSION }}
working-directory: ./forms-flow-web/scripts
working-directory: ./forms-flow-web/scripts
4 changes: 1 addition & 3 deletions .github/workflows/forms-flow-web-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@ on:
- develop
- master
- release/**
- 5.2.0-alpha
pull_request:
branches:
- develop
- master
- release/**
- 5.2.0-alpha
paths:
- "forms-flow-web/**"

Expand Down Expand Up @@ -93,4 +91,4 @@ jobs:
- name: build to check strictness
id: build
run: |
npm run build
npm run build
6 changes: 3 additions & 3 deletions deployment/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ services:

forms-flow-forms:
container_name: forms-flow-forms
image: formsflow/forms-flow-forms:v5.2.0-alpha
image: formsflow/forms-flow-forms:v5.2.1

# The app will restart until Mongo is listening
restart: always
Expand Down Expand Up @@ -85,6 +85,7 @@ services:
# - CAMUNDA_HIKARI_IDLE_TIMEOUT=${CAMUNDA_HIKARI_IDLE_TIMEOUT}
# - CAMUNDA_HIKARI_MAX_POOLSIZE=${CAMUNDA_HIKARI_MAX_POOLSIZE}
# - CAMUNDA_HIKARI_VALID_TIMEOUT=${CAMUNDA_HIKARI_VALID_TIMEOUT}
# - CAMUNDA_BPM_HISTORY_LEVEL=${CAMUNDA_BPM_HISTORY_LEVEL}
# - CAMUNDA_AUTHORIZATION_FLAG=${CAMUNDA_AUTHORIZATION_FLAG}
# - CAMUNDA_AUTHORIZATION_REVOKE_CHECK_FLAG=${CAMUNDA_AUTHORIZATION_REVOKE_CHECK_FLAG}
# - CAMUNDA_JOB_CORE_POOL_SIZE=${CAMUNDA_JOB_CORE_POOL_SIZE}
Expand All @@ -95,7 +96,6 @@ services:
# - CAMUNDA_JOB_WAIT_TIME_MILLIS=${CAMUNDA_JOB_WAIT_TIME_MILLIS}
# - CAMUNDA_JOB_MAX_WAIT=${CAMUNDA_JOB_MAX_WAIT}
# - CAMUNDA_METRICS_FLAG=${CAMUNDA_METRICS_FLAG}
# - CAMUNDA_BPM_HISTORY_LEVEL=${CAMUNDA_BPM_HISTORY_LEVEL}
- CAMUNDA_APP_ROOT_LOG_FLAG=${CAMUNDA_APP_ROOT_LOG_FLAG:-error}
- FORMSFLOW_API_URL=${FORMSFLOW_API_URL}
- FORMIO_URL=${FORMIO_DEFAULT_PROJECT_URL}
Expand Down Expand Up @@ -288,4 +288,4 @@ networks:

volumes:
mdb-data:
postgres:
postgres:
5 changes: 0 additions & 5 deletions deployment/openshift/web_dc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ objects:
"REACT_APP_EXPORT_PDF_ENABLED":"${REACT_APP_EXPORT_PDF_ENABLED}",
"REACT_APP_PUBLIC_WORKFLOW_ENABLED":"&{REACT_APP_PUBLIC_WORKFLOW_ENABLED}","
"REACT_APP_DOCUMENT_SERVICE_URL":"${REACT_APP_DOCUMENT_SERVICE_URL}",
"REACT_APP_KEYCLOAK_ENABLE_CLIENT_AUTH":"${REACT_APP_KEYCLOAK_ENABLE_CLIENT_AUTH}",
"REACT_APP_KEYCLOAK_ENABLE_CLIENT_AUTH":"${REACT_APP_KEYCLOAK_ENABLE_CLIENT_AUTH}"
}

Expand Down Expand Up @@ -287,10 +286,6 @@ parameters:
displayName: REACT_APP_DOCUMENT_SERVICE_URL
description: Document related services api url
required: false
- name: REACT_APP_KEYCLOAK_ENABLE_CLIENT_AUTH
displayName: REACT_APP_KEYCLOAK_ENABLE_CLIENT_AUTH
description: client based auth
required: false
- name: REACT_APP_KEYCLOAK_ENABLE_CLIENT_AUTH
displayName: REACT_APP_KEYCLOAK_ENABLE_CLIENT_AUTH
description: client based auth
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"""
from alembic import op
import sqlalchemy as sa
from formsflow_api.models import Filter


# revision identifiers, used by Alembic.
revision = '91f9cd061108'
Expand All @@ -18,31 +18,21 @@

def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
# Add 'All tasks' filter as default if no other filters available.
conn = op.get_bind()
filter_entry = conn.execute(sa.text("SELECT * FROM Filter")).fetchone()

if not filter_entry:
filter_obj = Filter()
filter_obj.name = "All Tasks"
filter_obj.variables = [{"name": "applicationId", "label": "Application Id"},{"name": "formName", "label": "Form Name"}]
filter_obj.status = 'active'
filter_obj.created_by = 'system'
filter_obj.creted = 'now()'
filter_obj.criteria = {}
filter_obj.users = {}
filter_obj.roles = {}
filter_obj.task_visible_attributes = {
"applicationId": True,
"dueDate": True,
"priority": True,
"assignee": True,
"taskTitle": True,
"createdDate": True,
"groups": True,
"followupDate": True,
}
filter_obj.save()
# Creating a new filter entry
insert_stmt = """
INSERT INTO public.Filter(name, variables, status, created_by, created, criteria, users, roles, task_visible_attributes)
VALUES (
'All Tasks',
ARRAY['{"name": "applicationId", "label": "Application Id"}'::json, '{"name": "formName", "label": "Form Name"}'::json],
'active','system',now(),'{}'::json,'{}','{}',
'{"applicationId": true, "dueDate": true, "priority": true, "assignee": true, "taskTitle": true, "createdDate": true, "groups": true, "followupDate": true}'::json
)
"""
conn.execute(sa.text(insert_stmt))
# ### end Alembic commands ###


Expand Down
4 changes: 2 additions & 2 deletions forms-flow-bpm/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ services:
# - CAMUNDA_HIKARI_IDLE_TIMEOUT=${CAMUNDA_HIKARI_IDLE_TIMEOUT}
# - CAMUNDA_HIKARI_MAX_POOLSIZE=${CAMUNDA_HIKARI_MAX_POOLSIZE}
# - CAMUNDA_HIKARI_VALID_TIMEOUT=${CAMUNDA_HIKARI_VALID_TIMEOUT}
# - CAMUNDA_BPM_HISTORY_LEVEL=${CAMUNDA_BPM_HISTORY_LEVEL}
# - CAMUNDA_AUTHORIZATION_FLAG=${CAMUNDA_AUTHORIZATION_FLAG}
# - CAMUNDA_AUTHORIZATION_REVOKE_CHECK_FLAG=${CAMUNDA_AUTHORIZATION_REVOKE_CHECK_FLAG}
# - CAMUNDA_JOB_CORE_POOL_SIZE=${CAMUNDA_JOB_CORE_POOL_SIZE}
Expand All @@ -47,7 +48,6 @@ services:
# - CAMUNDA_JOB_WAIT_TIME_MILLIS=${CAMUNDA_JOB_WAIT_TIME_MILLIS}
# - CAMUNDA_JOB_MAX_WAIT=${CAMUNDA_JOB_MAX_WAIT}
# - CAMUNDA_METRICS_FLAG=${CAMUNDA_METRICS_FLAG}
# - CAMUNDA_BPM_HISTORY_LEVEL=${CAMUNDA_BPM_HISTORY_LEVEL}
- CAMUNDA_APP_ROOT_LOG_FLAG=${CAMUNDA_APP_ROOT_LOG_FLAG:-error}
- FORMSFLOW_API_URL=${FORMSFLOW_API_URL}
- FORMIO_URL=${FORMIO_DEFAULT_PROJECT_URL}
Expand Down Expand Up @@ -82,4 +82,4 @@ networks:
driver: "bridge"

volumes:
postgres:
postgres:
4 changes: 2 additions & 2 deletions forms-flow-forms/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ services:

forms-flow-forms:
container_name: forms-flow-forms
image: formsflow/forms-flow-forms:v5.2.0-alpha
image: formsflow/forms-flow-forms:v5.2.1
# The app will restart until Mongo is listening
restart: always
links:
Expand Down Expand Up @@ -64,4 +64,4 @@ networks:
driver: 'bridge'

volumes:
mdb-data:
mdb-data:
6 changes: 2 additions & 4 deletions forms-flow-web-root-config/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ http {
default_type application/octet-stream;
server_tokens off;
underscores_in_headers on;
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

# Use a w3c standard log format
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
Expand All @@ -46,9 +45,8 @@ http {
index index.html;
error_log /dev/stdout info;
access_log /dev/stdout;

location / {
add_header 'Access-Control-Allow-Origin' '*';
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
Expand Down
2 changes: 1 addition & 1 deletion forms-flow-web-root-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@
"word-wrap": "1.2.4",
"postcss": "8.4.31"
}
}
}
2 changes: 1 addition & 1 deletion forms-flow-web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ COPY nginx.conf /etc/nginx/nginx.conf
EXPOSE 8080

# Start Nginx server
CMD ["nginx", "-g", "daemon off;"]
CMD ["nginx", "-g", "daemon off;"]
Empty file.
9 changes: 2 additions & 7 deletions forms-flow-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,8 @@
},
"license": "MIT",
"devDependencies": {
"@craco/craco": "6.4.5",
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^12.1.1",
"craco-plugin-single-spa-application": "git+https://github.com/AOT-Technologies/craco-plugin-single-spa-application.git",
"msw": "^0.36.0",
"redux-mock-store": "^1.5.4"
},
Expand Down Expand Up @@ -103,10 +101,7 @@
"sockjs-client": "^1.5.1",
"source-map-explorer": "^2.5.2",
"stompjs": "^2.3.3",
"ws": "^7.4.6",
"single-spa": "^5.9.4",
"single-spa-layout": "^2.1.0",
"single-spa-react": "^5.0.0"
"ws": "^7.4.6"
},
"resolutions": {
"browserslist": "^4.17.6",
Expand Down Expand Up @@ -135,4 +130,4 @@
"not ie <= 11",
"not op_mini all"
]
}
}
10 changes: 5 additions & 5 deletions forms-flow-web/scripts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,17 @@ const run = async (params) => {
*/
async function upload(file_name, file, type = "application/javascript", encode = true) {
const params = {
Bucket: BUCKET,
Key: `${component}/${file_name}`,
Body: createReadStream(file),
Bucket: BUCKET,
Key: `${component}/${file_name}`,
Body: createReadStream(file),
ContentType: type,
ContentEncoding:"gzip"
};
if(!encode){
delete params.ContentEncoding;
}
run(params);

}

Walk.walk(`../build`, walkFunc)
Expand Down Expand Up @@ -121,4 +121,4 @@ function walkFunc(err, pathname, dirent) {
}
}
return Promise.resolve();
}
}
Loading
Loading