mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
ci(buildkite): skip front/backend builds for renovate deps (#2462)
* ci(buildkite): skip front/backend builds for renovate deps * ci(buildkite): make unit-test artifact compression conditional
This commit is contained in:
parent
65dd2a1341
commit
26de57a297
|
@ -6,16 +6,18 @@ declare -A BUILDS=(["linux"]="amd64 arm arm64 amd64-musl arm-musl arm64-musl" ["
|
||||||
DOCKER_IMAGE=authelia/authelia
|
DOCKER_IMAGE=authelia/authelia
|
||||||
|
|
||||||
if [[ "${BUILDKITE_LABEL}" == ":hammer_and_wrench: Unit Test" ]]; then
|
if [[ "${BUILDKITE_LABEL}" == ":hammer_and_wrench: Unit Test" ]]; then
|
||||||
echo "--- :docker: Saving artifacts for :buildkite: :docker: :github: releases"
|
if [[ ! "${BUILDKITE_BRANCH}" =~ ^renovate/ ]]; then
|
||||||
for OS in "${!BUILDS[@]}"; do
|
echo "--- :docker: Saving artifacts for :buildkite: :docker: :github: releases"
|
||||||
for ARCH in ${BUILDS[$OS]}; do
|
for OS in "${!BUILDS[@]}"; do
|
||||||
tar -czf "authelia-${OS}-${ARCH}.tar.gz" "authelia-${OS}-${ARCH}" authelia.service config.template.yml
|
for ARCH in ${BUILDS[$OS]}; do
|
||||||
sha256sum "authelia-${OS}-${ARCH}.tar.gz" > "authelia-${OS}-${ARCH}.tar.gz.sha256"
|
tar -czf "authelia-${OS}-${ARCH}.tar.gz" "authelia-${OS}-${ARCH}" authelia.service config.template.yml
|
||||||
|
sha256sum "authelia-${OS}-${ARCH}.tar.gz" > "authelia-${OS}-${ARCH}.tar.gz.sha256"
|
||||||
|
done
|
||||||
done
|
done
|
||||||
done
|
|
||||||
|
|
||||||
tar -czf authelia-public_html.tar.gz -C dist public_html
|
tar -czf authelia-public_html.tar.gz -C dist public_html
|
||||||
sha256sum authelia-public_html.tar.gz > authelia-public_html.tar.gz.sha256
|
sha256sum authelia-public_html.tar.gz > authelia-public_html.tar.gz.sha256
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${BUILDKITE_LABEL}" == ":docker: Build Image [coverage]" ]]; then
|
if [[ "${BUILDKITE_LABEL}" == ":docker: Build Image [coverage]" ]]; then
|
||||||
|
|
|
@ -136,13 +136,19 @@ func cleanAssets() {
|
||||||
|
|
||||||
// Build build Authelia.
|
// Build build Authelia.
|
||||||
func Build(cobraCmd *cobra.Command, args []string) {
|
func Build(cobraCmd *cobra.Command, args []string) {
|
||||||
log.Info("Building Authelia...")
|
|
||||||
|
|
||||||
buildkite, _ := cobraCmd.Flags().GetBool("buildkite")
|
buildkite, _ := cobraCmd.Flags().GetBool("buildkite")
|
||||||
|
branch := os.Getenv("BUILDKITE_BRANCH")
|
||||||
|
|
||||||
|
if strings.HasPrefix(branch, "renovate/") {
|
||||||
|
log.Info("Skip building Authelia for deps...")
|
||||||
|
os.Exit(0)
|
||||||
|
}
|
||||||
|
|
||||||
|
log.Info("Building Authelia...")
|
||||||
|
|
||||||
Clean(cobraCmd, args)
|
Clean(cobraCmd, args)
|
||||||
|
|
||||||
xflags, err := getXFlags(os.Getenv("BUILDKITE_BRANCH"), os.Getenv("BUILDKITE_BUILD_NUMBER"), "")
|
xflags, err := getXFlags(branch, os.Getenv("BUILDKITE_BUILD_NUMBER"), "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user