#!/usr/bin/env sh

cd '/var/jenkins_home/workspace/tt-app_app_Saga/nextjs/'

echo '==============='
echo '=====Build====='
echo '==============='

set -x
cat package.json
yarn install

echo '-----installation de cypress-----'
yarn global add cypress
echo '-----BUILD-----'

yarn build
set +x

echo '==============='
echo '=====Start====='
echo '==============='

set -x
yarn start &
sleep 1
echo $! > .pidfile
set +x