Skip to content

Commit

Permalink
✨ Use build args for the version string (#778) (#779)
Browse files Browse the repository at this point in the history
Signed-off-by: Dylan Murray <dymurray@redhat.com>
Signed-off-by: Cherry Picker <noreply@github.com>

Signed-off-by: Dylan Murray <dymurray@redhat.com>
Signed-off-by: Cherry Picker <noreply@github.com>
Co-authored-by: Dylan Murray <dymurray@redhat.com>
  • Loading branch information
konveyor-ci-bot[bot] and dymurray authored Feb 5, 2025
1 parent e667d76 commit 805008b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/march-image-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ jobs:
image_name: "tackle2-hub"
containerfile: "./Dockerfile"
architectures: '[ "amd64", "arm64" ]'
extra-args: |
--build-arg
VERSION=${{ github.tag}}-${{ github.ref }}
secrets:
registry_username: ${{ secrets.QUAY_PUBLISH_ROBOT }}
registry_password: ${{ secrets.QUAY_PUBLISH_TOKEN }}
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ FROM quay.io/konveyor/static-report as report

FROM registry.access.redhat.com/ubi9/ubi-minimal
ARG SEED_ROOT
ARG VERSION=latest
COPY --from=builder /opt/app-root/src/bin/hub /usr/local/bin/tackle-hub
COPY --from=builder /opt/app-root/src/bin/.build /etc/hub-build
COPY --from=builder /opt/app-root/src/auth/roles.yaml /tmp/roles.yaml
COPY --from=builder /opt/app-root/src/auth/users.yaml /tmp/users.yaml
COPY --from=builder ${SEED_ROOT}/resources/ /tmp/seed
COPY --from=report /usr/local/static-report /tmp/analysis/report

RUN echo "${VERSION}" > /etc/hub-build

RUN microdnf -y install \
sqlite \
&& microdnf -y clean all
Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ debug: generate fmt vet

docker: vet
go build $(BUILD)
git describe --always --match "v[0-9]*" --tags HEAD > bin/.build

# Run against the configured Kubernetes cluster in ~/.kube/config
run: fmt vet
Expand Down

0 comments on commit 805008b

Please sign in to comment.