Skip to content
Open
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
8 changes: 4 additions & 4 deletions docker/serverDockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ FROM base AS download-binary
ARG DOLT_VERSION
RUN if [ "$DOLT_VERSION" = "latest" ]; then \
# Fetch latest version number from GitHub API
DOLT_VERSION=$(curl -s https://api.github.com/repos/dolthub/dolt/releases/latest \
| grep '"tag_name"' \
| cut -d'"' -f4 \
| sed 's/^v//'); \
DOLT_VERSION=$(curl -sI https://github.com/dolthub/dolt/releases/latest \
| grep -i location \
| sed 's|.*/v||' \
| tr -d '[:space:]'); \
fi && \
if [ "$DOLT_VERSION" != "source" ]; then \
curl -L "https://github.com/dolthub/dolt/releases/download/v${DOLT_VERSION}/install.sh" | bash; \
Expand Down
4 changes: 1 addition & 3 deletions integration-tests/bats/docker-entrypoint.bats
Original file line number Diff line number Diff line change
Expand Up @@ -925,13 +925,11 @@ EOF

# bats test_tags=no_lambda
@test "docker-entrypoint: latest binary build from dolt directory" {
skip "this is way too flaky in CI and needs investigation into why/ how to stabilize"

BATS_TEST_RETRIES=5 # GitHub ver. retrieval can sometimes return Not Found on CI, could be some form of rate limiting
cname="${TEST_PREFIX}latest-docker"

LATEST_IMAGE="dolt-entrypoint-latest:test"
EXPECTED_VERSION=$(curl -s https://api.github.com/repos/dolthub/dolt/releases/latest | grep '"tag_name"' | cut -d'"' -f4 | sed 's/^v//')
EXPECTED_VERSION=$(curl -sI https://github.com/dolthub/dolt/releases/latest | grep -i location | sed 's|.*/v||' | tr -d '[:space:]')
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've spoken with @coffeegoddd and the main issue with this is we're relying on an external call to github. Our best bet would be to check if the docker code contains this line itself. This also goes for the test below.

cd "$WORKSPACE_ROOT/dolt"
docker build --no-cache -f docker/serverDockerfile --build-arg DOLT_VERSION=latest -t "$LATEST_IMAGE" .

Expand Down
Loading