2019-10-29 20:54:47 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2019-11-17 10:47:07 +00:00
|
|
|
"github.com/clems4ever/authelia/internal/utils"
|
2019-11-02 14:32:58 +00:00
|
|
|
log "github.com/sirupsen/logrus"
|
2019-10-29 20:54:47 +00:00
|
|
|
"github.com/spf13/cobra"
|
|
|
|
)
|
|
|
|
|
|
|
|
const dockerPullCommandLine = "docker-compose -f docker-compose.yml " +
|
2019-11-16 10:38:21 +00:00
|
|
|
"-f example/compose/mariadb/docker-compose.yml " +
|
2019-10-29 20:54:47 +00:00
|
|
|
"-f example/compose/redis/docker-compose.yml " +
|
|
|
|
"-f example/compose/nginx/portal/docker-compose.yml " +
|
|
|
|
"-f example/compose/smtp/docker-compose.yml " +
|
|
|
|
"-f example/compose/httpbin/docker-compose.yml " +
|
|
|
|
"-f example/compose/ldap/docker-compose.admin.yml " +
|
|
|
|
"-f example/compose/ldap/docker-compose.yml " +
|
|
|
|
"pull"
|
|
|
|
|
|
|
|
// RunCI run the CI scripts
|
|
|
|
func RunCI(cmd *cobra.Command, args []string) {
|
2019-11-30 16:49:52 +00:00
|
|
|
log.Info("=====> Build stage <=====")
|
2019-11-02 14:32:58 +00:00
|
|
|
if err := utils.CommandWithStdout("authelia-scripts", "--log-level", "debug", "build").Run(); err != nil {
|
|
|
|
log.Fatal(err)
|
2019-10-29 20:54:47 +00:00
|
|
|
}
|
|
|
|
|
2019-11-30 16:49:52 +00:00
|
|
|
log.Info("=====> Unit testing stage <=====")
|
2019-11-02 14:32:58 +00:00
|
|
|
if err := utils.CommandWithStdout("authelia-scripts", "--log-level", "debug", "unittest").Run(); err != nil {
|
|
|
|
log.Fatal(err)
|
2019-10-29 20:54:47 +00:00
|
|
|
}
|
|
|
|
}
|