-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #110 from mallardduck/repo-reorg/publish-workflows
Repo reorg follow up for Releases
- Loading branch information
Showing
6 changed files
with
247 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# Make sure to check the documentation at https://goreleaser.com | ||
version: 2 # the goreleaser config version | ||
before: | ||
hooks: | ||
- go mod tidy | ||
builds: | ||
- id: helm-locker | ||
main: ./cmd/helm-locker/main.go | ||
goos: | ||
- linux | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
binary: helm-locker | ||
ldflags: | ||
- -extldflags | ||
- -static | ||
- -s | ||
- -X main.Version={{.Version}} -X main.GitCommit={{.Commit}} | ||
flags: | ||
- -trimpath | ||
env: | ||
- CGO_ENABLED=0 | ||
- id: helm-project-operator | ||
main: ./cmd/helm-project-operator/main.go | ||
goos: | ||
- linux | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
binary: helm-project-operator | ||
ldflags: | ||
- -extldflags | ||
- -static | ||
- -s | ||
- -X main.Version={{.Version}} -X main.GitCommit={{.Commit}} | ||
flags: | ||
- -trimpath | ||
env: | ||
- CGO_ENABLED=0 | ||
- id: prometheus-federator | ||
main: ./cmd/prometheus-federator/main.go | ||
goos: | ||
- linux | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
binary: prometheus-federator | ||
ldflags: | ||
- -extldflags | ||
- -static | ||
- -s | ||
- -X main.Version={{.Version}} -X main.GitCommit={{.Commit}} | ||
flags: | ||
- -trimpath | ||
env: | ||
- CGO_ENABLED=0 | ||
archives: | ||
- id: prometheus-federator | ||
builds: | ||
- prometheus-federator | ||
name_template: '{{ .Binary }}-{{ .Arch }}' | ||
- id: helm-project-operator | ||
builds: | ||
- helm-project-operator | ||
name_template: '{{ .Binary }}-{{ .Arch }}' | ||
- id: helm-locker | ||
builds: | ||
- helm-locker | ||
name_template: '{{ .Binary }}-{{ .Arch }}' | ||
release: | ||
prerelease: auto | ||
extra_files: | ||
- glob : ./build/charts/*.tgz | ||
checksum: | ||
name_template: 'checksums.txt' | ||
snapshot: | ||
version_template: "{{ incpatch .Version }}-next" | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/bash | ||
set -e | ||
set -x | ||
|
||
if ! hash helm 2>/dev/null; then | ||
echo "Helm is not installed" | ||
exit 1 | ||
fi | ||
|
||
source "$(dirname "$0")/version" | ||
source "$(dirname "$0")/util-chart" | ||
|
||
# We don't do the full process for prometheus-federator | ||
if [[ "${BUILD_TARGET}" == "prometheus-federator" ]]; then | ||
mkdir -p ./dist/artifacts/ | ||
CHART_VERSION=${EMBEDDED_CHART_VERSION:-$(find "./charts/${BUILD_TARGET}" -maxdepth 1 -mindepth 1 -type d | tr - \~ | sort -rV | tr \~ - | head -n1 | cut -d'/' -f4)} | ||
cp -a "./assets/${BUILD_TARGET}/${BUILD_TARGET}-${CHART_VERSION}.tgz" ./build/charts/ | ||
exit | ||
fi | ||
|
||
cd "$(dirname "$0")/.." | ||
|
||
if [ "$BUILD_TARGET" == "helm-project-operator" ]; then | ||
DEFAULT_CHART_SOURCE="./packages/$BUILD_TARGET/charts" | ||
elif [ "$BUILD_TARGET" == "helm-locker" ]; then | ||
DEFAULT_CHART_SOURCE="./examples/$BUILD_TARGET/helm-locker-chart-example" | ||
fi | ||
|
||
clean-old-chart "$BUILD_TARGET" | ||
cp -rf "${DEFAULT_CHART_SOURCE}" "./build/charts/${BUILD_TARGET}" | ||
|
||
edit-charts "./build/charts/${BUILD_TARGET}/Chart.yaml" "${HELM_CHART_VERSION}" "${HELM_IMAGE_TAG}" | ||
package-charts "./build/charts/${BUILD_TARGET}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters