Skip to content

Commit

Permalink
build. Add the user manager UI bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidePrincipi committed Nov 2, 2023
1 parent 9b8dbac commit 66cc9d5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ns8-user-manager-*.tar.gz

5 changes: 5 additions & 0 deletions build-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ images=()
repobase="${REPOBASE:-ghcr.io/nethserver}"
reponame="ubuntu-samba"
ubuntu_tag=23.04
user_manager_version=v0.2.1

container="ubuntu-working-container"
# Prepare a local Ubuntu-based samba image
Expand Down Expand Up @@ -69,6 +70,9 @@ if ! buildah containers --format "{{.ContainerName}}" | grep -q nodebuilder-samb
buildah from --name nodebuilder-samba -v "${PWD}:/usr/src:Z" docker.io/library/node:lts
fi

echo "Downloading user manager ${user_manager_version} UI..."
curl -f -O -L https://github.com/NethServer/ns8-user-manager/releases/download/${user_manager_version}/ns8-user-manager-${user_manager_version}.tar.gz

echo "Build static UI files with node..."
buildah run \
--workingdir=/usr/src/ui \
Expand All @@ -77,6 +81,7 @@ buildah run \
sh -c "yarn install && yarn build"

buildah add "${container}" imageroot /imageroot
buildah add "${container}" ns8-user-manager-${user_manager_version}.tar.gz /imageroot/api-moduled/public
buildah add "${container}" ui/dist /ui
buildah config \
--label "org.nethserver.images=ghcr.io/nethserver/samba-dc:${IMAGETAG:-latest}" \
Expand Down
12 changes: 11 additions & 1 deletion renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,19 @@
"build-images.sh"
],
"matchStrings": [
"docker\\.io\/library\/node:(?<currentValue>[^\\s]+)"
"\\bdocker\\.io/(?<depName>.+):(?<currentValue>[-0-9\\.a-z]+)"
],
"datasourceTemplate": "docker"
},
{
"fileMatch": [
"build-images.sh"
],
"matchStrings": [
"user_manager_version=(?<currentValue>.*?)\\n"
],
"depNameTemplate": "NethServer/ns8-user-manager",
"datasourceTemplate": "github-releases"
}
],
"packageRules": [
Expand Down

0 comments on commit 66cc9d5

Please sign in to comment.