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
13 changes: 13 additions & 0 deletions .ci/build_docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

CI_DIR=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
REPO_ROOT_DIR="${CI_DIR}/.."

source "$HOME"/.poetry/env

pushd "$REPO_ROOT_DIR" \
&& poetry run "$CI_DIR"/prepare_doc_bundle.sh \
&& popd \
&& exit 0

exit 1
1 change: 0 additions & 1 deletion .ci/build_artifacts.sh → .ci/build_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ pushd "$REPO_ROOT_DIR" \
&& poetry config http-basic.testpypi splitgraph "$PYPI_PASSWORD" \
&& poetry config http-basic.pypi splitgraph "$PYPI_PASSWORD" \
&& poetry build \
&& poetry run "$CI_DIR"/prepare_doc_bundle.sh \
&& popd \
&& exit 0

Expand Down
34 changes: 24 additions & 10 deletions .github/workflows/build_and_test_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,27 +80,41 @@ jobs:
run: |
source "$HOME"/.poetry/env
poetry run coveralls --service=github
- name: "Build doc / Asciicast bundle and push out Docker engine (tags only)"
if: "startsWith(github.ref, 'refs/tags/')"
- name: "Push out Docker engine (tags only)"
if: "startsWith(github.ref, 'refs/tags/') && !contains(github.event.head_commit.message, '[skip engine]')"
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: |
echo "Uploading engine image to Docker Hub"
./.ci/push_engine.sh
- name: "Build doc / Asciicast bundle"
if: "startsWith(github.ref, 'refs/tags/') && !contains(github.event.head_commit.message, '[skip docs]')"
env:
SG_DEMO_KEY: ${{ secrets.SG_DEMO_KEY }}
SG_DEMO_SECRET: ${{ secrets.SG_DEMO_SECRET }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
# We could split this out into a separate stage but it would mean installing Poetry, Compose and this package all over again.
run: |
echo "Building Asciicast/doc bundle"
export PATH=$PATH:$(readlink -f $DBT_VENV/bin)
./.ci/build_artifacts.sh
echo "Uploading engine image to Docker Hub"
./.ci/push_engine.sh
./.ci/build_docs.sh
cp ./install.sh dist
# TODO figure out if we want to do poetry upload here (can only do once, so will fail
# if we're retrying an upload)
# "$HOME"/.poetry/bin/poetry build
- name: "Build and publish wheel"
if: "startsWith(github.ref, 'refs/tags/') && !contains(github.event.head_commit.message, '[skip wheel]')"
env:
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
# We could split this out into a separate stage but it would mean installing Poetry, Compose and this package all over again.
run: |
./.ci/build_wheel.sh
cp ./install.sh dist
# TODO figure out if we want to do poetry upload here
# TODO figure out if we want to do poetry upload here (can only do once, so will fail
# if we're retrying an upload)
# "$HOME"/.poetry/bin/poetry build
# Currently upload is commented out since it's once-only and we love
# republishing v0.1.0 for now.
# "$HOME"/.poetry/bin/poetry publish -r testpypi
- name: "Upload release artifacts"
uses: actions/upload-artifact@v2
with:
Expand Down
4 changes: 1 addition & 3 deletions splitgraph/cloud/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -998,9 +998,7 @@ def start_load_params(
for tn, to in external.tables.items()
],
"sync": sync,
"initialVisibility": (
"RepositoryVisibility.PRIVATE" if initial_private else "RepositoryVisibility.PUBLIC"
),
"initialVisibility": ("PRIVATE" if initial_private else "PUBLIC"),
}

if credential_data:
Expand Down
6 changes: 1 addition & 5 deletions test/splitgraph/commandline/http_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -766,11 +766,7 @@ def _gql_callback(request, uri, response_headers):
],
"sync": True,
"credentialData": '{"username": "my_username", "password": "secret"}',
"initialVisibility": (
"RepositoryVisibility.PRIVATE"
if initial_private
else "RepositoryVisibility.PUBLIC"
),
"initialVisibility": ("PRIVATE" if initial_private else "PUBLIC"),
}
return [
200,
Expand Down