feat(assist): refactored
This commit is contained in:
parent
1cd1f72310
commit
e7791a36a3
29 changed files with 18 additions and 18 deletions
10
.github/workflows/assist-ee.yaml
vendored
10
.github/workflows/assist-ee.yaml
vendored
|
|
@ -6,10 +6,10 @@ on:
|
||||||
- dev
|
- dev
|
||||||
- api-*
|
- api-*
|
||||||
paths:
|
paths:
|
||||||
- "ee/utilities/**"
|
- "ee/assist/**"
|
||||||
- "utilities/**"
|
- "assist/**"
|
||||||
- "!utilities/.gitignore"
|
- "!assist/.gitignore"
|
||||||
- "!utilities/*-dev.sh"
|
- "!assist/*-dev.sh"
|
||||||
|
|
||||||
name: Build and Deploy Assist EE
|
name: Build and Deploy Assist EE
|
||||||
|
|
||||||
|
|
@ -44,7 +44,7 @@ jobs:
|
||||||
ENVIRONMENT: staging
|
ENVIRONMENT: staging
|
||||||
run: |
|
run: |
|
||||||
skip_security_checks=${{ github.event.inputs.skip_security_checks }}
|
skip_security_checks=${{ github.event.inputs.skip_security_checks }}
|
||||||
cd utilities
|
cd assist
|
||||||
PUSH_IMAGE=0 bash -x ./build.sh ee
|
PUSH_IMAGE=0 bash -x ./build.sh ee
|
||||||
[[ "x$skip_security_checks" == "xtrue" ]] || {
|
[[ "x$skip_security_checks" == "xtrue" ]] || {
|
||||||
curl -L https://github.com/aquasecurity/trivy/releases/download/v0.34.0/trivy_0.34.0_Linux-64bit.tar.gz | tar -xzf - -C ./
|
curl -L https://github.com/aquasecurity/trivy/releases/download/v0.34.0/trivy_0.34.0_Linux-64bit.tar.gz | tar -xzf - -C ./
|
||||||
|
|
|
||||||
8
.github/workflows/assist.yaml
vendored
8
.github/workflows/assist.yaml
vendored
|
|
@ -6,9 +6,9 @@ on:
|
||||||
- dev
|
- dev
|
||||||
- api-*
|
- api-*
|
||||||
paths:
|
paths:
|
||||||
- "utilities/**"
|
- "assist/**"
|
||||||
- "!utilities/.gitignore"
|
- "!assist/.gitignore"
|
||||||
- "!utilities/*-dev.sh"
|
- "!assist/*-dev.sh"
|
||||||
|
|
||||||
name: Build and Deploy Assist
|
name: Build and Deploy Assist
|
||||||
|
|
||||||
|
|
@ -43,7 +43,7 @@ jobs:
|
||||||
ENVIRONMENT: staging
|
ENVIRONMENT: staging
|
||||||
run: |
|
run: |
|
||||||
skip_security_checks=${{ github.event.inputs.skip_security_checks }}
|
skip_security_checks=${{ github.event.inputs.skip_security_checks }}
|
||||||
cd utilities
|
cd assist
|
||||||
PUSH_IMAGE=0 bash -x ./build.sh
|
PUSH_IMAGE=0 bash -x ./build.sh
|
||||||
[[ "x$skip_security_checks" == "xtrue" ]] || {
|
[[ "x$skip_security_checks" == "xtrue" ]] || {
|
||||||
curl -L https://github.com/aquasecurity/trivy/releases/download/v0.34.0/trivy_0.34.0_Linux-64bit.tar.gz | tar -xzf - -C ./
|
curl -L https://github.com/aquasecurity/trivy/releases/download/v0.34.0/trivy_0.34.0_Linux-64bit.tar.gz | tar -xzf - -C ./
|
||||||
|
|
|
||||||
0
utilities/.gitignore → assist/.gitignore
vendored
0
utilities/.gitignore → assist/.gitignore
vendored
|
|
@ -16,20 +16,20 @@ check_prereq() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function build_api(){
|
function build_api(){
|
||||||
destination="_utilities"
|
destination="_assist"
|
||||||
[[ $1 == "ee" ]] && {
|
[[ $1 == "ee" ]] && {
|
||||||
destination="_utilities_ee"
|
destination="_assist_ee"
|
||||||
}
|
}
|
||||||
cp -R ../utilities ../${destination}
|
cp -R ../assist ../${destination}
|
||||||
cd ../${destination}
|
cd ../${destination}
|
||||||
|
|
||||||
# Copy enterprise code
|
# Copy enterprise code
|
||||||
[[ $1 == "ee" ]] && {
|
[[ $1 == "ee" ]] && {
|
||||||
cp -rf ../ee/utilities/* ./
|
cp -rf ../ee/assist/* ./
|
||||||
}
|
}
|
||||||
docker build -f ./Dockerfile --build-arg GIT_SHA=$git_sha -t ${DOCKER_REPO:-'local'}/assist:${image_tag} .
|
docker build -f ./Dockerfile --build-arg GIT_SHA=$git_sha -t ${DOCKER_REPO:-'local'}/assist:${image_tag} .
|
||||||
|
|
||||||
cd ../utilities
|
cd ../assist
|
||||||
rm -rf ../${destination}
|
rm -rf ../${destination}
|
||||||
[[ $PUSH_IMAGE -eq 1 ]] && {
|
[[ $PUSH_IMAGE -eq 1 ]] && {
|
||||||
docker push ${DOCKER_REPO:-'local'}/assist:${image_tag}
|
docker push ${DOCKER_REPO:-'local'}/assist:${image_tag}
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
rsync -avr --exclude=".*" --exclude="node_modules" --ignore-existing ../../utilities/* ./
|
rsync -avr --exclude=".*" --exclude="node_modules" --ignore-existing ../../assist/* ./
|
||||||
|
|
@ -22,7 +22,7 @@ function build_api(){
|
||||||
}
|
}
|
||||||
cp -R ../peers ../${destination}
|
cp -R ../peers ../${destination}
|
||||||
cd ../${destination}
|
cd ../${destination}
|
||||||
cp -R ../utilities/utils .
|
cp -R ../assist/utils .
|
||||||
# Copy enterprise code
|
# Copy enterprise code
|
||||||
[[ $1 == "ee" ]] && {
|
[[ $1 == "ee" ]] && {
|
||||||
cp -rf ../ee/peers/* ./
|
cp -rf ../ee/peers/* ./
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ function build_api(){
|
||||||
}
|
}
|
||||||
cp -R ../sourcemap-reader ../${destination}
|
cp -R ../sourcemap-reader ../${destination}
|
||||||
cd ../${destination}
|
cd ../${destination}
|
||||||
cp -R ../utilities/utils .
|
cp -R ../assist/utils .
|
||||||
tag=""
|
tag=""
|
||||||
# Copy enterprise code
|
# Copy enterprise code
|
||||||
[[ $1 == "ee" ]] && {
|
[[ $1 == "ee" ]] && {
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
rsync -avr --exclude=".*" --ignore-existing ../utilities/utils ./
|
rsync -avr --exclude=".*" --ignore-existing ../assist/utils ./
|
||||||
Loading…
Add table
Reference in a new issue