pods_external build/push support

Signed-off-by: Alexey Aristov <aav@acm.org>
This commit is contained in:
Alexey Aristov 2025-05-13 15:35:11 +02:00
parent 2ef945f952
commit 8b0c6e80c7
No known key found for this signature in database
GPG Key ID: EC5C259ABC7D90EA
6 changed files with 64 additions and 0 deletions

View File

@ -790,6 +790,9 @@ importers:
'@rush-temp/pod-export':
specifier: file:./projects/pod-export.tgz
version: file:projects/pod-export.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.9))(bufferutil@4.0.8)(utf-8-validate@6.0.4)
'@rush-temp/pod-external':
specifier: file:./projects/pod-external.tgz
version: file:projects/pod-external.tgz
'@rush-temp/pod-front':
specifier: file:./projects/pod-front.tgz
version: file:projects/pod-front.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.9))
@ -4874,6 +4877,10 @@ packages:
resolution: {integrity: sha512-ti4odQwfm459k1EdChmIGqlOHEIg0fzEdkGQyuEE5QjQ+ym4hlTzt7U4rjpIKFEjQMrYsoijk9f6wiPylNFhQg==, tarball: file:projects/pod-export.tgz}
version: 0.0.0
'@rush-temp/pod-external@file:projects/pod-external.tgz':
resolution: {integrity: sha512-EzhncgJofJZu1oGgew/WOZ/BeE/TnCoQOB04mWDU43jPN4kNgvHR3AUQUmojiXLH74QtXq8+vYWjtthjOo3HgQ==, tarball: file:projects/pod-external.tgz}
version: 0.0.0
'@rush-temp/pod-front@file:projects/pod-front.tgz':
resolution: {integrity: sha512-xBrxvrgvEcrt39mTpar8gPyALnZOsPzDJXzf2o/dzDua7ywz0q2I4KsQEVoj5t6rnFEawHkja0WaFNxdxdkEOg==, tarball: file:projects/pod-front.tgz}
version: 0.0.0
@ -22259,6 +22266,8 @@ snapshots:
- supports-color
- utf-8-validate
'@rush-temp/pod-external@file:projects/pod-external.tgz': {}
'@rush-temp/pod-front@file:projects/pod-front.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.9))':
dependencies:
'@types/body-parser': 1.19.5

20
pods/external/bin/build.sh vendored Normal file
View File

@ -0,0 +1,20 @@
set -e
registry=hardcoreeng
tag=latest
find services.d/ -type f -name "*.service" ! -name "-*" | sort | while read -r file; do
extern=$(cat $file | grep -v -e '^[[:space:]]*$' -e '^#' | head -n 1 | tr -d '[:space:]')
if [ ! -z $extern ]; then
repo=$(echo $extern | cut -d'/' -f2 | cut -d':' -f1)
pulled=$(docker pull --quiet $extern)
local=$registry/$repo:$tag
docker tag $extern $local
echo "Pull&Tag: $pulled -> $local"
fi
done
exit 0

18
pods/external/bin/push.sh vendored Normal file
View File

@ -0,0 +1,18 @@
set -e
registry=hardcoreeng
tag=$(git describe --tags --abbrev=0)
find services.d/ -type f -name "*.service" ! -name "-*" | sort | while read -r file; do
extern=$(cat $file | grep -v -e '^[[:space:]]*$' -e '^#' | head -n 1 | tr -d '[:space:]')
if [ ! -z $extern ]; then
repo=$(echo $extern | cut -d'/' -f2 | cut -d':' -f1)
local=$registry/$repo:$tag
docker buildx imagetools create --tag $local $extern
echo "Copy: $extern -> $local"
fi
done
exit 0

11
pods/external/package.json vendored Normal file
View File

@ -0,0 +1,11 @@
{
"name": "@hcengineering/pod-external",
"version": "0.6.0",
"author": "Anticrm Platform Contributors",
"license": "EPL-2.0",
"scripts": {
"_phase:docker-build": "rushx docker:build",
"docker:build": "sh bin/build.sh",
"docker:push": "sh bin/push.sh"
}
}

View File

@ -0,0 +1 @@
aristov/hulykvs:0.1.1

View File

@ -932,6 +932,11 @@
"projectFolder": "pods/server",
"shouldPublish": false
},
{
"packageName": "@hcengineering/pod-external",
"projectFolder": "pods/external",
"shouldPublish": false
},
{
"packageName": "@hcengineering/front",
"projectFolder": "server/front",