Skip to content

Commit

Permalink
feat: add .goreleaser.yaml
Browse files Browse the repository at this point in the history
Signed-off-by: Georgy Khromov <[email protected]>
  • Loading branch information
ggkhrmv committed Jun 20, 2024
1 parent 12aafb5 commit 8cf0419
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 38 deletions.
91 changes: 91 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
project_name: argocd-rbac-operator

builds:
- id: rbac-operator
main: ./cmd
binary: rbac-operator
env:
- CGO_ENABLED=0
flags:
- -v
ldflags:
- -X github.com/argoproj-labs/argocd-rbac-operator/version.Version={{ .Version }}
- -extldflags="-static"
goos:
- linux
goarch:
- amd64
ignore:
- goos: darwin
goarch: s390x
- goos: darwin
goarch: ppc64le
- goos: windows
goarch: s390x
- goos: windows
goarch: ppc64le
- goos: windows
goarch: arm64

dockers:
- image_templates:
- quay.io/argoprojlabs/argocd-rbac-operator:{{.Version}}
- quay.io/argoprojlabs/argocd-rbac-operator:latest
dockerfile: release.Dockerfile
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--platform=linux/amd64"


archives:
- format: tar.gz
id: binary
builds:
- rbac-operator

release:
prerelease: auto
draft: false
header: |
## argocd-rbac-operator
{{ .Date }}
### Docker images
- quay.io/argoprojlabs/argocd-rbac-operator:{{ .Tag }}
- quay.io/argoprojlabs/argocd-rbac-operator:latest
footer: |
**Full Changelog**: https://github.com/argoproj-labs/argocd-rbac-operator/compare/{{ .PreviousTag }}...{{ .Tag }}
<a href="https://argoproj.github.io/cd/"><img src="https://raw.githubusercontent.com/argoproj/argo-site/c42c87e68cea647eadc1564e9e264621442aa8cf/src/images/icon.png" width="25%" ></a>
changelog:
use:
github
sort: asc
abbrev: 0
groups: # Regex use RE2 syntax as defined here: https://github.com/google/re2/wiki/Syntax.
- title: 'Features'
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
order: 100
- title: 'Bug fixes'
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
order: 200
- title: 'Documentation'
regexp: '^.*?docs(\([[:word:]]+\))??!?:.+$'
order: 300
- title: 'Dependency updates'
regexp: '^.*?(feat|fix|chore)\(deps?.+\)!?:.+$'
order: 400
- title: 'Other work'
order: 999
filters:
exclude:
- '^test:'
- '^.*?Bump(\([[:word:]]+\))?.+$'

# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
38 changes: 0 additions & 38 deletions internal/controller/testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,41 +72,3 @@ func makeArgoCDNamespace() *corev1.Namespace {
}
return ns
}

func makeRBACOperatorNamespace() *corev1.Namespace {
ns := &corev1.Namespace{
ObjectMeta: metav1.ObjectMeta{
Name: testNamespace,
},
}
return ns
}

func makeTestRoleBinding() *rbacoperatorv1alpha1.ArgoCDRoleBinding {
rb := &rbacoperatorv1alpha1.ArgoCDRoleBinding{
ObjectMeta: metav1.ObjectMeta{
Name: testRoleBindingName,
Namespace: testNamespace,
},
Spec: rbacoperatorv1alpha1.ArgoCDRoleBindingSpec{
Subjects: []rbacoperatorv1alpha1.Subject{
{
Kind: "role",
Name: "other-test-role",
},
{
Kind: "sso",
Name: "test-sso-user",
},
{
Kind: "local",
Name: "test-local-user",
},
},
ArgoCDRoleRef: rbacoperatorv1alpha1.ArgoCDRoleRef{
Name: testRoleName,
},
},
}
return rb
}
3 changes: 3 additions & 0 deletions release.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM scratch
ENTRYPOINT ["/rbac-operator"]
COPY rbac-operator /

0 comments on commit 8cf0419

Please sign in to comment.