Merge branch 'master' into develop
This commit is contained in:
commit
49be2e5b3d
|
@ -16,7 +16,8 @@
|
|||
"dist",
|
||||
"public",
|
||||
"*.spec.js",
|
||||
"bundle.js"
|
||||
"bundle.js",
|
||||
"packages/pro"
|
||||
],
|
||||
"plugins": ["svelte3"],
|
||||
"extends": ["eslint:recommended"],
|
||||
|
|
|
@ -2,23 +2,29 @@ name: Budibase Deploy Production
|
|||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: Budibase release version. For example - 1.0.0
|
||||
required: false
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Fail if branch is not master
|
||||
if: github.ref != 'refs/heads/master'
|
||||
run: |
|
||||
echo "Ref is not master, you must run this job from master."
|
||||
exit 1
|
||||
- name: Fail if not a tag
|
||||
run: |
|
||||
if [[ $GITHUB_REF != refs/tags/* ]]; then
|
||||
echo "Workflow Dispatch can only be run on tags"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Fail if tag is not in master
|
||||
run: |
|
||||
if ! git merge-base --is-ancestor ${{ github.sha }} origin/master; then
|
||||
echo "Tag is not in master. This pipeline can only execute tags that are present on the master branch"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Pull values.yaml from budibase-infra
|
||||
run: |
|
||||
|
@ -31,11 +37,7 @@ jobs:
|
|||
- name: Get the latest budibase release version
|
||||
id: version
|
||||
run: |
|
||||
if [ -z "${{ github.event.inputs.version }}" ]; then
|
||||
release_version=$(cat lerna.json | jq -r '.version')
|
||||
else
|
||||
release_version=${{ github.event.inputs.version }}
|
||||
fi
|
||||
release_version=$(cat lerna.json | jq -r '.version')
|
||||
echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
|
||||
|
||||
- name: Configure AWS Credentials
|
||||
|
|
|
@ -1,27 +1,35 @@
|
|||
name: "deploy-preprod"
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: Budibase release version. For example - 1.0.0
|
||||
required: false
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
deploy-to-legacy-preprod-env:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Fail if not a tag
|
||||
run: |
|
||||
if [[ $GITHUB_REF != refs/tags/* ]]; then
|
||||
echo "Workflow Dispatch can only be run on tags"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Fail if tag is not in master
|
||||
run: |
|
||||
if ! git merge-base --is-ancestor ${{ github.sha }} origin/master; then
|
||||
echo "Tag is not in master. This pipeline can only execute tags that are present on the master branch"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
- name: Get the latest budibase release version
|
||||
id: version
|
||||
run: |
|
||||
if [ -z "${{ github.event.inputs.version }}" ]; then
|
||||
git pull
|
||||
release_version=$(cat lerna.json | jq -r '.version')
|
||||
else
|
||||
release_version=${{ github.event.inputs.version }}
|
||||
fi
|
||||
release_version=$(cat lerna.json | jq -r '.version')
|
||||
echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
|
||||
- name: Configure AWS Credentials
|
||||
uses: aws-actions/configure-aws-credentials@v1
|
||||
|
|
|
@ -22,6 +22,13 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Fail if not a tag
|
||||
run: |
|
||||
if [[ $GITHUB_REF != refs/tags/* ]]; then
|
||||
echo "Workflow Dispatch can only be run on tags"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
|
|
|
@ -9,12 +9,6 @@ on:
|
|||
- "v[0-9]+.[0-9]+.[0-9]+"
|
||||
# Exclude all pre-releases
|
||||
- "!v*[0-9]+.[0-9]+.[0-9]+-*"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tags:
|
||||
description: "Release tag"
|
||||
required: true
|
||||
type: boolean
|
||||
|
||||
env:
|
||||
# Posthog token used by ui at build time
|
||||
|
@ -33,12 +27,13 @@ jobs:
|
|||
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Fail if branch is not master
|
||||
if: github.ref != 'refs/heads/master'
|
||||
- name: Fail if tag is not in master
|
||||
run: |
|
||||
echo "Ref is not master, you must run this job from master."
|
||||
// Change to "exit 1" when merged. Left to 0 to not fail all the pipelines and not to cause noise
|
||||
exit 0
|
||||
if ! git merge-base --is-ancestor ${{ github.sha }} origin/master; then
|
||||
echo "Tag is not in master. This pipeline can only execute tags that are present on the master branch"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
|
@ -65,7 +60,6 @@ jobs:
|
|||
- name: Publish budibase packages to NPM
|
||||
env:
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
RELEASE_VERSION_TYPE: ${{ github.event.inputs.versioning }}
|
||||
run: |
|
||||
# setup the username and email. I tend to use 'GitHub Actions Bot' with no email by default
|
||||
git config --global user.name "Budibase Release Bot"
|
||||
|
@ -140,7 +134,6 @@ jobs:
|
|||
- name: Get the latest budibase release version
|
||||
id: version
|
||||
run: |
|
||||
git pull
|
||||
release_version=$(cat lerna.json | jq -r '.version')
|
||||
echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
|
||||
|
||||
|
|
|
@ -8,16 +8,24 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Fail if branch is not master
|
||||
if: github.ref != 'refs/heads/master'
|
||||
- name: Fail if not a tag
|
||||
run: |
|
||||
echo "Ref is not master, you must run this job from master."
|
||||
exit 1
|
||||
if [[ $GITHUB_REF != refs/tags/* ]]; then
|
||||
echo "Workflow Dispatch can only be run on tags"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch_depth: 0
|
||||
|
||||
- name: Fail if tag is not in master
|
||||
run: |
|
||||
if ! git merge-base --is-ancestor ${{ github.sha }} origin/master; then
|
||||
echo "Tag is not in master. This pipeline can only execute tags that are present on the master branch"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Use Node.js 14.x
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
|
@ -78,7 +86,7 @@ jobs:
|
|||
git config user.name "Budibase Helm Bot"
|
||||
git config user.email "<>"
|
||||
git reset --hard
|
||||
git pull
|
||||
git fetch
|
||||
mkdir sync
|
||||
echo "Packaging chart to sync dir"
|
||||
helm package charts/budibase --version "$RELEASE_VERSION" --app-version "$RELEASE_VERSION" --destination sync
|
||||
|
|
|
@ -15,13 +15,24 @@ jobs:
|
|||
matrix:
|
||||
node-version: [14.x]
|
||||
steps:
|
||||
- name: Fail if branch is not master
|
||||
if: github.ref != 'refs/heads/master'
|
||||
run: |
|
||||
echo "Ref is not master, you must run this job from master."
|
||||
exit 1
|
||||
- name: Fail if not a tag
|
||||
run: |
|
||||
if [[ $GITHUB_REF != refs/tags/* ]]; then
|
||||
echo "Workflow Dispatch can only be run on tags"
|
||||
exit 1
|
||||
fi
|
||||
- name: "Checkout"
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Fail if tag is not in master
|
||||
run: |
|
||||
if ! git merge-base --is-ancestor ${{ github.sha }} origin/master; then
|
||||
echo "Tag is not in master. This pipeline can only execute tags that are present on the master branch"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
|
|
|
@ -28,7 +28,7 @@ on:
|
|||
required: true
|
||||
|
||||
jobs:
|
||||
tag-prerelease:
|
||||
tag-release:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
@ -43,9 +43,11 @@ jobs:
|
|||
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
|
||||
|
||||
- run: yarn
|
||||
- name: Tag prerelease
|
||||
- name: Tag release
|
||||
run: |
|
||||
# setup the username and email.
|
||||
git config --global user.name "Budibase Staging Release Bot"
|
||||
git config --global user.email "<>"
|
||||
./scripts/versionCommit.sh ${{ github.event.inputs.versioning }}
|
||||
BUMP_TYPE_INPUT=${{ github.event.inputs.versioning }}
|
||||
BUMP_TYPE=${BUMP_TYPE_INPUT:-"patch"}
|
||||
./scripts/versionCommit.sh $BUMP_TYPE
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"version": "2.6.24-alpha.1",
|
||||
"version": "2.6.27",
|
||||
"npmClient": "yarn",
|
||||
"packages": [
|
||||
"packages/backend-core",
|
||||
|
|
|
@ -38,8 +38,8 @@
|
|||
"backend:build": "./scripts/scopeBackend.sh 'lerna run --stream build'",
|
||||
"build:sdk": "lerna run --stream build:sdk",
|
||||
"deps:circular": "madge packages/server/dist/index.js packages/worker/src/index.ts packages/backend-core/dist/src/index.js packages/cli/src/index.js --circular",
|
||||
"release": "lerna publish ${RELEASE_VERSION_TYPE:-patch} --yes --force-publish --no-git-tag-version --no-push --no-git-reset",
|
||||
"release:develop": "lerna publish from-package --yes --force-publish --dist-tag develop --exact --no-git-tag-version --no-push --no-git-reset",
|
||||
"release": "lerna publish from-package --yes --force-publish --no-git-tag-version --no-push --no-git-reset",
|
||||
"release:develop": "yarn release --dist-tag develop",
|
||||
"restore": "yarn run clean && yarn run bootstrap && yarn run build",
|
||||
"nuke": "yarn run nuke:packages && yarn run nuke:docker",
|
||||
"nuke:packages": "yarn run restore",
|
||||
|
|
|
@ -3,6 +3,7 @@ import {
|
|||
Event,
|
||||
User,
|
||||
UserCreatedEvent,
|
||||
UserDataCollaborationEvent,
|
||||
UserDeletedEvent,
|
||||
UserInviteAcceptedEvent,
|
||||
UserInvitedEvent,
|
||||
|
@ -173,6 +174,15 @@ async function passwordReset(user: User) {
|
|||
await publishEvent(Event.USER_PASSWORD_RESET, properties)
|
||||
}
|
||||
|
||||
// COLLABORATION
|
||||
|
||||
async function dataCollaboration(users: number) {
|
||||
const properties: UserDataCollaborationEvent = {
|
||||
users,
|
||||
}
|
||||
await publishEvent(Event.USER_DATA_COLLABORATION, properties)
|
||||
}
|
||||
|
||||
export default {
|
||||
created,
|
||||
updated,
|
||||
|
@ -188,4 +198,5 @@ export default {
|
|||
passwordUpdated,
|
||||
passwordResetRequested,
|
||||
passwordReset,
|
||||
dataCollaboration,
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import authorized from "../middleware/authorized"
|
||||
import { BaseSocket } from "./websocket"
|
||||
import { permissions } from "@budibase/backend-core"
|
||||
import { permissions, events } from "@budibase/backend-core"
|
||||
import http from "http"
|
||||
import Koa from "koa"
|
||||
import { Datasource, Table, SocketSession, ContextUser } from "@budibase/types"
|
||||
|
@ -22,6 +22,9 @@ export default class BuilderSocket extends BaseSocket {
|
|||
// Reply with all users in current room
|
||||
const sessions = await this.getRoomSessions(appId)
|
||||
callback({ users: sessions })
|
||||
|
||||
// Track usage
|
||||
await events.user.dataCollaboration(sessions.length)
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -26,6 +26,9 @@ export enum Event {
|
|||
USER_PASSWORD_RESET_REQUESTED = "user:password:reset:requested",
|
||||
USER_PASSWORD_RESET = "user:password:reset",
|
||||
|
||||
// USER / COLLABORATION
|
||||
USER_DATA_COLLABORATION = "user:data:collaboration",
|
||||
|
||||
// EMAIL
|
||||
EMAIL_SMTP_CREATED = "email:smtp:created",
|
||||
EMAIL_SMTP_UPDATED = "email:smtp:updated",
|
||||
|
@ -233,6 +236,7 @@ export const AuditedEventFriendlyName: Record<Event, string | undefined> = {
|
|||
[Event.USER_PASSWORD_FORCE_RESET]: undefined,
|
||||
[Event.USER_GROUP_ONBOARDING]: undefined,
|
||||
[Event.USER_ONBOARDING_COMPLETE]: undefined,
|
||||
[Event.USER_DATA_COLLABORATION]: undefined,
|
||||
|
||||
// EMAIL
|
||||
[Event.EMAIL_SMTP_CREATED]: `Email configuration created`,
|
||||
|
|
|
@ -86,3 +86,7 @@ export interface UserPasswordResetEvent extends BaseEvent {
|
|||
email: string
|
||||
}
|
||||
}
|
||||
|
||||
export interface UserDataCollaborationEvent extends BaseEvent {
|
||||
users: number
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
echo "Error: version number is required. Usage: $0 [major|minor|patch|prerelease]"
|
||||
echo "Error: bump type is required. Usage: $0 [major|minor|patch|prerelease]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue