2017-06-28 20:57:58 +07:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2019-03-04 05:51:52 +07:00
|
|
|
source bootstrap.sh
|
2019-01-27 21:54:29 +07:00
|
|
|
|
2017-06-28 20:57:58 +07:00
|
|
|
docker --version
|
|
|
|
docker-compose --version
|
2018-08-10 03:24:02 +07:00
|
|
|
echo "node `node -v`"
|
|
|
|
echo "npm `npm -v`"
|
2017-06-28 20:57:58 +07:00
|
|
|
|
2019-03-04 05:51:52 +07:00
|
|
|
authelia-scripts bootstrap
|
|
|
|
|
2019-03-03 01:05:55 +07:00
|
|
|
docker-compose -f docker-compose.yml \
|
|
|
|
-f example/compose/mongo/docker-compose.yml \
|
|
|
|
-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
|
|
|
|
|
2019-01-27 21:54:29 +07:00
|
|
|
# Build
|
2019-03-22 21:17:38 +07:00
|
|
|
echo "===> Build stage"
|
2019-01-27 21:54:29 +07:00
|
|
|
authelia-scripts build
|
2017-06-28 20:57:58 +07:00
|
|
|
|
2019-02-24 16:03:38 +07:00
|
|
|
# Run unit tests
|
2019-03-22 21:17:38 +07:00
|
|
|
echo "===> Unit tests stage"
|
2019-03-22 21:02:15 +07:00
|
|
|
authelia-scripts unittest --forbid-only
|
2019-02-24 16:03:38 +07:00
|
|
|
|
2019-03-02 04:52:01 +07:00
|
|
|
# Build the docker image
|
2019-03-22 21:17:38 +07:00
|
|
|
echo "===> Docker image build stage"
|
2019-03-02 04:52:01 +07:00
|
|
|
authelia-scripts docker build
|
|
|
|
|
2019-02-24 05:27:34 +07:00
|
|
|
# Run integration tests
|
2019-03-22 21:17:38 +07:00
|
|
|
echo "===> e2e stage"
|
2019-03-22 21:02:15 +07:00
|
|
|
authelia-scripts suites test --headless --forbid-only
|
2019-02-24 05:27:34 +07:00
|
|
|
|
2017-06-28 20:57:58 +07:00
|
|
|
# Test npm deployment before actual deployment
|
2019-02-12 05:23:40 +07:00
|
|
|
# ./scripts/npm-deployment-test.sh
|