Skip to content
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
12 changes: 12 additions & 0 deletions .github/actions/sandbox/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ inputs:
- html
- headless
- empty
edition:
description: Edition
required: true
type: choice
options:
- community
- enterprise
port:
description: Port
required: true
Expand All @@ -21,19 +28,22 @@ runs:
env:
SANDBOX_CONFIGURATION: ${{ inputs.configuration }}
SANDBOX_PORT: ${{ inputs.port }}
ENTERPRISE: ${{ inputs.edition == 'enterprise' && 'ON' || 'OFF' }}
PARALLEL: 2
- name: Up Sandbox (${{ inputs.configuration }})
run: make docker-sandbox-up
shell: bash
env:
SANDBOX_CONFIGURATION: ${{ inputs.configuration }}
SANDBOX_PORT: ${{ inputs.port }}
ENTERPRISE: ${{ inputs.edition == 'enterprise' && 'ON' || 'OFF' }}
- name: Test Sandbox - E2E (${{ inputs.configuration }})
run: make test-e2e PRESET=Release
shell: bash
env:
SANDBOX_CONFIGURATION: ${{ inputs.configuration }}
SANDBOX_PORT: ${{ inputs.port }}
ENTERPRISE: ${{ inputs.edition == 'enterprise' && 'ON' || 'OFF' }}
HURL: 'docker run --rm --network=host --volume \$(PWD):/workspace --workdir /workspace ghcr.io/orange-opensource/hurl:7.0.0'
- name: Test Sandbox - UI (${{ inputs.configuration }})
run: make test-ui PRESET=Release
Expand All @@ -42,9 +52,11 @@ runs:
env:
SANDBOX_CONFIGURATION: ${{ inputs.configuration }}
SANDBOX_PORT: ${{ inputs.port }}
ENTERPRISE: ${{ inputs.edition == 'enterprise' && 'ON' || 'OFF' }}
- name: Down Sandbox (${{ inputs.configuration }})
run: make docker-sandbox-down
shell: bash
env:
SANDBOX_CONFIGURATION: ${{ inputs.configuration }}
SANDBOX_PORT: ${{ inputs.port }}
ENTERPRISE: ${{ inputs.edition == 'enterprise' && 'ON' || 'OFF' }}
16 changes: 14 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,33 +16,45 @@ jobs:
- run: codespell docs *.markdown docs/*.md

test:
strategy:
fail-fast: false
matrix:
edition:
- name: community
options: ENTERPRISE=OFF
- name: enterprise
options: ENTERPRISE=ON

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Build One
run: make docker PRESET=Release
- run: make docker PRESET=Release ${{ matrix.edition.options }}

- name: Sandbox (headless)
uses: ./.github/actions/sandbox
with:
configuration: headless
edition: ${{ matrix.edition.name }}
port: 8000

- name: Sandbox (html)
uses: ./.github/actions/sandbox
with:
configuration: html
edition: ${{ matrix.edition.name }}
port: 8000

- name: Sandbox (empty)
uses: ./.github/actions/sandbox
with:
configuration: empty
edition: ${{ matrix.edition.name }}
port: 8000

# Public instance
- run: docker build . --file public/Dockerfile --progress plain
if: matrix.edition.name == 'enterprise'

website:
runs-on: ubuntu-latest
Expand Down
20 changes: 19 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,23 @@ jobs:
- package: one
os: ubuntu-24.04
arch: amd64
enterprise: OFF
license: BUSL-1.1
- package: one
os: ubuntu-24.04-arm
arch: arm64
enterprise: OFF
license: BUSL-1.1
- package: one-enterprise
os: ubuntu-24.04
arch: amd64
enterprise: ON
license: LicenseRef-Commercial
- package: one-enterprise
os: ubuntu-24.04-arm
arch: arm64
enterprise: ON
license: LicenseRef-Commercial

runs-on: ${{ matrix.edition.os }}
steps:
Expand Down Expand Up @@ -57,6 +71,9 @@ jobs:
with:
context: .
file: Dockerfile
build-args: |
SOURCEMETA_ONE_ENTERPRISE=${{ matrix.edition.enterprise }}
SOURCEMETA_ONE_LICENSE=${{ matrix.edition.license }}
platforms: linux/${{ matrix.edition.arch }}
labels: ${{ steps.meta.outputs.labels }}
annotations: ${{ steps.meta.outputs.annotations }}
Expand Down Expand Up @@ -86,6 +103,7 @@ jobs:
matrix:
edition:
- package: one
- package: one-enterprise

steps:
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
Expand Down Expand Up @@ -175,7 +193,7 @@ jobs:
with:
context: .
file: public/Dockerfile
build-args: "SOURCEMETA_ONE=ghcr.io/sourcemeta/one:main"
build-args: "SOURCEMETA_ONE=ghcr.io/sourcemeta/one-enterprise:main"
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down
18 changes: 17 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ if(NOT ONE_PREFIX_IS_ABSOLUTE)
message(FATAL_ERROR "ONE_PREFIX must be an absolute path but it was: ${ONE_PREFIX}")
endif()

# Commercial editions require a paid license
# See https://one.sourcemeta.com/commercial/
option(ONE_ENTERPRISE "Build the One Enterprise edition (commercial)" OFF)
if(ONE_ENTERPRISE)
message(STATUS "Sourcemeta One edition: Enterprise")
else()
message(STATUS "Sourcemeta One edition: Community")
endif()

find_package(Core REQUIRED)
find_package(Blaze REQUIRED)
find_package(Codegen REQUIRED)
Expand Down Expand Up @@ -90,9 +99,16 @@ add_custom_target(jsonschema_lint

if(ONE_TESTS)
enable_testing()

set(SCHEMA_TEST_DIRECTORIES "${PROJECT_SOURCE_DIR}/collections")

if(ONE_ENTERPRISE)
list(APPEND SCHEMA_TEST_DIRECTORIES "${PROJECT_SOURCE_DIR}/enterprise/collections")
endif()

add_test(NAME one.schemas COMMAND
"$<TARGET_FILE:jsonschema_cli>" test --extension .test.json
"${PROJECT_SOURCE_DIR}/collections/sourcemeta")
${SCHEMA_TEST_DIRECTORIES})

add_subdirectory(test/js)

Expand Down
12 changes: 10 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ COPY contrib /source/contrib
COPY collections /source/collections
COPY vendor /source/vendor
COPY CMakeLists.txt /source/CMakeLists.txt
COPY enterprise /source/enterprise

# For testing
COPY test/cli /source/test/cli
Expand All @@ -23,6 +24,10 @@ COPY test/js /source/test/js

RUN cd /source && npm ci

# Commercial editions require a paid license
# See https://one.sourcemeta.com/commercial/
ARG SOURCEMETA_ONE_ENTERPRISE=OFF

ARG SOURCEMETA_ONE_BUILD_TYPE=Release
ARG SOURCEMETA_ONE_PARALLEL=2

Expand All @@ -32,6 +37,7 @@ RUN cmake -S /source -B ./build \
-DONE_INDEX:BOOL=ON \
-DONE_SERVER:BOOL=ON \
-DONE_TESTS:BOOL=ON \
-DONE_ENTERPRISE:BOOL=${SOURCEMETA_ONE_ENTERPRISE} \
-DBUILD_SHARED_LIBS:BOOL=OFF

RUN cmake --build /build \
Expand All @@ -58,14 +64,16 @@ RUN ctest --test-dir /build --build-config ${SOURCEMETA_ONE_BUILD_TYPE} \

FROM debian:bookworm-slim

ARG SOURCEMETA_ONE_LICENSE=LicenseRef-Commercial

# See https://github.com/opencontainers/image-spec/blob/main/annotations.md#pre-defined-annotation-keys
LABEL org.opencontainers.image.url="https://one.sourcemeta.com"
LABEL org.opencontainers.image.documentation="https://one.sourcemeta.com"
LABEL org.opencontainers.image.source="https://github.com/sourcemeta/one"
LABEL org.opencontainers.image.vendor="Sourcemeta"
LABEL org.opencontainers.image.licenses="BUSL-1.1 AND LicenseRef-Commercial"
LABEL org.opencontainers.image.licenses="${SOURCEMETA_ONE_LICENSE}"
LABEL org.opencontainers.image.title="Sourcemeta One"
LABEL org.opencontainers.image.description="The JSON Schema platform. Commercial license available at hello@sourcemeta.com"
LABEL org.opencontainers.image.description="The JSON Schema platform"
LABEL org.opencontainers.image.authors="Sourcemeta <hello@sourcemeta.com>"

COPY --from=builder /usr/bin/sourcemeta-one-index \
Expand Down
13 changes: 10 additions & 3 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,16 @@ Licensor: Sourcemeta OU

Licensed Work: Sourcemeta One

Additional Use Grant: You may make use of the Licensed Work, provided that you
may not use the Licensed Work for a hosting solution that competes with
Licensor.
Additional Use Grant: You may make use of the Licensed Work as if under the
terms of the AGPL-3.0, provided that you may not use the Licensed Work for a
hosting solution that competes with Licensor.

The `enterprise/` directory of the source repository contains code specific to
the Enterprise edition of Sourcemeta One. This code is not available under the
Business Source License and requires a separate Commercial License from
Sourcemeta. You may not use the Enterprise image, nor circumvent the build
configuration or the software in any way to access or use Enterprise edition
features without a valid Commercial License.

Change Date: Change date is four years from release date. Please see [GitHub
releases](https://github.com/sourcemeta/one/releases/) for exact dates
Expand Down
9 changes: 3 additions & 6 deletions LICENSE-COMMERCIAL
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,13 @@ non-transferable license to use, copy, modify, and distribute the Software,
including the Enterprise edition, without the restrictions of the BUSL-1.1 or
AGPL-3.0 licenses. This includes:

1. Unrestricted Production Use: Deploy the Software in production environments,
including hosting solutions that may compete with Sourcemeta

2. Proprietary Integration: Integrate the Software into proprietary products
1. Proprietary Integration: Integrate the Software into proprietary products
and services without open-source disclosure requirements.

3. Enterprise Edition: Access to the Enterprise edition of Sourcemeta One,
2. Enterprise Edition: Access to the Enterprise edition of Sourcemeta One,
which includes additional features not available in the open-source release.

4. Private Modifications: Create and maintain modifications to the Software
3. Private Modifications: Create and maintain modifications to the Software
without the obligation to disclose or open-source your changes.

PREMIUM SUPPORT:
Expand Down
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ SANDBOX_PORT ?= 8000
SANDBOX_URL ?= http://localhost:$(SANDBOX_PORT)
PUBLIC ?= ./public
PARALLEL ?= 4
# Only for local development
ENTERPRISE ?= ON

.PHONY: all
all: configure compile test
Expand All @@ -36,6 +38,7 @@ configure: node_modules
-DONE_TESTS:BOOL=ON \
-DONE_INDEX:BOOL=$(INDEX) \
-DONE_SERVER:BOOL=$(SERVER) \
-DONE_ENTERPRISE:BOOL=$(ENTERPRISE) \
-DONE_PREFIX:STRING=$(or $(realpath $(PREFIX)),$(abspath $(PREFIX))) \
-DBUILD_SHARED_LIBS:BOOL=OFF

Expand Down Expand Up @@ -66,7 +69,10 @@ HURL_TESTS += test/e2e/populated/schemas/*.hurl
HURL_TESTS += test/e2e/populated/api/*.hurl
endif
test-e2e:
$(HURL) --test --variable base=$(SANDBOX_URL) $(HURL_TESTS)
$(HURL) --test \
--variable base=$(SANDBOX_URL) \
--variable edition=$(if $(filter ON,$(ENTERPRISE)),Enterprise,Community) \
$(HURL_TESTS)

.PHONY: test-ui
test-ui: node_modules
Expand Down Expand Up @@ -97,7 +103,8 @@ sandbox-manifest-refresh: configure compile
docker: Dockerfile
$(DOCKER) build --tag one . --file $< --progress plain \
--build-arg SOURCEMETA_ONE_BUILD_TYPE=$(PRESET) \
--build-arg SOURCEMETA_ONE_PARALLEL=$(PARALLEL)
--build-arg SOURCEMETA_ONE_PARALLEL=$(PARALLEL) \
--build-arg SOURCEMETA_ONE_ENTERPRISE=$(ENTERPRISE)

.PHONY: docker-sandbox-build
docker-sandbox-build: test/sandbox/compose.yaml
Expand Down
17 changes: 7 additions & 10 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,13 @@ catalogs with enterprise-grade governance capabilities.

## :page_facing_up: License

While the project is publicly available on GitHub, it operates under a
[source-available
license](https://github.com/sourcemeta/one/blob/main/LICENSE) rather than
a traditional open-source model. Commercial use requires a [paid commercial
license](https://one.sourcemeta.com/commercial/). Reach out to
[hello@sourcemeta.com](mailto:hello@sourcemeta.com) to discuss.

> We are typically happy to provide free commercial licenses to open-source
> projects, non-profits, educational institutions, and research projects.
> [Reach out](mailto:hello@sourcemeta.com) if you think you qualify!
This project is dual-licensed. See
[LICENSE](https://github.com/sourcemeta/one/blob/main/LICENSE) for the
open-source offering and
[LICENSE-COMMERCIAL](https://github.com/sourcemeta/one/blob/main/LICENSE-COMMERCIAL)
for the enterprise offering. Reach out to
[hello@sourcemeta.com](mailto:hello@sourcemeta.com) to discuss commercial
licensing.

## :handshake: Contributing

Expand Down
5 changes: 4 additions & 1 deletion collections/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
set(ONE_COLLECTION_SOURCES)

include("./sourcemeta/std/v0/one.cmake")
if(ONE_ENTERPRISE)
include("../enterprise/collections/sourcemeta/std/v0/one.cmake")
endif()

include("./self/v1/one.cmake")

add_custom_target(sourcemeta_one_collections DEPENDS ${ONE_COLLECTION_SOURCES})
18 changes: 0 additions & 18 deletions collections/self/v1/tests/configuration/configuration.test.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,24 +130,6 @@
}
}
},
{
"description": "Self top-level entry",
"valid": false,
"data": {
"url": "http://localhost:8000",
"html": {
"name": "Title",
"description": "Description"
},
"contents": {
"self": {
"title": "A sample schema folder",
"description": "For testing purposes",
"github": "sourcemeta/one"
}
}
}
},
{
"description": "Self nested entry",
"valid": true,
Expand Down
Loading