Skip to content

Commit

Permalink
Add support for in-development versions (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
devinrsmith authored Nov 24, 2023
1 parent 4934df7 commit f9f3f2c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/branch-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,13 @@ jobs:
id: artifact_metadata
run: |
deephaven_version=$(< artifacts/build/version)
deephaven_core_wheel=$(find artifacts/py/server/build/wheel -type f -name "*.whl" | xargs -n 1 basename)
echo "deephaven_version=${deephaven_version}" >> $GITHUB_OUTPUT
echo "deephaven_core_wheel=${deephaven_core_wheel}" >> $GITHUB_OUTPUT
- name: Prepare artifacts
run: |
cp artifacts/py/server/build/wheel/deephaven_core-${{ steps.artifact_metadata.outputs.deephaven_version }}-py3-none-any.whl contexts/server/
cp artifacts/py/server/build/wheel/${{ steps.artifact_metadata.outputs.deephaven_core_wheel }} contexts/server/
cp artifacts/server/jetty-app/build/distributions/server-jetty-${{ steps.artifact_metadata.outputs.deephaven_version }}.tar contexts/server/
cp artifacts/server/jetty-app/build/distributions/server-jetty-${{ steps.artifact_metadata.outputs.deephaven_version }}.tar contexts/server-slim/
Expand All @@ -105,6 +107,7 @@ jobs:
env:
DEEPHAVEN_SOURCES: custom
DEEPHAVEN_VERSION: ${{ steps.artifact_metadata.outputs.deephaven_version }}
DEEPHAVEN_CORE_WHEEL: ${{ steps.artifact_metadata.outputs.deephaven_core_wheel }}
MULTI_ARCH: true
RELEASE: true
REPO_PREFIX: ghcr.io/${{ github.repository_owner }}/
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/edge-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,13 @@ jobs:
id: artifact_metadata
run: |
deephaven_version=$(< artifacts/build/version)
deephaven_core_wheel=$(find artifacts/py/server/build/wheel -type f -name "*.whl" | xargs -n 1 basename)
echo "deephaven_version=${deephaven_version}" >> $GITHUB_OUTPUT
echo "deephaven_core_wheel=${deephaven_core_wheel}" >> $GITHUB_OUTPUT
- name: Prepare artifacts
run: |
cp artifacts/py/server/build/wheel/deephaven_core-${{ steps.artifact_metadata.outputs.deephaven_version }}-py3-none-any.whl contexts/server/
cp artifacts/py/server/build/wheel/${{ steps.artifact_metadata.outputs.deephaven_core_wheel }} contexts/server/
cp artifacts/server/jetty-app/build/distributions/server-jetty-${{ steps.artifact_metadata.outputs.deephaven_version }}.tar contexts/server/
cp artifacts/server/jetty-app/build/distributions/server-jetty-${{ steps.artifact_metadata.outputs.deephaven_version }}.tar contexts/server-slim/
Expand All @@ -104,6 +106,7 @@ jobs:
env:
DEEPHAVEN_SOURCES: custom
DEEPHAVEN_VERSION: ${{ steps.artifact_metadata.outputs.deephaven_version }}
DEEPHAVEN_CORE_WHEEL: ${{ steps.artifact_metadata.outputs.deephaven_core_wheel }}
MULTI_ARCH: true
RELEASE: ${{ github.event_name != 'pull_request' }}
REPO_PREFIX: ghcr.io/${{ github.repository_owner }}/
Expand Down
6 changes: 3 additions & 3 deletions contexts/server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -114,16 +114,16 @@ LABEL \
FROM libpython-bits as venv-bits-custom
ARG PYTHON_VERSION
ARG REQUIREMENTS_TYPE
ARG DEEPHAVEN_VERSION
ARG DEEPHAVEN_CORE_WHEEL
RUN \
--mount=type=bind,source=deephaven_core-${DEEPHAVEN_VERSION}-py3-none-any.whl,target=deephaven_core-${DEEPHAVEN_VERSION}-py3-none-any.whl \
--mount=type=bind,source=${DEEPHAVEN_CORE_WHEEL},target=${DEEPHAVEN_CORE_WHEEL} \
--mount=type=bind,source=type/${REQUIREMENTS_TYPE}/requirements.txt,target=requirements.txt \
--mount=type=cache,target=/root/.cache/pip,sharing=locked \
set -eux; \
mkdir -p /opt/deephaven; \
python${PYTHON_VERSION} -m venv /opt/deephaven/venv; \
/opt/deephaven/venv/bin/pip install --upgrade pip setuptools; \
/opt/deephaven/venv/bin/pip install --only-binary=:all: "deephaven_core-${DEEPHAVEN_VERSION}-py3-none-any.whl[autocomplete]" -r requirements.txt
/opt/deephaven/venv/bin/pip install --only-binary=:all: "${DEEPHAVEN_CORE_WHEEL}[autocomplete]" -r requirements.txt
ENV \
VIRTUAL_ENV="/opt/deephaven/venv" \
PATH="/opt/deephaven/venv/bin:${PATH}"
Expand Down
5 changes: 5 additions & 0 deletions server.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ variable "DEEPHAVEN_VERSION" {
default = "0.30.1"
}

variable "DEEPHAVEN_CORE_WHEEL" {
default = ""
}

variable "OPENJDK_VERSION" {
default = "21"
}
Expand Down Expand Up @@ -153,6 +157,7 @@ target "server-context" {
context = "contexts/server/"
args = {
DEEPHAVEN_VERSION = DEEPHAVEN_VERSION
DEEPHAVEN_CORE_WHEEL = DEEPHAVEN_CORE_WHEEL
OPENJDK_VERSION = OPENJDK_VERSION
PYTHON_VERSION = PYTHON_VERSION
UBUNTU_VERSION = UBUNTU_VERSION
Expand Down

0 comments on commit f9f3f2c

Please sign in to comment.