Skip to content

Commit

Permalink
tag versions in the right way
Browse files Browse the repository at this point in the history
  • Loading branch information
lukemarsden committed Oct 14, 2024
1 parent cbab11f commit f26af9a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
9 changes: 7 additions & 2 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ services:
- name: tika
image: apache/tika:2.9.2.1
- name: chrome
image: ghcr.io/go-rod/rod:v0.115.0
image: ghcr.io/go-rod/rod:v0.115.0

---
kind: pipeline
Expand All @@ -121,7 +121,7 @@ steps:
password:
from_secret: helix_registry_password
build_args:
- APP_VERSION=${DRONE_TAG:-${DRONE_COMMIT_SHA:-latest}} # Required for sentry
- APP_VERSION=${DRONE_TAG:-${DRONE_COMMIT_SHA:-latest}}
volumes:
- name: dockersocket
path: /var/run/docker.sock
Expand Down Expand Up @@ -160,6 +160,7 @@ steps:
# See https://github.com/helixml/base-images
# and https://github.com/helixml/base-images/releases
- TAG=2024-10-13a-empty
- APP_VERSION=${DRONE_TAG:-${DRONE_COMMIT_SHA:-latest}}
username: admin
password:
from_secret: helix_registry_password
Expand Down Expand Up @@ -201,6 +202,7 @@ steps:
# See https://github.com/helixml/base-images
# and https://github.com/helixml/base-images/releases
- TAG=2024-10-13a-small
- APP_VERSION=${DRONE_TAG:-${DRONE_COMMIT_SHA:-latest}}
username: admin
password:
from_secret: helix_registry_password
Expand Down Expand Up @@ -228,6 +230,7 @@ steps:
# See https://github.com/helixml/base-images
# and https://github.com/helixml/base-images/releases
- TAG=2024-10-13a-small
- APP_VERSION=${DRONE_TAG:-${DRONE_COMMIT_SHA:-latest}}
username: admin
password:
from_secret: helix_registry_password
Expand Down Expand Up @@ -272,6 +275,7 @@ steps:
# See https://github.com/helixml/base-images
# and https://github.com/helixml/base-images/releases
- TAG=2024-10-13a-large
- APP_VERSION=${DRONE_TAG:-${DRONE_COMMIT_SHA:-latest}}
username: admin
password:
from_secret: helix_registry_password
Expand Down Expand Up @@ -299,6 +303,7 @@ steps:
# See https://github.com/helixml/base-images
# and https://github.com/helixml/base-images/releases
- TAG=2024-10-13a-large
- APP_VERSION=${DRONE_TAG:-${DRONE_COMMIT_SHA:-latest}}
username: admin
password:
from_secret: helix_registry_password
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ COPY api /app/api
WORKDIR /app/api
# - main.version is a variable required by Sentry and is set in .drone.yaml
ARG APP_VERSION="v0.0.0+unknown"
RUN CGO_ENABLED=0 go build -buildvcs=true -ldflags "-s -w -X main.version=$APP_VERSION" -o /helix
RUN --mount=type=cache,target=/root/.cache/go-build CGO_ENABLED=0 go build -buildvcs=true -ldflags "-s -w -X main.version=$APP_VERSION -X github.com/helixml/helix/api/pkg/data.Version=$APP_VERSION" -o /helix

### Frontend Base ###
#--------------------
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile.runner
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ COPY . .

# Build the Go app
# RUN go mod tidy && go mod download && CGO_ENABLED=0 go build -ldflags "-s -w" -o /helix
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg/mod CGO_ENABLED=0 go build -ldflags "-s -w" -o /helix
ARG APP_VERSION="v0.0.0+unknown"
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg/mod CGO_ENABLED=0 -X github.com/helixml/helix/api/pkg/data.Version=$APP_VERSION go build -ldflags "-s -w" -o /helix


### RUNNER CONTAINER
Expand Down

0 comments on commit f26af9a

Please sign in to comment.