pods / external (#8913)

* remove individual hulykvs build job from workflows/main.yml
* pods_external build/push support
* no-op format command
---------

Signed-off-by: Alexey Aristov <aav@acm.org>
This commit is contained in:
Alexey Aristov 2025-05-14 10:21:21 +02:00 committed by GitHub
parent 95838cf8a5
commit 29d9e26a9c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 65 additions and 34 deletions

View File

@ -677,40 +677,6 @@ jobs:
cd ./services/ai-bot/love-agent
pnpm docker:push
hulykvs-build:
if: ${{ startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/tags/s') }}
runs-on: ubuntu-latest
env:
source_repo: hcengineering/hulykvs
source_ref: v0.1.1
docker_user: ${{ vars.DOCKER_USER || 'hardcoreeng' }}
docker_password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
docker_image: "${{ vars.DOCKER_USER || 'hardcoreeng' }}/hulykvs:${{ github.head_ref || github.ref_name }}"
steps:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ env.docker_user }}
password: ${{ env.docker_password }}
- name: Checkout
uses: actions/checkout@v4
with:
repository: ${{ env.source_repo }}
ref: ${{ env.source_ref }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and Push
uses: docker/build-push-action@v6
with:
context: hulykvs_server
push: true
tags: "${{ env.docker_image }}"
platforms: linux/amd64,linux/arm64
dist-build:
# if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/tags/s') }}
if: ${{ startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/tags/s') }}

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

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

@ -0,0 +1,12 @@
{
"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",
"format": "true"
}
}

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",