2019-10-30 03:54:47 +07:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2019-12-24 09:14:52 +07:00
|
|
|
"github.com/authelia/authelia/internal/utils"
|
2019-11-02 21:32:58 +07:00
|
|
|
log "github.com/sirupsen/logrus"
|
2019-10-30 03:54:47 +07:00
|
|
|
"github.com/spf13/cobra"
|
|
|
|
)
|
|
|
|
|
2020-02-10 00:04:28 +07:00
|
|
|
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 " +
|
2019-10-30 03:54:47 +07:00
|
|
|
"pull"
|
|
|
|
|
|
|
|
// RunCI run the CI scripts
|
|
|
|
func RunCI(cmd *cobra.Command, args []string) {
|
2019-11-30 23:49:52 +07:00
|
|
|
log.Info("=====> Build stage <=====")
|
2019-11-02 21:32:58 +07:00
|
|
|
if err := utils.CommandWithStdout("authelia-scripts", "--log-level", "debug", "build").Run(); err != nil {
|
|
|
|
log.Fatal(err)
|
2019-10-30 03:54:47 +07:00
|
|
|
}
|
|
|
|
|
2019-11-30 23:49:52 +07:00
|
|
|
log.Info("=====> Unit testing stage <=====")
|
2019-11-02 21:32:58 +07:00
|
|
|
if err := utils.CommandWithStdout("authelia-scripts", "--log-level", "debug", "unittest").Run(); err != nil {
|
|
|
|
log.Fatal(err)
|
2019-10-30 03:54:47 +07:00
|
|
|
}
|
|
|
|
}
|