diff --git a/.github/workflows/pro-release-develop.yml b/.github/workflows/pro-release-develop.yml deleted file mode 100644 index 0cce8410e6..0000000000 --- a/.github/workflows/pro-release-develop.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: Budibase Release Staging (Pro) - -# Temporary pipeline - eventualy this will be merged with the regular one - -on: - push: - branches: - - pro-develop - paths: - - ".aws/**" - - ".github/**" - - "charts/**" - - "packages/**" - - "scripts/**" - - "package.json" - - "yarn.lock" - - "package.json" - - "yarn.lock" - -env: - POSTHOG_TOKEN: ${{ secrets.POSTHOG_TOKEN }} - INTERCOM_TOKEN: ${{ secrets.INTERCOM_TOKEN }} - POSTHOG_URL: ${{ secrets.POSTHOG_URL }} - -jobs: - release: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: 14.x - - run: yarn - - run: yarn bootstrap - - run: yarn lint - - run: yarn build - - run: yarn test - - - name: Build/release Docker images (Pro) - run: | - docker login -u $DOCKER_USER -p $DOCKER_PASSWORD - yarn build:docker:develop:pro - yarn release:docker:pro develop - env: - DOCKER_USER: ${{ secrets.DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_API_KEY }} diff --git a/.github/workflows/pro-release-selfhost.yml b/.github/workflows/pro-release-selfhost.yml deleted file mode 100644 index 1b2b951d52..0000000000 --- a/.github/workflows/pro-release-selfhost.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Budibase Release Selfhost (Pro) - -# Temporary pipeline - eventualy this will be merged with the regular one - -on: - workflow_dispatch: - -jobs: - release: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - with: - node-version: 14.x - fetch_depth: 0 - - - name: Tag and release Docker images (Pro) (Self Host) - run: | - docker login -u $DOCKER_USER -p $DOCKER_PASSWORD - - # Get latest release version - release_version=$(cat lerna.json | jq -r '.version') - echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV - release_tag=v$release_version - - # Pull apps and worker images - docker pull budibase/apps-pro:$release_tag - docker pull budibase/worker-pro:$release_tag - - # Tag apps and worker images - docker tag budibase/apps-pro:$release_tag budibase/apps-pro:$SELFHOST_TAG - docker tag budibase/worker-pro:$release_tag budibase/worker-pro:$SELFHOST_TAG - - # Push images - docker push budibase/apps-pro:$SELFHOST_TAG - docker push budibase/worker-pro:$SELFHOST_TAG - env: - DOCKER_USER: ${{ secrets.DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_API_KEY }} - SELFHOST_TAG: latest diff --git a/.github/workflows/pro-release.yml b/.github/workflows/pro-release.yml deleted file mode 100644 index 274f418ec2..0000000000 --- a/.github/workflows/pro-release.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: Budibase Release (Pro) - -# Temporary pipeline - eventualy this will be merged with the regular one - -on: - push: - branches: - - pro-master - paths: - - ".aws/**" - - ".github/**" - - "charts/**" - - "packages/**" - - "scripts/**" - - "package.json" - - "yarn.lock" - - "package.json" - - "yarn.lock" - -env: - POSTHOG_TOKEN: ${{ secrets.POSTHOG_TOKEN }} - INTERCOM_TOKEN: ${{ secrets.INTERCOM_TOKEN }} - POSTHOG_URL: ${{ secrets.POSTHOG_URL }} - SENTRY_DSN: ${{ secrets.SENTRY_DSN }} - -jobs: - release: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: 14.x - - run: yarn - - run: yarn bootstrap - - run: yarn lint - - run: yarn build - - run: yarn test - - - name: "Get Previous tag" - id: previoustag - uses: "WyriHaximus/github-action-get-previous-tag@v1" - - - name: Build/release Docker images - run: | - docker login -u $DOCKER_USER -p $DOCKER_PASSWORD - yarn build:docker:pro - yarn release:docker:pro ${BUDIBASE_RELEASE_VERSION} - env: - DOCKER_USER: ${{ secrets.DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_API_KEY }} - BUDIBASE_RELEASE_VERSION: ${{ steps.previoustag.outputs.tag }} diff --git a/.github/workflows/release-develop.yml b/.github/workflows/release-develop.yml index b61d4c03b6..4467cd6c81 100644 --- a/.github/workflows/release-develop.yml +++ b/.github/workflows/release-develop.yml @@ -1,38 +1,38 @@ name: Budibase Release Staging -on: - push: +on: + push: branches: - develop paths: - - ".aws/**" - - ".github/**" - - "charts/**" - - "packages/**" - - "scripts/**" - - "package.json" - - "yarn.lock" - - "package.json" - - "yarn.lock" + - '.aws/**' + - '.github/**' + - 'charts/**' + - 'packages/**' + - 'scripts/**' + - 'package.json' + - 'yarn.lock' + - 'package.json' + - 'yarn.lock' env: POSTHOG_TOKEN: ${{ secrets.POSTHOG_TOKEN }} INTERCOM_TOKEN: ${{ secrets.INTERCOM_TOKEN }} POSTHOG_URL: ${{ secrets.POSTHOG_URL }} - + jobs: release: - runs-on: ubuntu-latest + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: node-version: 14.x - - run: yarn - - run: yarn bootstrap - - run: yarn lint - - run: yarn build + - run: yarn + - run: yarn bootstrap + - run: yarn lint + - run: yarn build - run: yarn test - name: Configure AWS Credentials @@ -45,7 +45,7 @@ jobs: - name: Publish budibase packages to NPM env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - run: | + run: | # setup the username and email. I tend to use 'GitHub Actions Bot' with no email by default git config user.name "Budibase Staging Release Bot" git config user.email "<>" @@ -53,10 +53,10 @@ jobs: yarn release:develop - name: Build/release Docker images - run: | + run: | docker login -u $DOCKER_USER -p $DOCKER_PASSWORD + yarn build yarn build:docker:develop - yarn release:docker develop env: DOCKER_USER: ${{ secrets.DOCKER_USERNAME }} DOCKER_PASSWORD: ${{ secrets.DOCKER_API_KEY }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3757556cfa..82848c78e4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,19 +1,19 @@ name: Budibase Release on: - push: + push: branches: - master paths: - - ".aws/**" - - ".github/**" - - "charts/**" - - "packages/**" - - "scripts/**" - - "package.json" - - "yarn.lock" - - "package.json" - - "yarn.lock" + - '.aws/**' + - '.github/**' + - 'charts/**' + - 'packages/**' + - 'scripts/**' + - 'package.json' + - 'yarn.lock' + - 'package.json' + - 'yarn.lock' env: POSTHOG_TOKEN: ${{ secrets.POSTHOG_TOKEN }} @@ -53,15 +53,15 @@ jobs: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} >> .npmrc yarn release - - name: "Get Previous tag" + - name: 'Get Previous tag' id: previoustag uses: "WyriHaximus/github-action-get-previous-tag@v1" - name: Build/release Docker images - run: | + run: | docker login -u $DOCKER_USER -p $DOCKER_PASSWORD + yarn build yarn build:docker - yarn release:docker ${BUDIBASE_RELEASE_VERSION} env: DOCKER_USER: ${{ secrets.DOCKER_USERNAME }} DOCKER_PASSWORD: ${{ secrets.DOCKER_API_KEY }} diff --git a/hosting/docker-compose.yaml b/hosting/docker-compose.yaml index 7fdafd0040..17ed12a13d 100644 --- a/hosting/docker-compose.yaml +++ b/hosting/docker-compose.yaml @@ -31,34 +31,6 @@ services: - worker-service - redis-service - app-service-pro: - restart: always - image: app-service-pro - container_name: bbapps-pro - ports: - - "${APP_PORT}:4002" - environment: - SELF_HOSTED: 1 - COUCH_DB_URL: http://${COUCH_DB_USER}:${COUCH_DB_PASSWORD}@couchdb-service:5984 - WORKER_URL: http://worker-service:4003 - MINIO_URL: http://minio-service:9000 - MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY} - MINIO_SECRET_KEY: ${MINIO_SECRET_KEY} - INTERNAL_API_KEY: ${INTERNAL_API_KEY} - BUDIBASE_ENVIRONMENT: ${BUDIBASE_ENVIRONMENT} - PORT: 4002 - JWT_SECRET: ${JWT_SECRET} - LOG_LEVEL: info - SENTRY_DSN: https://a34ae347621946bf8acded18e5b7d4b8@o420233.ingest.sentry.io/5338131 - ENABLE_ANALYTICS: "true" - REDIS_URL: redis-service:6379 - REDIS_PASSWORD: ${REDIS_PASSWORD} - volumes: - - ./logs:/logs - depends_on: - - worker-service - - redis-service - worker-service: restart: always image: budibase.docker.scarf.sh/budibase/worker diff --git a/hosting/scripts/linux/docker-release/budibase-pro.sh b/hosting/scripts/linux/docker-release/budibase-pro.sh deleted file mode 100755 index 809c6ca353..0000000000 --- a/hosting/scripts/linux/docker-release/budibase-pro.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -tag=$1 - -if [[ ! "$tag" ]]; then - echo "No tag present. You must pass a tag to this script" - exit 1 -fi - -echo "Tagging images with tag: $tag" - -docker tag app-service-pro budibase/apps-pro:$tag -docker tag worker-service-pro budibase/worker-pro:$tag - -docker push --all-tags budibase/apps-pro -docker push --all-tags budibase/worker-pro diff --git a/hosting/scripts/linux/docker-release/budibase.sh b/hosting/scripts/linux/release-to-docker-hub.sh similarity index 100% rename from hosting/scripts/linux/docker-release/budibase.sh rename to hosting/scripts/linux/release-to-docker-hub.sh diff --git a/hosting/scripts/pro/download.js b/hosting/scripts/pro/download.js deleted file mode 100644 index 344aed6475..0000000000 --- a/hosting/scripts/pro/download.js +++ /dev/null @@ -1,52 +0,0 @@ -const fetch = require('node-fetch') -const fs = require('fs') -const util = require('util') -const streamPipeline = util.promisify(require('stream').pipeline) - -async function download (url, opts, path) { - const response = await fetch(url, opts) - if (!response.ok) throw new Error(`unexpected response ${response.statusText}`) - await streamPipeline(response.body, fs.createWriteStream(path)) -} - -const install = async () => { - // get github token - const token = process.env.GITHUB_TOKEN - if (!token) { - throw new Error("Missing token") - } - - // get version from package.json - let packageJson = JSON.parse(fs.readFileSync('package.json')) - let version = packageJson.dependencies['@budibase/pro'] - if (version.startsWith('^')) { - version = version.substring(1) - } - const ghVersion = `v${version}` - - // get the package url - // TODO: Add semver support - // TODO: Potentially can use yarn to download directly from github if pro becomes a non monorepo - const resp = await fetch(`https://api.github.com/repos/budibase/budibase-pro/releases`, { - headers: { - Authorization: `token ${token}`, - Accept: "application/vnd.github.v3.raw" - } - }) - - if (!resp.ok) { - throw new Error("Failed to get release info. Aborting") - } - const releases = await resp.json() - const release = releases.filter(r => r.name === ghVersion)[0] - const url = release.assets.filter(a => a.name === "pro.zip")[0].url - - console.log("Downloading pro package") - // download the package - await download(url, { headers: { Authorization: `token ${token}`, Accept: 'application/octet-stream' }}, './pro.zip') -} - -install().catch(e => { - console.error(e) - process.exit(1) -}) \ No newline at end of file diff --git a/hosting/scripts/pro/install.sh b/hosting/scripts/pro/install.sh deleted file mode 100755 index 7d2982a4e1..0000000000 --- a/hosting/scripts/pro/install.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -if [[ ! -z "${PRO}" ]]; then - echo "Installing pro package" - rm -rf node_modules/@budibase/pro - unzip pro.zip -d node_modules/@budibase - rm pro.zip -fi \ No newline at end of file diff --git a/package.json b/package.json index 0b2f266423..0a83f59af6 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,6 @@ }, "scripts": { "setup": "node ./hosting/scripts/setup.js && yarn && yarn bootstrap && yarn build && yarn dev", - "install:pro": "lerna run install:pro --", "bootstrap": "lerna link && lerna bootstrap", "build": "lerna run build", "publishnpm": "yarn build && lerna publish --force-publish", diff --git a/packages/client/stats.html b/packages/client/stats.html index 639788dbff..e52fc20881 100644 --- a/packages/client/stats.html +++ b/packages/client/stats.html @@ -2669,7 +2669,7 @@ var drawChart = (function (exports) {