feat(assist-server): moved the build.sh script to the root
This commit is contained in:
parent
f70cce7e23
commit
b55e44d450
3 changed files with 11 additions and 13 deletions
4
.github/workflows/assist-server-ee.yaml
vendored
4
.github/workflows/assist-server-ee.yaml
vendored
|
|
@ -61,7 +61,7 @@ jobs:
|
|||
ENVIRONMENT: staging
|
||||
run: |
|
||||
skip_security_checks=${{ github.event.inputs.skip_security_checks }}
|
||||
cd ee/assist-server
|
||||
cd assist-server
|
||||
PUSH_IMAGE=0 bash -x ./build.sh ee
|
||||
[[ "x$skip_security_checks" == "xtrue" ]] || {
|
||||
curl -L https://github.com/aquasecurity/trivy/releases/download/v0.56.2/trivy_0.56.2_Linux-64bit.tar.gz | tar -xzf - -C ./
|
||||
|
|
@ -103,7 +103,7 @@ jobs:
|
|||
- name: Deploy to kubernetes
|
||||
run: |
|
||||
pwd
|
||||
cd ../scripts/helmcharts/
|
||||
cd scripts/helmcharts/
|
||||
|
||||
# Update changed image tag
|
||||
sed -i "/assist-server/{n;n;n;s/.*/ tag: ${IMAGE_TAG}/}" /tmp/image_override.yaml
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
# Usage: IMAGE_TAG=latest DOCKER_REPO=myDockerHubID bash build.sh <ee>
|
||||
|
||||
ARCH=${ARCH:-amd64}
|
||||
git_sha=$(git rev-parse --short HEAD)
|
||||
image_tag=${IMAGE_TAG:-git_sha}
|
||||
check_prereq() {
|
||||
|
|
@ -12,13 +13,10 @@ check_prereq() {
|
|||
}
|
||||
source ../scripts/lib/_docker.sh
|
||||
|
||||
[[ $1 == ee ]] && ee=true
|
||||
[[ $PATCH -eq 1 ]] && {
|
||||
image_tag="$(grep -ER ^.ppVersion ../scripts/helmcharts/openreplay/charts/$chart | xargs | awk '{print $2}' | awk -F. -v OFS=. '{$NF += 1 ; print}')"
|
||||
[[ $ee == "true" ]] && {
|
||||
image_tag="${image_tag}-ee"
|
||||
}
|
||||
}
|
||||
update_helm_release() {
|
||||
chart=$1
|
||||
HELM_TAG="$(grep -iER ^version ../scripts/helmcharts/openreplay/charts/$chart | awk '{print $2}' | awk -F. -v OFS=. '{$NF += 1 ; print}')"
|
||||
|
|
@ -32,20 +30,18 @@ update_helm_release() {
|
|||
}
|
||||
|
||||
function build_api() {
|
||||
destination="_assist-server"
|
||||
[[ $1 == "ee" ]] && {
|
||||
destination="_assist-server_ee"
|
||||
}
|
||||
[[ -d ../${destination} ]] && {
|
||||
echo "Removing previous build cache"
|
||||
rm -rf ../${destination}
|
||||
}
|
||||
cp -R ../ee/assist-server ../${destination}
|
||||
cd ../${destination}
|
||||
cp -R ../assist-server ../${destination}
|
||||
cd ../${destination} || exit 1
|
||||
cp -rf ../ee/assist-server/* ./
|
||||
|
||||
docker build -f ./Dockerfile --build-arg GIT_SHA=$git_sha -t ${DOCKER_REPO:-'local'}/assist-server:${image_tag} .
|
||||
|
||||
cd ../assist
|
||||
cd ../assist-server || exit 1
|
||||
rm -rf ../${destination}
|
||||
[[ $PUSH_IMAGE -eq 1 ]] && {
|
||||
docker push ${DOCKER_REPO:-'local'}/assist-server:${image_tag}
|
||||
|
|
@ -50,6 +50,7 @@ io.attachApp(app);
|
|||
io.engine.on("headers", (headers) => {
|
||||
headers["x-host-id"] = process.env.HOSTNAME || "unknown";
|
||||
});
|
||||
|
||||
setSocketIOServer(io);
|
||||
|
||||
const HOST = process.env.LISTEN_HOST || '0.0.0.0';
|
||||
|
|
@ -61,6 +62,7 @@ app.listen(PORT, (token) => {
|
|||
console.log(`Failed to listen on port ${PORT}`);
|
||||
}
|
||||
});
|
||||
|
||||
startCacheRefresher(io);
|
||||
|
||||
process.on('uncaughtException', err => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue