Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commit Hash in Docker Image #115

Merged
merged 39 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
cca8a91
Adde COMMIT_HASH
stanbrub Aug 9, 2024
983e9e1
Add COMMIT_HASH to Dockerfile
stanbrub Aug 9, 2024
61edec8
Update server.hcl
stanbrub Aug 9, 2024
be65938
Use github.sha variable instead of env
stanbrub Aug 9, 2024
168d6e1
Update server.hcl
stanbrub Aug 9, 2024
954cff0
Update branch-ci.yml
stanbrub Aug 9, 2024
94d2044
Update branch-ci.yml
stanbrub Aug 10, 2024
20015d5
Update Dockerfile
stanbrub Aug 10, 2024
8dddb88
Moved commit hash to LABEL
stanbrub Aug 12, 2024
666de36
Update Dockerfile
stanbrub Aug 12, 2024
ecd6556
Update Dockerfile
stanbrub Aug 12, 2024
54373e7
Update Dockerfile
stanbrub Aug 13, 2024
b07a557
Update edge-ci.yml similar to branch-ci.yml changes
stanbrub Aug 13, 2024
bc57420
Update Dockerfile
stanbrub Aug 13, 2024
ad5aecb
Update server-slim.hcl
stanbrub Aug 13, 2024
557dcb1
Change COMMIT-HASH to GIT_REVISION
stanbrub Aug 13, 2024
3c349a8
Update edge-ci.yml
stanbrub Aug 13, 2024
9f2c830
Update server.hcl
stanbrub Aug 13, 2024
a960790
Update server-slim.hcl
stanbrub Aug 13, 2024
b6dfb3b
Update Dockerfile
stanbrub Aug 13, 2024
991330a
Update Dockerfile
stanbrub Aug 13, 2024
2dc7223
Merge branch 'deephaven:main' into commit-hash-in-image
stanbrub Aug 15, 2024
4ee94c8
Update server.hcl
stanbrub Aug 15, 2024
4bb0e40
Merge branch 'deephaven:main' into commit-hash-in-image
stanbrub Aug 19, 2024
f141dae
Moved git revision LABEL
stanbrub Aug 19, 2024
0363a89
Update server.hcl
stanbrub Aug 19, 2024
b008295
Update Dockerfile
stanbrub Aug 19, 2024
45b4254
Update server-slim.hcl
stanbrub Aug 19, 2024
62cfb98
Update server.hcl
stanbrub Aug 19, 2024
a8d3906
Update Dockerfile
stanbrub Aug 19, 2024
8a660e0
Update Dockerfile
stanbrub Aug 19, 2024
4d0f60c
Update branch-ci.yml
stanbrub Aug 19, 2024
dfc9501
Update edge-ci.yml
stanbrub Aug 19, 2024
1a653d0
Update Dockerfile
stanbrub Aug 19, 2024
cbaec7b
Update Dockerfile
stanbrub Aug 19, 2024
ce5b2a3
Update Dockerfile
stanbrub Aug 19, 2024
d69dc37
Update Dockerfile
stanbrub Aug 19, 2024
89f3454
Test empty git revision
stanbrub Aug 19, 2024
31b069f
Update branch-ci.yml
stanbrub Aug 19, 2024
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
7 changes: 7 additions & 0 deletions .github/workflows/branch-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,19 @@ concurrency: release
jobs:
assemble-deephaven-core:
runs-on: ubuntu-24.04
outputs:
git-revision: ${{ steps.get-git-revision.outputs.GIT_REVISION }}
steps:
- name: Checkout deephaven-core
uses: actions/checkout@v4
with:
repository: deephaven/deephaven-core
ref: ${{ github.event.inputs.deephaven_core_ref }}

- name: Get GIT Revision
id: get-git-revision
run: echo "GIT_REVISION="$(git rev-parse HEAD) >> $GITHUB_OUTPUT

- name: Setup JDK 11
id: setup-java-11
uses: actions/setup-java@v4
Expand Down Expand Up @@ -106,6 +112,7 @@ jobs:
env:
DEEPHAVEN_SOURCES: custom
DEEPHAVEN_VERSION: ${{ steps.artifact_metadata.outputs.deephaven_version }}
GIT_REVISION: ${{ needs.assemble-deephaven-core.outputs.git-revision }}
DEEPHAVEN_CORE_WHEEL: ${{ steps.artifact_metadata.outputs.deephaven_core_wheel }}
MULTI_ARCH: true
RELEASE: true
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/edge-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,18 @@ jobs:
if: ${{ github.repository_owner == 'deephaven' || github.event_name != 'schedule' }}

runs-on: ubuntu-24.04
outputs:
git-revision: ${{ steps.get-git-revision.outputs.GIT_REVISION }}
steps:
- name: Checkout deephaven-core
uses: actions/checkout@v4
with:
repository: deephaven/deephaven-core

- name: Get GIT Revision
id: get-git-revision
run: echo "GIT_REVISION="$(git rev-parse HEAD) >> $GITHUB_OUTPUT

- name: Setup JDK 11
id: setup-java-11
uses: actions/setup-java@v4
Expand All @@ -33,7 +39,7 @@ jobs:

- name: Set JAVA_HOME
run: echo "JAVA_HOME=${{ steps.setup-java-11.outputs.path }}" >> $GITHUB_ENV

- name: Setup gradle properties
run: |
.github/scripts/gradle-properties.sh >> gradle.properties
Expand Down Expand Up @@ -105,6 +111,7 @@ jobs:
env:
DEEPHAVEN_SOURCES: custom
DEEPHAVEN_VERSION: ${{ steps.artifact_metadata.outputs.deephaven_version }}
GIT_REVISION: ${{ needs.assemble-deephaven-core.outputs.git-revision }}
DEEPHAVEN_CORE_WHEEL: ${{ steps.artifact_metadata.outputs.deephaven_core_wheel }}
MULTI_ARCH: true
RELEASE: ${{ github.event_name != 'pull_request' }}
Expand Down
16 changes: 15 additions & 1 deletion contexts/server-slim/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,28 @@ LABEL \

# -------------------------------------

FROM openjdk-bits as deephaven-bits
FROM openjdk-bits as deephaven-bits-released
ARG DEEPHAVEN_VERSION
COPY --link --from=deephaven /opt/deephaven /opt/deephaven
LABEL \
io.deephaven.server.version="${DEEPHAVEN_VERSION}"

# -------------------------------------

FROM openjdk-bits as deephaven-bits-custom
ARG DEEPHAVEN_VERSION
ARG GIT_REVISION
COPY --link --from=deephaven /opt/deephaven /opt/deephaven
LABEL \
io.deephaven.server.version="${DEEPHAVEN_VERSION}" \
org.opencontainers.image.revision="${GIT_REVISION}"

# -------------------------------------

FROM deephaven-bits-${DEEPHAVEN_SOURCES} as deephaven-bits

# -------------------------------------

FROM deephaven-bits as grpc-health-probe-bits
ARG GRPC_HEALTH_PROBE_VERSION
ADD --link --chmod=755 \
Expand Down
16 changes: 15 additions & 1 deletion contexts/server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,28 @@ LABEL \

# -------------------------------------

FROM openjdk-bits as deephaven-bits
FROM openjdk-bits as deephaven-bits-released
ARG DEEPHAVEN_VERSION
COPY --link --from=deephaven /opt/deephaven /opt/deephaven
LABEL \
io.deephaven.server.version="${DEEPHAVEN_VERSION}"

# -------------------------------------

FROM openjdk-bits as deephaven-bits-custom
ARG DEEPHAVEN_VERSION
ARG GIT_REVISION
COPY --link --from=deephaven /opt/deephaven /opt/deephaven
LABEL \
io.deephaven.server.version="${DEEPHAVEN_VERSION}" \
org.opencontainers.image.revision="${GIT_REVISION}"

# -------------------------------------

FROM deephaven-bits-${DEEPHAVEN_SOURCES} as deephaven-bits

# -------------------------------------

FROM deephaven-bits as grpc-health-probe-bits
ARG GRPC_HEALTH_PROBE_VERSION
ADD --link --chmod=755 \
Expand Down
5 changes: 5 additions & 0 deletions server-slim.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ variable "DEEPHAVEN_VERSION" {
default = "0.36.0"
}

variable "GIT_REVISION" {
default = ""
}

variable "OPENJDK_VERSION" {
default = "21"
}
Expand Down Expand Up @@ -73,6 +77,7 @@ target "server-slim" {
]
args = {
DEEPHAVEN_VERSION = DEEPHAVEN_VERSION
GIT_REVISION = GIT_REVISION
OPENJDK_VERSION = OPENJDK_VERSION
UBUNTU_VERSION = UBUNTU_VERSION
GRPC_HEALTH_PROBE_VERSION = GRPC_HEALTH_PROBE_VERSION
Expand Down
5 changes: 5 additions & 0 deletions server.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ variable "DEEPHAVEN_VERSION" {
default = "0.36.0"
}

variable "GIT_REVISION" {
default = ""
}

variable "DEEPHAVEN_CORE_WHEEL" {
default = ""
}
Expand Down Expand Up @@ -169,6 +173,7 @@ target "server-context" {
context = "contexts/server/"
args = {
DEEPHAVEN_VERSION = DEEPHAVEN_VERSION
GIT_REVISION = GIT_REVISION
DEEPHAVEN_CORE_WHEEL = DEEPHAVEN_CORE_WHEEL
OPENJDK_VERSION = OPENJDK_VERSION
PYTHON_VERSION = PYTHON_VERSION
Expand Down