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

For every canary image build, create an image tag with the commit sha #2202

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
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
2 changes: 2 additions & 0 deletions .buildkite/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ steps:
- export ELECTRIC_IMAGE_NAME="${DOCKERHUB_REPO}/${IMAGE_NAME}"
- cd ./packages/sync-service
- export ELECTRIC_VERSION=$(git describe --abbrev=7 --tags --always --first-parent --match '@core/sync-service@*' | sed -En 's|^@core/sync-service@||p')
- export SHORT_COMMIT_SHA=$(git rev-parse --short HEAD)
- docker buildx build --platform linux/arm64/v8,linux/amd64 --push
--build-arg ELECTRIC_VERSION=$${ELECTRIC_VERSION}
-t $${ELECTRIC_IMAGE_NAME}:canary
-t $${ELECTRIC_IMAGE_NAME}:canary-$${SHORT_COMMIT_SHA}
.
- wait
- label: "🚀 Build & publish the release image to Docker Hub"
Expand Down
5 changes: 4 additions & 1 deletion packages/sync-service/lib/electric/application.ex
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Electric.Application do
use Application

require Config
require Logger

@doc """
This callback starts the entire application, but is configured to run only when
Expand Down Expand Up @@ -82,6 +82,9 @@ defmodule Electric.Application do
prometheus_endpoint(Electric.Config.get_env(:prometheus_port))
])

app_vsn = Application.spec(:electric, :vsn)
Logger.info("Starting ElectricSQL #{app_vsn}")

Supervisor.start_link(children, strategy: :one_for_one, name: Electric.Supervisor)
end

Expand Down
Loading