mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
756aee507f
* refactor: cra build path The `authelia-scripts` helper currently performs steps to move files around in different stages of development and CI/CD. We now utilise the `BUILD_PATH` environment variable to adjust the output directory for the web frontend from the default of `./web/build/` simplifying the helper somewhat. Additionally we no longer build the Go binary in the unit test stage of our CI/CD as this is not necessary. * fix: build output directory in coverage dockerfile
31 lines
788 B
Go
31 lines
788 B
Go
package main
|
|
|
|
import (
|
|
log "github.com/sirupsen/logrus"
|
|
"github.com/spf13/cobra"
|
|
|
|
"github.com/authelia/authelia/internal/utils"
|
|
)
|
|
|
|
// RunCI run the CI scripts.
|
|
func RunCI(cmd *cobra.Command, args []string) {
|
|
log.Info("=====> Build stage <=====")
|
|
|
|
buildkite, _ := cmd.Flags().GetBool("buildkite")
|
|
if buildkite {
|
|
if err := utils.CommandWithStdout("authelia-scripts", "--log-level", "debug", "--buildkite", "build").Run(); err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
} else {
|
|
if err := utils.CommandWithStdout("authelia-scripts", "--log-level", "debug", "build").Run(); err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
}
|
|
|
|
log.Info("=====> Unit testing stage <=====")
|
|
|
|
if err := utils.CommandWithStdout("authelia-scripts", "--log-level", "debug", "unittest").Run(); err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
}
|