diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 8dde6e41..00000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Publish - -on: - push: - branches: - - main - - publish-test - -jobs: - publish: - name: "Build and publish" - runs-on: ubuntu-latest - steps: - - name: "Clone project repository" - uses: actions/checkout@v3 - - name: "Get build info" - id: build-info - run: | - build_tag=$(./scripts/create_build_tag_file.sh) - echo "build-tag=v${build_tag}" >> $GITHUB_OUTPUT - - name: "Install Python" - uses: actions/setup-python@v4 - with: - python-version: '3.8' - - name: "Print Python version" - run: python3 --version - - name: "Install shiv" - run: pip install shiv - - name: "Build local shiv package" - id: build - run: | - ./scripts/build_shiv_package.sh - result_code=$? - echo "package-file=$(ls ./package/*)" >> $GITHUB_OUTPUT - exit $result_code - - name: "Stage artifact file" - run: | - cp ${{ steps.build.outputs.package-file }} ./laconic-so - - name: "Create release" - uses: softprops/action-gh-release@v1 - with: - tag_name: ${{ steps.build-info.outputs.build-tag }} - # On the publish test branch, mark our release as a draft - # Hack using endsWith to workaround Gitea sometimes sending "publish-test" vs "refs/heads/publish-test" - draft: ${{ endsWith('publish-test', github.ref ) }} - files: ./laconic-so diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index c6284900..00000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Test - -on: - pull_request: - branches: '*' - push: - branches: '*' - -jobs: - test: - name: "Run basic test suite" - runs-on: ubuntu-latest - steps: - - name: "Clone project repository" - uses: actions/checkout@v3 - - name: "Install Python" - uses: actions/setup-python@v4 - with: - python-version: '3.8' - - name: "Print Python version" - run: python3 --version - - name: "Install shiv" - run: pip install shiv - - name: "Generate build version file" - run: ./scripts/create_build_tag_file.sh - - name: "Build local shiv package" - run: ./scripts/build_shiv_package.sh - - name: "Run smoke tests" - run: ./tests/smoke-test/run-smoke-test.sh diff --git a/app/build_containers.py b/app/build_containers.py index 3a47a6da..ea16c3c9 100644 --- a/app/build_containers.py +++ b/app/build_containers.py @@ -84,7 +84,7 @@ def command(ctx, include, exclude, force_rebuild, extra_build_args): # TODO: make this configurable container_build_env = { - "CERC_NPM_URL": "http://gitea.local:3000/api/packages/cerc-io/npm/", + "CERC_NPM_REGISTRY_URL": config("CERC_NPM_REGISTRY_URL", default="http://gitea.local:3000/api/packages/cerc-io/npm/"), "CERC_NPM_AUTH_TOKEN": config("CERC_NPM_AUTH_TOKEN", default=""), "CERC_REPO_BASE_DIR": dev_root_path, "CERC_CONTAINER_BASE_DIR": container_build_dir, diff --git a/app/data/container-build/cerc-laconic-console-host/Dockerfile b/app/data/container-build/cerc-laconic-console-host/Dockerfile index 51a86560..a31aa265 100644 --- a/app/data/container-build/cerc-laconic-console-host/Dockerfile +++ b/app/data/container-build/cerc-laconic-console-host/Dockerfile @@ -7,7 +7,7 @@ ARG USERNAME=node ARG NPM_GLOBAL=/usr/local/share/npm-global # This container pulls npm packages from a local registry configured via these env vars -ARG CERC_NPM_URL +ARG CERC_NPM_REGISTRY_URL ARG CERC_NPM_AUTH_TOKEN # Add NPM global to PATH. @@ -49,9 +49,9 @@ COPY ./start-serving-app.sh /scripts # RUN su node -c "npm install -g " # Configure the local npm registry -RUN npm config set @cerc-io:registry ${CERC_NPM_URL} \ - && npm config set @lirewine:registry ${CERC_NPM_URL} \ - && npm config set -- ${CERC_NPM_URL}:_authToken ${CERC_NPM_AUTH_TOKEN} +RUN npm config set @cerc-io:registry ${CERC_NPM_REGISTRY_URL} \ + && npm config set @lirewine:registry ${CERC_NPM_REGISTRY_URL} \ + && npm config set -- ${CERC_NPM_REGISTRY_URL}:_authToken ${CERC_NPM_AUTH_TOKEN} RUN mkdir -p /config COPY ./config.yml /config diff --git a/app/data/container-build/cerc-laconic-console-host/build.sh b/app/data/container-build/cerc-laconic-console-host/build.sh index a321b195..77a38917 100755 --- a/app/data/container-build/cerc-laconic-console-host/build.sh +++ b/app/data/container-build/cerc-laconic-console-host/build.sh @@ -8,4 +8,4 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) docker build -t cerc/laconic-console-host:local ${build_command_args} -f ${SCRIPT_DIR}/Dockerfile \ --add-host gitea.local:host-gateway \ - --build-arg CERC_NPM_AUTH_TOKEN --build-arg CERC_NPM_URL ${SCRIPT_DIR} + --build-arg CERC_NPM_AUTH_TOKEN --build-arg CERC_NPM_REGISTRY_URL ${SCRIPT_DIR} diff --git a/app/data/container-build/cerc-laconic-registry-cli/Dockerfile b/app/data/container-build/cerc-laconic-registry-cli/Dockerfile index da7ff19a..7859adb4 100644 --- a/app/data/container-build/cerc-laconic-registry-cli/Dockerfile +++ b/app/data/container-build/cerc-laconic-registry-cli/Dockerfile @@ -7,7 +7,7 @@ ARG USERNAME=node ARG NPM_GLOBAL=/usr/local/share/npm-global # This container pulls npm packages from a local registry configured via these env vars -ARG CERC_NPM_URL +ARG CERC_NPM_REGISTRY_URL ARG CERC_NPM_AUTH_TOKEN # Add NPM global to PATH. @@ -42,9 +42,9 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ # RUN su node -c "npm install -g " # Configure the local npm registry -RUN npm config set @cerc-io:registry ${CERC_NPM_URL} \ - && npm config set @lirewine:registry ${CERC_NPM_URL} \ - && npm config set -- ${CERC_NPM_URL}:_authToken ${CERC_NPM_AUTH_TOKEN} +RUN npm config set @cerc-io:registry ${CERC_NPM_REGISTRY_URL} \ + && npm config set @lirewine:registry ${CERC_NPM_REGISTRY_URL} \ + && npm config set -- ${CERC_NPM_REGISTRY_URL}:_authToken ${CERC_NPM_AUTH_TOKEN} # TODO: the image at this point could be made a base image for several different CLI images # that install different Node-based CLI commands diff --git a/app/data/container-build/cerc-laconic-registry-cli/build.sh b/app/data/container-build/cerc-laconic-registry-cli/build.sh index a6264f4b..c9379856 100755 --- a/app/data/container-build/cerc-laconic-registry-cli/build.sh +++ b/app/data/container-build/cerc-laconic-registry-cli/build.sh @@ -8,4 +8,4 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) docker build -t cerc/laconic-registry-cli:local ${build_command_args} -f ${SCRIPT_DIR}/Dockerfile \ --add-host gitea.local:host-gateway \ - --build-arg CERC_NPM_AUTH_TOKEN --build-arg CERC_NPM_URL ${SCRIPT_DIR} + --build-arg CERC_NPM_AUTH_TOKEN --build-arg CERC_NPM_REGISTRY_URL ${SCRIPT_DIR} diff --git a/app/data/stacks/fixturenet-laconic-loaded/README.md b/app/data/stacks/fixturenet-laconic-loaded/README.md index 2fc21594..a2e48efb 100644 --- a/app/data/stacks/fixturenet-laconic-loaded/README.md +++ b/app/data/stacks/fixturenet-laconic-loaded/README.md @@ -19,7 +19,6 @@ Detailed instructions can be found [here](../build-support/README.md). For the i ``` $ laconic-so --stack build-support build-containers --exclude cerc/builder-gerbil $ laconic-so --stack package-registry setup-repositories -$ laconic-so --stack package-registry build-containers $ laconic-so --stack package-registry deploy-system up ``` Then add the localhost alias `gitea.local` and set `CERC_NPM_AUTH_TOKEN` to the token printed when the package-registry stack was deployed above: @@ -63,4 +62,4 @@ Balance is: 99998999999999998999600000 Created bond with id: dd88e8d6f9567b32b28e70552aea4419c5dd3307ebae85a284d1fe38904e301a Published demo-record-1.yml with id: bafyreierh3xnfivexlscdwubvczmddsnf46uytyfvrbdhkjzztvsz6ruly ``` -The published record should be visible in the console. +The published record should be visible in the console. \ No newline at end of file diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 633fc30f..93437364 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -34,9 +34,7 @@ In addition to the pre-requisites listed in the [README](/README.md), the follow $ cd stack-orchestrator ``` -3. (This and the next step can be done by running `source ./scripts/developer-mode-setup.sh`) - - Create and activate a venv: +3. Create and activate a venv: ``` $ python3 -m venv venv $ source ./venv/bin/activate