Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.
Merged
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
10 changes: 10 additions & 0 deletions build/package/goreleaser/Dockerfile.core
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM alpine AS builder

RUN apk add --no-cache ca-certificates

FROM scratch

COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY rig-operator /usr/local/bin/

CMD ["rig-operator"]
57 changes: 57 additions & 0 deletions build/package/goreleaser/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,22 @@ builds:
- -X github.com/rigdev/rig/internal/build.version={{ .Version }}
- -X github.com/rigdev/rig/internal/build.commit={{ .Commit }}
- -X github.com/rigdev/rig/internal/build.date={{ .Date }}
- id: rig-operator
binary: rig-operator
main: ./cmd/rig-operator
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- amd64
- arm64
ldflags:
- -s -w
- -X github.com/rigdev/rig/internal/build.version={{ .Version }}
- -X github.com/rigdev/rig/internal/build.commit={{ .Commit }}
- -X github.com/rigdev/rig/internal/build.date={{ .Date }}

archives:
- id: rig-server
Expand All @@ -90,6 +106,15 @@ archives:
format_overrides:
- goos: windows
format: zip
- id: rig-operator
format: tar.gz
builds:
- rig-operator
name_template: >-
rig-operator_
{{- .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else }}{{ .Arch }}{{ end }}

checksum:
name_template: 'checksums.txt'
Expand All @@ -110,6 +135,21 @@ dockers:
build_flag_templates:
- "--platform=linux/arm64"

- image_templates:
- "ghcr.io/rigdev/rig-core:{{ .Version }}-amd64"
goarch: amd64
dockerfile: build/package/goreleaser/Dockerfile.core
use: buildx
build_flag_templates:
- "--platform=linux/amd64"
- image_templates:
- "ghcr.io/rigdev/rig-core:{{ .Version }}-arm64"
goarch: arm64
dockerfile: build/package/goreleaser/Dockerfile.core
use: buildx
build_flag_templates:
- "--platform=linux/arm64"

docker_manifests:
- name_template: "ghcr.io/rigdev/rig:latest"
image_templates:
Expand All @@ -128,6 +168,23 @@ docker_manifests:
- "ghcr.io/rigdev/rig:{{ .Version }}-amd64"
- "ghcr.io/rigdev/rig:{{ .Version }}-arm64"

- name_template: "ghcr.io/rigdev/rig-core:latest"
image_templates:
- "ghcr.io/rigdev/rig-core:{{ .Version }}-amd64"
- "ghcr.io/rigdev/rig-core:{{ .Version }}-arm64"
- name_template: "ghcr.io/rigdev/rig-core:{{ .Major }}"
image_templates:
- "ghcr.io/rigdev/rig-core:{{ .Version }}-amd64"
- "ghcr.io/rigdev/rig-core:{{ .Version }}-arm64"
- name_template: "ghcr.io/rigdev/rig-core:{{ .Major }}.{{ .Minor }}"
image_templates:
- "ghcr.io/rigdev/rig-core:{{ .Version }}-amd64"
- "ghcr.io/rigdev/rig-core:{{ .Version }}-arm64"
- name_template: "ghcr.io/rigdev/rig-core:{{ .Version }}"
image_templates:
- "ghcr.io/rigdev/rig-core:{{ .Version }}-amd64"
- "ghcr.io/rigdev/rig-core:{{ .Version }}-arm64"

changelog:
sort: asc
filters:
Expand Down
3 changes: 3 additions & 0 deletions cmd/rig-operator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"context"

"github.com/rigdev/rig/internal/build"
"github.com/rigdev/rig/pkg/config"
"github.com/rigdev/rig/pkg/manager"
"github.com/spf13/cobra"
Expand All @@ -24,6 +25,8 @@ func main() {
flags := c.PersistentFlags()
flags.StringP(flagConfigFile, "c", "/etc/rig-operator/config.yaml", "path to rig-operator config file")

c.AddCommand(build.VersionCommand())

ctx := context.Background()
c.ExecuteContext(ctx)
}
Expand Down