From af7d4eb3d1794c5f05147a2801168bb8326ec645 Mon Sep 17 00:00:00 2001 From: Lihi Zitzer Date: Tue, 5 Nov 2024 07:19:15 +0200 Subject: [PATCH] a --- .github/workflows/release-test-lihi.yaml | 13 +- .goreleaser.yaml | 157 +++++++++++------------ build/starboard/Dockerfile | 3 - 3 files changed, 78 insertions(+), 95 deletions(-) diff --git a/.github/workflows/release-test-lihi.yaml b/.github/workflows/release-test-lihi.yaml index 6a7f5dd2d..fceb4f2b6 100644 --- a/.github/workflows/release-test-lihi.yaml +++ b/.github/workflows/release-test-lihi.yaml @@ -4,7 +4,7 @@ # # git tag -a v0.0.1 -m 'Release v0.0.1' # git push upstream v0.0.1 -name: Release +name: Release-Test-Lihi on: push: branches: @@ -71,17 +71,6 @@ jobs: # - name: Update new version for plugin 'starboard' in krew-index # uses: rajatjindal/krew-release-bot@v0.0.43 -# - name: Tag and push image to Amazon ECR -# id: build-image -# env: -# ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} -# IMAGE_TAG: ${{ github.sha }} -# run: | -# # push to ECR -# docker tag $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG_ECR -# docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -# echo "image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> $GITHUB_OUTPUT - - name: Cleanup Docker and KIND resources run: | docker system prune -a --force diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 52a569c54..343f32e69 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -4,82 +4,82 @@ env: - GO111MODULE=on - CGO_ENABLED=0 -before: - hooks: - - go mod download -builds: - - id: starboard - main: ./cmd/starboard/main.go - binary: starboard - goos: - - darwin - - linux - - windows - goarch: - - amd64 - - arm - - arm64 - goarm: - - "7" - ignore: - - goos: darwin - goarch: s390x - - goos: windows - goarch: s390x - - id: starboard-operator - main: ./cmd/starboard-operator/main.go - binary: starboard-operator - goos: - - linux - goarch: - - amd64 - - arm - - arm64 - - s390x - - ppc64le - goarm: - - "7" - - id: starboard-operator-fips - main: ./cmd/starboard-operator/main.go - binary: starboard-operator-fips - flags: - - -tags=fipsonly - env: - - GOEXPERIMENT=boringcrypto - goos: - - linux - goarch: - - amd64 - - arm - - arm64 - - s390x - - ppc64le - goarm: - - "7" - - id: starboard-scanner-aqua - main: ./cmd/scanner-aqua/main.go - binary: starboard-scanner-aqua - goos: - - linux - goarch: - - amd64 - - arm - - arm64 - goarm: - - "7" -archives: - - name_template: >- - {{ .ProjectName }}_ - {{- .Os }}_ - {{- if eq .Arch "amd64" }}x86_64 - {{- else if eq .Arch "arm" }}ARM - {{- else if eq .Arch "arm64" }}ARM64 - {{- else }}{{ .Arch }}{{ end }} - builds: - - starboard - format_overrides: - - goos: windows - format: zip +#before: +# hooks: +# - go mod download +#builds: +# - id: starboard +# main: ./cmd/starboard/main.go +# binary: starboard +# goos: +# - darwin +# - linux +# - windows +# goarch: +# - amd64 +# - arm +# - arm64 +# goarm: +# - "7" +# ignore: +# - goos: darwin +# goarch: s390x +# - goos: windows +# goarch: s390x +# - id: starboard-operator +# main: ./cmd/starboard-operator/main.go +# binary: starboard-operator +# goos: +# - linux +# goarch: +# - amd64 +# - arm +# - arm64 +# - s390x +# - ppc64le +# goarm: +# - "7" +# - id: starboard-operator-fips +# main: ./cmd/starboard-operator/main.go +# binary: starboard-operator-fips +# flags: +# - -tags=fipsonly +# env: +# - GOEXPERIMENT=boringcrypto +# goos: +# - linux +# goarch: +# - amd64 +# - arm +# - arm64 +# - s390x +# - ppc64le +# goarm: +# - "7" +# - id: starboard-scanner-aqua +# main: ./cmd/scanner-aqua/main.go +# binary: starboard-scanner-aqua +# goos: +# - linux +# goarch: +# - amd64 +# - arm +# - arm64 +# goarm: +# - "7" +#archives: +# - name_template: >- +# {{ .ProjectName }}_ +# {{- .Os }}_ +# {{- if eq .Arch "amd64" }}x86_64 +# {{- else if eq .Arch "arm" }}ARM +# {{- else if eq .Arch "arm64" }}ARM64 +# {{- else }}{{ .Arch }}{{ end }} +# builds: +# - starboard +# format_overrides: +# - goos: windows +# format: zip checksum: name_template: "checksums.txt" #snapshot: @@ -93,7 +93,7 @@ checksum: # - '^release' dockers: - image_templates: - - "aquasec.azurecr.io/starboard:{{ .Version }}-amd64" + - "aquasec.azurecr.io/starboard-lihitest:{{ .Version }}-amd64" use: buildx goos: linux dockerfile: build/starboard/Dockerfile @@ -115,6 +115,3 @@ docker_manifests: - name_template: "aquasec/starboard:{{ .Version }}" image_templates: - "aquasec/starboard:{{ .Version }}-amd64" - - name_template: "aquasec/starboard-operator:{{ .Version }}" - image_templates: - - "aquasec/starboard-operator:{{ .Version }}-amd64" diff --git a/build/starboard/Dockerfile b/build/starboard/Dockerfile index b605f4194..59368013f 100644 --- a/build/starboard/Dockerfile +++ b/build/starboard/Dockerfile @@ -2,8 +2,5 @@ FROM alpine:3.19 RUN adduser -u 10000 -D -g '' starboard starboard -COPY starboard /usr/local/bin/starboard - USER starboard -ENTRYPOINT ["starboard"]