Skip to content

Commit

Permalink
Merge pull request #1 from polarityio/develop
Browse files Browse the repository at this point in the history
Updating Github Actions & Adding config.json
  • Loading branch information
penwoodjon committed Jan 23, 2023
2 parents b16ff97 + 67e6c99 commit 1f3594b
Show file tree
Hide file tree
Showing 5 changed files with 217 additions and 68 deletions.
57 changes: 5 additions & 52 deletions .github/workflows/release-current-version.yml
Original file line number Diff line number Diff line change
@@ -1,58 +1,11 @@
# This workflow will run on merge of a PR or push to master
# It will run the integration developement checklist and if that passes
# creates a new release with the Release and Tag name both being the
# package.json version and will with a created tgz file and the SHA256 has in the release body


name: Release Current Version

on:
push:
branches: [ master ]
branches: [ master, main ]

jobs:
release-current-version:
runs-on: ubuntu-latest
container: 'centos:7'

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- name: Get NPM Version
id: package-version
uses: martinbeentjes/npm-get-version-action@95bc31c6dd3145896c110e382f840bb1e750d09c
- name: Create Build
id: create_build
run: |
npm install &&
cd .. &&
tar --exclude="./${{ github.event.repository.name }}/.git" --exclude="./${{ github.event.repository.name }}/.gitignore" --exclude="./${{ github.event.repository.name }}/package-lock.json" --exclude="./${{ github.event.repository.name }}/.github" -czvf "${{ github.event.repository.name }}-${{ steps.package-version.outputs.current-version }}.tgz" "./${{ github.event.repository.name }}" &&
echo "::set-output name=build_hash::$(sha256sum '${{ github.event.repository.name }}-${{ steps.package-version.outputs.current-version }}.tgz' | grep -oE '^[^ ]*' )" &&
cd ${{ github.event.repository.name }}
- name: Polarity Integration Development Checklist
id: int-dev-checklist
uses: polarityio/polarity-integration-development-checklist@v1.0.0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Versioned Release
id: create_versioned_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.package-version.outputs.current-version}}
release_name: ${{ steps.package-version.outputs.current-version}}
body: |
SHA256: ${{ steps.create_build.outputs.build_hash }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_versioned_release.outputs.upload_url }}
asset_path: ../${{ github.event.repository.name }}-${{ steps.package-version.outputs.current-version}}.tgz
asset_name: ${{ github.event.repository.name }}-${{ steps.package-version.outputs.current-version}}.tgz
asset_content_type: application/gzip
Run:
uses: polarityio/polarity-github-actions/.github/workflows/release-server-versions-for-int-store.yml@master
# with:
# use-integration-development-checklist: false
10 changes: 3 additions & 7 deletions .github/workflows/run-int-dev-checklist.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
# This workflow will run on a Pull Request is created on both master develop
# It run as series of checks from the Integration Developement Checklist


name: Run Integration Development Checklist

on:
pull_request:
branches: [ master, develop ]
branches: [ master, main, develop ]

jobs:
run-integration-development-checklist:
Expand All @@ -19,9 +15,9 @@ jobs:
- name: Test NPM Install
id: test-npm-install
run: |
npm install
npm ci
- name: Polarity Integration Development Checklist
id: int-dev-checklist
uses: polarityio/polarity-integration-development-checklist@v1.0.0
uses: polarityio/polarity-integration-development-checklist@main
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
114 changes: 114 additions & 0 deletions config/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
{
"name": "MySQL",
"acronym": "MSQL",
"description": "SQL Lookup for MySql and MariaDB databases",
"entityTypes": [
"*"
],
"defaultColor": "light-gray",
"styles": [
"./styles/mysql.less"
],
"block": {
"component": {
"file": "./components/mysql-block.js"
},
"template": {
"file": "./templates/mysql-block.hbs"
}
},
"request": {
"cert": "",
"key": "",
"passphrase": "",
"ca": "",
"proxy": "",
"rejectUnauthorized": true
},
"logging": {
"level": "info"
},
"options": [
{
"key": "host",
"name": "Database Host",
"description": "The hostname of the server hosting your MySQL Server instance",
"default": "",
"type": "text",
"userCanEdit": false,
"adminOnly": true
},
{
"key": "port",
"name": "Database Port",
"description": "The port your database instance is listening on (MySQL/MariaDB default port is 3306)",
"default": 3306,
"type": "number",
"userCanEdit": false,
"adminOnly": true
},
{
"key": "database",
"name": "Database Name",
"description": "The name of the database you are connecting to",
"default": "",
"type": "text",
"userCanEdit": false,
"adminOnly": true
},
{
"key": "user",
"name": "User",
"description": "The database user you are connecting as",
"default": "",
"type": "text",
"userCanEdit": false,
"adminOnly": true
},
{
"key": "password",
"name": "Users Password",
"description": "The password of the user you are authenticating as",
"default": "",
"type": "password",
"userCanEdit": false,
"adminOnly": true
},
{
"key": "connectionLimit",
"name": "Connection Limit",
"description": "The maximum number of connections that can be maintained in the connection pool at one time.",
"default": 10,
"type": "number",
"userCanEdit": false,
"adminOnly": true
},
{
"key": "query",
"name": "Query",
"description": "The query you want to execute and return data for. Replace the entity with \"?\". (e.g., SELECT * FROM data WHERE ip = ?). Columns that appear as tags should be prefixed with \"tag\" (e.g., SELECT id as tag1, severity as tag2 FROM data WHERE ip = ?)",
"default": "",
"type": "text",
"userCanEdit": false,
"adminOnly": true
},
{
"key": "allowPublicKeyRetrieval",
"name": "Allow Public Key Retrieval",
"description": "This option is only relevant when SSL is disabled. Setting this option to true in 8.0 servers that have the caching_sha2_password authentication plugin as the default plugin will cause the connection attempt to fail if the user hasn't successfully connected to the server on a previous occasion.",
"default": false,
"type": "boolean",
"userCanEdit": false,
"adminOnly": true
},
{
"key": "enableLeakDetection",
"name": "Enable Connection Leak Detection",
"description": "If checked, this setting will enable connection leak detection logging in the integration's log file. This setting should only be enabled if you are experiencing issues with connection timeouts.",
"default": false,
"type": "boolean",
"userCanEdit": false,
"adminOnly": true
}
]
}
86 changes: 86 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"main": "./integration.js",
"name": "mysql",
"version": "3.1.0-beta",
"private": true,
"dependencies": {
"mariadb": "^2.5.4",
"async": "^3.2.1"
}
}
"name": "mysql",
"version": "3.1.1-beta",
"main": "./integration.js",
"private": true,
"dependencies": {
"mariadb": "^2.5.4",
"async": "^3.2.1"
}
}

0 comments on commit 1f3594b

Please sign in to comment.