Skip to content

Commit 8a445ca

Browse files
authored
chore: build metadata (#10612)
feat: build metadata
1 parent 15c1cd6 commit 8a445ca

24 files changed

+905
-18
lines changed

Diff for: .github/workflows/docker.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,11 @@ jobs:
124124
push: ${{ !github.event.pull_request.head.repo.fork }}
125125
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/immich-build-cache:${{matrix.image}}
126126
cache-to: ${{ steps.cache-target.outputs.cache-to }}
127-
build-args: |
128-
DEVICE=${{ matrix.device }}
129127
tags: ${{ steps.metadata.outputs.tags }}
130128
labels: ${{ steps.metadata.outputs.labels }}
129+
build-args: |
130+
DEVICE=${{ matrix.device }}
131+
BUILD_ID=${{ github.run_id }}
132+
BUILD_IMAGE=${{ github.event_name == 'release' && github.ref_name || steps.metadata.outputs.tags }}
133+
BUILD_SOURCE_REF=${{ github.ref_name }}
134+
BUILD_SOURCE_COMMIT=${{ github.sha }}

Diff for: docker/docker-compose.dev.yml

+26-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@ services:
2626
- /etc/localtime:/etc/localtime:ro
2727
env_file:
2828
- .env
29+
environment:
30+
IMMICH_REPOSITORY: immich-app/immich
31+
IMMICH_REPOSITORY_URL: https://github.com/immich-app/immich
32+
IMMICH_SOURCE_REF: local
33+
IMMICH_SOURCE_COMMIT: af2efbdbbddc27cd06142f22253ccbbbbeec1f55
34+
IMMICH_SOURCE_URL: https://github.com/immich-app/immich/commit/af2efbdbbddc27cd06142f22253ccbbbbeec1f55
35+
IMMICH_BUILD: '9654404849'
36+
IMMICH_BUILD_URL: https://github.com/immich-app/immich/actions/runs/9654404849
37+
IMMICH_BUILD_IMAGE: development
38+
IMMICH_BUILD_IMAGE_URL: https://github.com/immich-app/immich/pkgs/container/immich-server
2939
ulimits:
3040
nofile:
3141
soft: 1048576
@@ -107,7 +117,22 @@ services:
107117
interval: 5m
108118
start_interval: 30s
109119
start_period: 5m
110-
command: ["postgres", "-c" ,"shared_preload_libraries=vectors.so", "-c", 'search_path="$$user", public, vectors', "-c", "logging_collector=on", "-c", "max_wal_size=2GB", "-c", "shared_buffers=512MB", "-c", "wal_compression=on"]
120+
command:
121+
[
122+
'postgres',
123+
'-c',
124+
'shared_preload_libraries=vectors.so',
125+
'-c',
126+
'search_path="$$user", public, vectors',
127+
'-c',
128+
'logging_collector=on',
129+
'-c',
130+
'max_wal_size=2GB',
131+
'-c',
132+
'shared_buffers=512MB',
133+
'-c',
134+
'wal_compression=on',
135+
]
111136

112137
# set IMMICH_METRICS=true in .env to enable metrics
113138
# immich-prometheus:

Diff for: e2e/docker-compose.yml

+5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ services:
1010
build:
1111
context: ../
1212
dockerfile: server/Dockerfile
13+
args:
14+
- BUILD_ID=1234567890
15+
- BUILD_IMAGE=e2e
16+
- BUILD_SOURCE_REF=e2e
17+
- BUILD_SOURCE_COMMIT=e2eeeeeeeeeeeeeeeeee
1318
environment:
1419
- DB_HOSTNAME=database
1520
- DB_USERNAME=postgres

Diff for: e2e/src/api/specs/server-info.e2e-spec.ts

+33
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,39 @@ describe('/server-info', () => {
1515
nonAdmin = await utils.userSetup(admin.accessToken, createUserDto.user1);
1616
});
1717

18+
describe('GET /server-info/about', () => {
19+
it('should require authentication', async () => {
20+
const { status, body } = await request(app).get('/server-info/about');
21+
expect(status).toBe(401);
22+
expect(body).toEqual(errorDto.unauthorized);
23+
});
24+
25+
it('should return about information', async () => {
26+
const { status, body } = await request(app)
27+
.get('/server-info/about')
28+
.set('Authorization', `Bearer ${admin.accessToken}`);
29+
expect(status).toBe(200);
30+
expect(body).toEqual({
31+
version: expect.any(String),
32+
versionUrl: expect.any(String),
33+
repository: 'immich-app/immich',
34+
repositoryUrl: 'https://github.com/immich-app/immich',
35+
build: '1234567890',
36+
buildUrl: 'https://github.com/immich-app/immich/actions/runs/1234567890',
37+
buildImage: 'e2e',
38+
buildImageUrl: 'https://github.com/immich-app/immich/pkgs/container/immich-server',
39+
sourceRef: 'e2e',
40+
sourceCommit: 'e2eeeeeeeeeeeeeeeeee',
41+
sourceUrl: 'https://github.com/immich-app/immich/commit/e2eeeeeeeeeeeeeeeeee',
42+
nodejs: expect.any(String),
43+
ffmpeg: expect.any(String),
44+
imagemagick: expect.any(String),
45+
libvips: expect.any(String),
46+
exiftool: expect.any(String),
47+
});
48+
});
49+
});
50+
1851
describe('GET /server-info/storage', () => {
1952
it('should require authentication', async () => {
2053
const { status, body } = await request(app).get('/server-info/storage');

Diff for: mobile/openapi/README.md

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: mobile/openapi/lib/api.dart

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: mobile/openapi/lib/api/server_info_api.dart

+41
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: mobile/openapi/lib/api_client.dart

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)