authelia/cmd/authelia-scripts/cmd_ci.go
2020-02-09 18:04:27 +01:00

31 lines
1.1 KiB
Go

package main
import (
"github.com/authelia/authelia/internal/utils"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
const dockerPullCommandLine = "docker-compose -p authelia -f internal/suites/docker-compose.yml " +
"-f internal/suites/example/compose/mariadb/docker-compose.yml " +
"-f internal/suites/example/compose/redis/docker-compose.yml " +
"-f internal/suites/example/compose/nginx/portal/docker-compose.yml " +
"-f internal/suites/example/compose/smtp/docker-compose.yml " +
"-f internal/suites/example/compose/httpbin/docker-compose.yml " +
"-f internal/suites/example/compose/ldap/docker-compose.admin.yml " +
"-f internal/suites/example/compose/ldap/docker-compose.yml " +
"pull"
// RunCI run the CI scripts
func RunCI(cmd *cobra.Command, args []string) {
log.Info("=====> Build stage <=====")
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)
}
}