Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add arlas-fam-wui to release script #142

Merged
merged 3 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions file-explorer/Dockerfile → Dockerfile-arlas-fam-wui
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@
FROM node:16.19.0 as builder
WORKDIR /app

COPY ./package.json ./
COPY ./package-lock.json ./
COPY ./file-explorer/package.json ./
COPY ./file-explorer/package-lock.json ./

## installing necessary libraries
RUN npm install

COPY ./scripts/start.sh ./
COPY ./file-explorer/scripts/start.sh ./

COPY . .
COPY ./file-explorer .

## Build the angular app in production mode
RUN npm run build

### STAGE 2: Setup ###

FROM nginx:1.23.3-alpine
FROM nginx:1.25.3-alpine3.18-slim
ARG version="latest"

LABEL io.arlas.wui-fam.version=${version}
Expand All @@ -29,7 +29,7 @@ LABEL description="This container builds and serves the FAM-wui app"
RUN apk add --update bash jq netcat-openbsd curl && rm -rf /var/cache/apk/*

## Copy our default nginx config
COPY nginx/default.conf /etc/nginx/conf.d/
COPY ./file-explorer/nginx/default.conf /etc/nginx/conf.d/

## Remove default nginx website
RUN rm -rf /usr/share/nginx/html/*
Expand Down
4 changes: 2 additions & 2 deletions file-explorer/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions file-explorer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "file-explorer",
"version": "0.0.0",
"version": "0.3.2",
"scripts": {
"ng": "ng",
"start": "ng serve",
Expand Down Expand Up @@ -72,4 +72,4 @@
"traverse": "0.6.8"
}
}
}
}
12 changes: 12 additions & 0 deletions file-explorer/scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,18 @@ fi
envsubst '$FAM_WUI_BASE_HREF' < /usr/share/nginx/html/index.html > /usr/share/nginx/html/index.html.tmp
mv /usr/share/nginx/html/index.html.tmp /usr/share/nginx/html/index.html

### Array of statics links
if [ -z "${ARLAS_STATIC_LINKS}" ]; then
ARLAS_STATIC_LINKS="[]"
export ARLAS_STATIC_LINKS
echo "None static link is defined"
else
echo ${ARLAS_STATIC_LINKS} "is used for 'links' in settings.yaml file"
fi
envsubst '$ARLAS_STATIC_LINKS' < /usr/share/nginx/html/settings.yaml > /usr/share/nginx/html/settings.yaml.tmp
mv /usr/share/nginx/html/settings.yaml.tmp /usr/share/nginx/html/settings.yaml


## AUTHENTICATION
### ARLAS_USE_AUTHENT
if [ -z "${ARLAS_USE_AUTHENT}" ]; then
Expand Down
1 change: 1 addition & 0 deletions file-explorer/src/environments/prod/settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ authentication:
use_discovery: false
threshold: ${ARLAS_AUTHENT_THRESHOLD}
url: ${ARLAS_IAM_SERVER_URL}
links: ${ARLAS_STATIC_LINKS}
file_manager:
url: ${FAM_SERVER_URL}
default_path: ${FAM_DEFAULT_PATH}
Expand Down
13 changes: 13 additions & 0 deletions release/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
VERSION=$1
echo "Build and releas the image with version ${VERSION}"

prepare_arlas_fam_wui (){
cd file-explorer
npm --no-git-tag-version version ${VERSION}
cd ../
}

build_and_publish_docker (){
IMAGE=$1
echo "Building the image $IMAGE"
Expand All @@ -18,6 +24,10 @@ build_and_publish_docker (){

build_and_publish_docker fam

#--------------- FAM WUI ----------------
prepare_arlas_fam_wui
build_and_publish_docker arlas-fam-wui

#--------------- APROC ----------------
build_and_publish_docker aproc-proc

Expand All @@ -40,6 +50,9 @@ python3 airs/core/models/utils.py > docs/model/model.schema.json
jsonschema2md -d docs/model/ -o docs/model/
./release/publish.sh $VERSION

# FILE EXPLORER
git add file-explorer/package.json
git add file-explorer/package-lock.json
# DOCUMENTATION
git add docs/
git commit -m "update docs for version "$VERSION
Expand Down
Loading