Skip to content

Commit

Permalink
Merge branch 'release-2.2.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
imedina committed Mar 29, 2022
2 parents 5b8fb25 + 28442a8 commit 68465ac
Show file tree
Hide file tree
Showing 719 changed files with 103,436 additions and 54,528 deletions.
32 changes: 32 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

# Special property that should be specified
# at the top of the file outside of any sections.
# Set to true to stop .editorconfig files search
# on current file.
root = true

[*] #All type of file
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.js]
indent_style = space
tab_width = 4

[*.yml]
indent_style = space
indent_size = 2

[package.json]
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false

[*.{html,js,md}]
block_comment_start = /**
block_comment = *
block_comment_end = */
31 changes: 26 additions & 5 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
{
"extends": ["eslint:recommended", "google", "plugin:cypress/recommended"],
"root":true,
"extends": [
"eslint:recommended",
"google",
"plugin:cypress/recommended",
"plugin:wc/recommended",
"plugin:lit/recommended"
],
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 6,
Expand All @@ -11,7 +18,7 @@
},
"rules": {
"indent": ["error", 4, { "SwitchCase": 1, "ignoredNodes": ["TemplateLiteral *"] }],
"max-len": ["error", 200],
"max-len": ["error", 230],
"no-console": ["error", { "allow": ["log", "warn", "error", "time", "timeEnd"] }],
"no-param-reassign": ["warn", { "props": true }],
"no-undef": ["warn"],
Expand All @@ -20,7 +27,7 @@
"no-use-before-define": ["error", { "classes": false }],
"padded-blocks": ["error", { "classes": "always" }],
"quotes": ["warn", "double"],
"comma-dangle": ["error", "never"],
"comma-dangle": ["error", "only-multiline"],
"arrow-parens": ["error","as-needed"],
"no-invalid-this": 0,
"babel/no-invalid-this": 0,
Expand All @@ -38,6 +45,20 @@
"one-var": ["error", { "initialized": "never", "uninitialized": "always" }]
},
"plugins": [
"cypress"
]
"cypress",
"lit"
],
"overrides": [
{
"files": ["*.js"],
"rules": {
"lit/no-property-change-update": 0,
"cypress/no-unnecessary-waiting": 0
}
}
],
"globals": {
"$": true,
"globalThis": true
}
}
47 changes: 47 additions & 0 deletions .github/workflows/build-jsorolla-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: "Reusable workflow to build JSorolla"

on:
workflow_call:
outputs:
version:
description: "JSorolla version"
value: ${{ jobs.build-jsorolla-workflow.outputs.version }}

jobs:
build-jsorolla-workflow:
name: Build JSorolla
runs-on: ubuntu-20.04
outputs:
version: ${{ steps.package.outputs.version }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "16"
- uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- run: npm install
- run: npm run build
- id: package
uses: tyankatsu0105/read-package-version-actions@v1
- uses: actions/upload-artifact@v2
with:
name: jsorolla-build
path: build
retention-days: 1
- uses: actions/upload-artifact@v2
with:
name: jsorolla-release
# TODO: we should rename the iva-VERSION.tar.gz file as jsorolla-VERSION.tar.gz
path: iva-${{ steps.package.outputs.version }}.tar.gz
retention-days: 1

33 changes: 33 additions & 0 deletions .github/workflows/deploy-jsorolla-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "Reusable workflow to deploy JSorolla application"

on:
workflow_call:
inputs:
version:
type: string
required: true
secrets:
SSH_SWDEV_IP:
required: true
SSH_SWDEV_USER:
required: true
SSH_SWDEV_PASSWORD:
required: true

jobs:
deploy-jsorolla-workflow:
name: Deploy JSorolla Application
runs-on: ubuntu-20.04
steps:
- uses: actions/download-artifact@v2
with:
name: jsorolla-build
path: build
- uses: garygrossgarten/github-action-scp@release
with:
local: build
remote: /mnt/data/WEB-APPS/dev/jsorolla-${{ inputs.version }}
rmRemote: true
host: ${{ secrets.SSH_SWDEV_IP }}
username: ${{ secrets.SSH_SWDEV_USER }}
password: ${{ secrets.SSH_SWDEV_PASSWORD }}
42 changes: 42 additions & 0 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "Main Workflow for JSorolla"

on:
push:
branches:
- "develop"
- "release-*"

jobs:
build:
uses: opencb/jsorolla/.github/workflows/build-jsorolla-workflow.yml@develop

docker:
needs: build
uses: opencb/jsorolla/.github/workflows/docker-jsorolla-workflow.yml@develop
secrets:
DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }}
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}

deploy:
needs: build
uses: opencb/jsorolla/.github/workflows/deploy-jsorolla-workflow.yml@develop
with:
version: ${{ needs.build.outputs.version }}
secrets:
SSH_SWDEV_IP: ${{ secrets.SSH_SWDEV_IP }}
SSH_SWDEV_USER: ${{ secrets.SSH_SWDEV_USER }}
SSH_SWDEV_PASSWORD: ${{ secrets.SSH_SWDEV_PASSWORD }}

# notify:
# name: Notify private repository
# runs-on: ubuntu-20.04
# needs: build
# steps:
# - uses: actions/checkout@v2
# - name: Invoke workflow in a private repo
# uses: benc-uk/workflow-dispatch@v1
# with:
# workflow: Docker publish
# ref: ${{ github.event.push.head.ref }}
# repo: ${{ secrets.JSOROLLA_PRIVATE_REPO }}
# token: ${{ secrets.ZG_PERSONAL_TOKEN }}
26 changes: 26 additions & 0 deletions .github/workflows/docker-jsorolla-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: "Reusable workflow to publish JSorolla in DockerHub"

on:
workflow_call:
secrets:
DOCKER_HUB_USER:
required: true
DOCKER_HUB_PASSWORD:
required: true

jobs:
docker-jsorolla-workflow:
name: Publish JSorolla Docker
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
name: jsorolla-build
path: build
- uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- run: python3 ./docker/docker-build.py push --images app

34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "Release"

on:
push:
tags:
- "*"

jobs:
build:
uses: opencb/jsorolla/.github/workflows/build-jsorolla-workflow.yml@develop

docker:
needs: build
uses: opencb/jsorolla/.github/workflows/docker-jsorolla-workflow.yml@develop
secrets:
DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }}
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}

release:
needs: [build, docker]
uses: opencb/java-common-libs/.github/workflows/release-github-workflow.yml@develop
with:
artifact: jsorolla-release
file: iva-${{ needs.build.outputs.version }}.tar.gz

deploy:
needs: build
uses: opencb/jsorolla/.github/workflows/deploy-jsorolla-workflow.yml@develop
with:
version: ${{ needs.build.outputs.version }}
secrets:
SSH_SWDEV_IP: ${{ secrets.SSH_SWDEV_IP }}
SSH_SWDEV_USER: ${{ secrets.SSH_SWDEV_USER }}
SSH_SWDEV_PASSWORD: ${{ secrets.SSH_SWDEV_PASSWORD }}
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@

build/
build-next/
dist/
*node_modules/
*web_modules/
bower_components/
grunt/
dist-genome/
custom-conf
custom-sites
*.tar.gz

npm-debug.log

Expand Down Expand Up @@ -44,3 +49,10 @@ local.properties
# PDT-specific
.buildpath

# Cypress
fixtures
screenshots
support
videos
mochawesome-report

1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
30 changes: 0 additions & 30 deletions .husky/_/husky.sh

This file was deleted.

5 changes: 5 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run lint:js
# npm test
Loading

0 comments on commit 68465ac

Please sign in to comment.