Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
151 commits
Select commit Hold shift + click to select a range
4fa04bc
Added persistent storage to local mongodb setup for easier restarts, …
Antimatter543 Oct 28, 2025
97e6df3
Merge branch 'feature/auth0-action' of https://github.com/pixlise/cor…
Antimatter543 Nov 4, 2025
3bc4a82
Fixing integration test for new environments - seeds datasets for qua…
Nov 10, 2025
a40576a
Modifications to start db script so mongo startup always has mapped v…
Nov 10, 2025
cfb6e0f
Merge branch 'feature/auth0-action' of https://github.com/pixlise/cor…
Nov 10, 2025
d8ac8e4
Getting tests to run locally with new Auth0 env. This involved parame…
Nov 10, 2025
e6b510f
Fixing db startup - was failing to start with /db on ubuntu with dock…
Nov 11, 2025
7e89c1a
Merge branch 'feature/em-import-fixes' into feature/auth0-action
Nov 11, 2025
096b0ff
Merge branch 'feature/em-import-fixes' into feature/auth0-action
Nov 11, 2025
6d602ff
Added beginnings of new messaging for support of bigimage
Nov 11, 2025
1e88a21
Merge branch 'feature/em-import-fixes' into feature/bigimage
Nov 11, 2025
ee3f05f
Merged with dev branch
Nov 12, 2025
f4b6e33
Fixing db startup script
Nov 12, 2025
62b03ae
Began initial general TIFF loading, works with (non-jpeg) multipage T…
Antimatter543 Nov 12, 2025
dbc7b37
Vipsgen go wrapper around libvips works now, requires libvips-dev >v8.15
Antimatter543 Nov 13, 2025
048071a
Added basic local tests to ensure vips works for single tiff, multipa…
Antimatter543 Nov 13, 2025
af12166
Minor build fixes and helper section made
Antimatter543 Nov 13, 2025
2998758
Basic image pyramid generation system working (needs to be worked on)
Antimatter543 Nov 13, 2025
aa383d9
Completed tile generation for TIFFS with no subifds and reading along…
Antimatter543 Nov 13, 2025
a7b657f
Added inspection functions so we can easily decide whether to generat…
Antimatter543 Nov 13, 2025
55d8e74
Latest data formats
Nov 14, 2025
14deedc
Start db for pixlise fixed to use right db name
Nov 14, 2025
82907e2
Moving scan reading code to reusable functions from handlers
Nov 14, 2025
4668a62
Merge branch 'feature/bigimage' of https://github.com/pixlise/core in…
Nov 14, 2025
54b4dca
Add pyramid tile server endpoints for efficient image serving
Antimatter543 Nov 14, 2025
1ad9b1d
Merge branch 'feature/bigimage' of https://github.com/pixlise/core in…
Antimatter543 Nov 14, 2025
7525df1
Added pyramid generator CLI tool that generates a pyramidal format fr…
Antimatter543 Nov 14, 2025
d8732e4
Converted the ApiHandler for pyramids to be public so we can do curl …
Antimatter543 Nov 14, 2025
010569b
Added optional query param to return ImagePyramid proto as JSON (will…
Antimatter543 Nov 14, 2025
8287a8e
Fixed the imagepyramid generator to handle, load and save multipage T…
Antimatter543 Nov 14, 2025
cc4d9d5
Error handling works better now, API returns a 404 not found if page/…
Antimatter543 Nov 14, 2025
0a3141d
Constructed a semi-working CLI tool for generating pyramids from tiff…
Antimatter543 Nov 17, 2025
28a148f
Added initial working version of polygon generation code rewritten in…
Nov 17, 2025
32e22bb
CLI tool now generates scan ID and image into mongodb locally. Output…
Antimatter543 Nov 17, 2025
17ff99e
Clusters match
Nov 17, 2025
6a0c83d
CLI tool uses DzSave to autogenerate file format in a standard method…
Antimatter543 Nov 18, 2025
1b5f640
Refactoring API to work with DZSaves locally
Antimatter543 Nov 19, 2025
86d7944
Selector works as expected
Antimatter543 Nov 19, 2025
0e32f43
Updated data formats
Antimatter543 Nov 19, 2025
c07dfab
Import.go from bigimage has basic functionality now
Antimatter543 Nov 19, 2025
355d2ff
The BigImage tiff/pyramid generation formats now work until S3's copy…
Antimatter543 Nov 19, 2025
1ba1a1f
Cleanup of non-relevant folders and updating CLI tools/go modules
Antimatter543 Nov 19, 2025
99a4238
Minor fixes - pyramid tif now saves as tif, and fixed erronous additi…
Antimatter543 Nov 20, 2025
8efa034
Copy to Bucket can now preserve structure; does so for pyramid folders
Antimatter543 Nov 20, 2025
4537786
Data format update and commented out Pyramid API so build compiles
Antimatter543 Nov 20, 2025
d3f3a38
Fixing server-side polygon generation, use latest data formats
Nov 20, 2025
45c7bb0
Merge bigimage
Nov 20, 2025
2423e45
VIPS library using locally generated lib wrapper, changed tile size, …
Nov 21, 2025
a84703c
Updating import so that SetPMCData now has intermediary structure as …
Antimatter543 Nov 21, 2025
abea461
Generates a pyramid for each page of original TIFF, and each page is …
Antimatter543 Nov 21, 2025
352adda
TIF files that need to be pyramided now get uploaded to S3 bucket one…
Antimatter543 Nov 21, 2025
22db9fa
Merged polygen and bigimage together - Doesn't compile because of a m…
Antimatter543 Nov 21, 2025
8df258a
Modified pyramid generation/uploader to save one pyramid that's refer…
Nov 25, 2025
5373741
Fixing associated scan ids was empty for big images
Nov 25, 2025
14e083b
Fixing image pyramid websocket get
Nov 25, 2025
6a682cc
Added TileSize to Image Pyramid generation
Antimatter543 Nov 26, 2025
b124342
Refactored verify pyramid structure
Antimatter543 Nov 26, 2025
d0b58c7
Generated some test data to be used for pyramid testing
Antimatter543 Nov 26, 2025
89c1a13
Added Tests for import; specifically making sure import throw an erro…
Antimatter543 Nov 26, 2025
1730072
Count RGBU images more accurately - tif images may now be pyramids too
Nov 27, 2025
d960114
Get image HTTP endpoint now returns top pyramid layer if pyramid imag…
Nov 27, 2025
781a5d3
Fixing default image name for pyramids
Nov 27, 2025
fa7c6bf
Fixing pyramid import reliability if reimporting, default image choice
Nov 27, 2025
c4b7267
Merged, and updated verify pyramids to check each layer
Nov 27, 2025
ff303dd
Added current TestPyramid functionality
Antimatter543 Nov 27, 2025
4ecc8b3
Fixing pyramid import logs
Nov 27, 2025
93c4745
Fixing default image existance/upload check, was failing in case of p…
Nov 27, 2025
46ad6a7
Part of last checkin
Nov 27, 2025
b772aae
Fixing pyramid temp cleanup was using wrong path
Nov 27, 2025
2c387f6
Merge branch 'feature/bigimage' of https://github.com/pixlise/core in…
Nov 27, 2025
c62a038
Some warnings cleaned up, added tile size/tile x and y dir sizing and…
Dec 1, 2025
5eb17da
Fixing compile
Dec 1, 2025
ab0ba7a
Image pyramid import and access now correctly uses image format, and …
Dec 2, 2025
d604aa7
Code cleanup and working towards reading TIF tags unimpeded by librar…
Dec 5, 2025
8db9526
Added ability to control mongo debug output, it was flooding vs code …
Dec 17, 2025
96d68bd
Added ability to create user-defined blank scans using WS msging. Thi…
Dec 17, 2025
c7e6ade
Better logging of GET requests to help diagnose tile/pyramid level re…
Dec 17, 2025
ec64e77
Renamed WDS import to SEM
Feb 5, 2026
e0019b0
Merge branch 'feature/bigimage' into feature/auscope
Feb 5, 2026
ed86343
Renaming WDS to SEM import code
Feb 5, 2026
dced453
Renamed SEM to user-defined to match UI, as this really is now a user…
Feb 5, 2026
ec3f858
Added image PUT HTTP endpoint handling for multi-part image and resum…
Feb 9, 2026
200fa78
Got image pyramid generation, s3 upload working for large images
Feb 9, 2026
626f5e9
Attempt to get compile working
Feb 10, 2026
d240fd7
Attempt to get compile working
Feb 10, 2026
926123a
Removed bigimage aka pyramid import, as we now can upload images and …
Feb 10, 2026
fe8a573
Attempt to fix build
Feb 10, 2026
fe17d76
Build issue
Feb 10, 2026
8432442
Makefile testing
Feb 10, 2026
028ac6e
Replacing generated vips wrapper, using libvips 816 and the prebuilt …
Feb 10, 2026
cdaec01
Fixing build: docker container now installs vips-dev, generates vips …
Feb 10, 2026
ff89b28
Forgot to add new genvips.sh
Feb 10, 2026
f90b833
Turn off TLS for mongo as experiment
Feb 10, 2026
ff48fdf
Fixing tests
Feb 13, 2026
7a774eb
Fixed test
Feb 13, 2026
c6324ab
Use mongo 8 in local DB and build pipeline test DBs
Feb 13, 2026
865d89b
Removing unused config vars
Mar 11, 2026
d1e4d60
Completed scan polygon/footprint generation/messaging, test passes, v…
Mar 12, 2026
d21730f
use latest data format
Mar 12, 2026
26f9853
Attempt to fix tests
Mar 12, 2026
5aaa32c
Trying to fix tests
Mar 12, 2026
d538165
Test fixing
Mar 12, 2026
bae4167
Fixing tests
Mar 12, 2026
84e2b32
Fixing tests
Mar 12, 2026
fde303f
Fixing tests
Mar 12, 2026
bdc9494
Fixing tests
Mar 12, 2026
bc542c0
Fixing tests
Mar 12, 2026
638d533
Fixing tests
Mar 12, 2026
f6a7777
Fixing tests
Mar 12, 2026
2c2e685
Fixing tests
Mar 12, 2026
ffb79d7
Fixing tests
Mar 12, 2026
29bd997
Fixing tests
Mar 12, 2026
bfcdf2d
Fixing tests
Mar 12, 2026
c730908
Attempt to run tests in docker
Mar 12, 2026
bcbc7be
Test simple build
Mar 12, 2026
f879742
Test simple build
Mar 12, 2026
78c85b5
Test simple build 3
Mar 12, 2026
0e3db4b
Test simple build 4
Mar 12, 2026
07147be
Removed trello updating, we stopped using trello like a year ago, oops
Mar 12, 2026
a988cf3
Show ubuntu version in build
Mar 12, 2026
80a366b
Setup vips
Mar 12, 2026
5e4f030
Setup vips 2
Mar 12, 2026
5b8492d
Setup vips 3
Mar 12, 2026
9964dad
Setup vips 4
Mar 12, 2026
ed4aa2e
Setup vips 5
Mar 12, 2026
d8c028c
Setup vips 6 -qq
Mar 12, 2026
5e51972
Setup vips 7
Mar 12, 2026
20644ac
Use older vipsgen
Mar 12, 2026
358a907
Checking vips output
Mar 12, 2026
8eb053b
Checking vips output 2
Mar 12, 2026
cda1dad
Checking vips output 3
Mar 12, 2026
49db415
use generated vips thing
Mar 13, 2026
ca77984
use generated vips thing 2
Mar 13, 2026
3e7fd45
Test docker build
Mar 13, 2026
3942a01
Test docker build 2
Mar 13, 2026
5bd4c6f
Removed Getpoint calls
Mar 13, 2026
47c4126
Clean up build
Mar 13, 2026
979ba71
Build cleanup
Mar 13, 2026
88b67bf
Fixing integration tests
Mar 13, 2026
8b64d0d
Fixing integration test for 64bit image file sizes
Mar 13, 2026
3dd0667
Clean up build
Mar 13, 2026
5cdebaf
Clean up build 2
Mar 13, 2026
f005641
Clean up build 3
Mar 13, 2026
8bac9f2
Polygon server-side generation updated, sending scan points and beam …
Mar 13, 2026
59da3c0
Fixing image upload resuming and error detection on mongo db connect …
Mar 24, 2026
f9ed5b5
Fixes for multi-part image upload, and wrote test suite for it
Mar 24, 2026
900d001
Fixed multipart image upload test
Mar 24, 2026
de0302e
Check image exists before accepting uploaded chunks
Mar 24, 2026
7ff7b94
Fixing tests for image upload due to changed error handling
Mar 24, 2026
05f943a
Delete temp multipart image uploads when done
Mar 24, 2026
aa74839
Fixed nil access error when scan ownership is not set and scan list i…
Mar 26, 2026
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
4 changes: 3 additions & 1 deletion .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: Bump Version
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
on:
pull_request:
types:
Expand All @@ -8,7 +10,7 @@ on:
- development
jobs:
tag:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ env:
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

jobs:
prerelease:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/features.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ env:
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

jobs:
slug:
Expand All @@ -28,7 +29,7 @@ jobs:
submodules: true
- name: GitHub Slug Action
uses: rlespinasse/github-slug-action@v4.4.0
feature:
step:
uses: ./.github/workflows/main.yml
needs: slug
with:
Expand Down
83 changes: 56 additions & 27 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ env:
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

jobs:
version:
Expand All @@ -26,8 +27,8 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: GitHub Slug Action
uses: rlespinasse/github-slug-action@v4.4.0
# - name: GitHub Slug Action
# uses: rlespinasse/github-slug-action@v4.4.0
- name: version
uses: paulhatch/semantic-version@v5.0.3
id: version
Expand All @@ -51,23 +52,10 @@ jobs:
# The output method used to generate list of users, 'csv' or 'json'.
user_format_type: "csv"

test:
unit-test:
# NOTE: ubuntu-latest equates to Description: Ubuntu 24.04.3 LTS on 12 MAR 2026 (while I'm running Ubuntu 25.10)
runs-on: ubuntu-latest
needs: [version]
# services:
# mongodb:
# image: mongo:4.0.28
# #env:
# #MONGO_INITDB_ROOT_USERNAME: admin
# #MONGO_INITDB_ROOT_PASSWORD: admin
# #MONGO_INITDB_DATABASE: APP-DATABASE
# ports:
# - 27017:27017
# options: >-
# --health-cmd mongo
# --health-interval 10s
# --health-timeout 5s
# --health-retries 5
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -76,19 +64,55 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: "1.22.0"
go-version: "1.24.5"
- name: Setup VIPS lib
run: |
echo "Installing libvips quietly..."
sudo apt-get update
sudo apt-get -y -qq install libvips-dev
sudo apt list --installed | grep libvips
echo "Running genvips..."
./genvips.sh
- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.10.0
with:
mongodb-version: 4.0.28
mongodb-replica-set: test
mongodb-version: 8
mongodb-replica-set: testu
mongodb-port: 27017
- name: Unit Test
run: make unittest
env:
AWS_DEFAULT_REGION: us-east-1
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

integration-test:
# NOTE: ubuntu-latest equates to Description: Ubuntu 24.04.3 LTS on 12 MAR 2026 (while I'm running Ubuntu 25.10)
runs-on: ubuntu-latest
needs: [version]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: "1.24.5"
- name: Setup VIPS lib
run: |
echo "Installing libvips quietly..."
sudo apt-get update
sudo apt-get -y -qq install libvips-dev
sudo apt list --installed | grep libvips
echo "Running genvips..."
./genvips.sh
- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.10.0
with:
mongodb-version: 8
mongodb-replica-set: testi
mongodb-port: 27017
- name: Integration Test
# NOTE: integration-test-config.json must have EnvironmentName at the end, so we can append a suffix
# to it, to make DB names unique for builds to not clash!
Expand All @@ -101,7 +125,7 @@ jobs:
sleep 5
cd ./internal/cmd-line-tools/api-integration-test
echo "unittest_${UNIX_MS}"
./tester -apiHost localhost:8080 -envName "unittest_${UNIX_MS}" -datasetBucket "integration-test-data-pixlise" -usersBucket "integration-test-users-pixlise" -auth0Domain ${{ secrets.PIXLISE_API_TEST_AUTH0_DOMAIN }} -auth0ClientId ${{ secrets.PIXLISE_API_TEST_AUTH0_CLIENT_ID }} -auth0Audience "pixlise-backend" -testType "ci" -test1Username "test1@pixlise.org" -test1Password ${{ secrets.TEST_USER_1_PASSWORD }} -test2Username "test2@pixlise.org" -test2Password ${{ secrets.TEST_USER_2_PASSWORD }}
./tester -apiHost localhost:8080 -envName "unittest_${UNIX_MS}" -datasetBucket "integration-test-data-pixlise" -usersBucket "integration-test-users-pixlise" -jobsBucket "integration-test-jobs-pixlise" -auth0Domain ${{ secrets.PIXLISE_API_TEST_AUTH0_DOMAIN }} -auth0ClientId ${{ secrets.PIXLISE_API_TEST_AUTH0_CLIENT_ID }} -auth0Audience "pixlise-backend" -testType "ci" -test1Username "test1@pixlise.org" -test1Password ${{ secrets.TEST_USER_1_PASSWORD }} -test2Username "test2@pixlise.org" -test2Password ${{ secrets.TEST_USER_2_PASSWORD }}
env:
AWS_DEFAULT_REGION: us-east-1
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand All @@ -110,7 +134,8 @@ jobs:
PIXLISE_CONFIG_Auth0ManagementClientID: ${{ secrets.PIXLISE_API_MGMT_AUTH0_CLIENT_ID }}
PIXLISE_CONFIG_Auth0ManagementSecret: ${{ secrets.PIXLISE_API_MGMT_AUTH0_SECRET }}
PIXLISE_CONFIG_ZenodoAccessToken: ${{ secrets.ZENODO_ACCESS_TOKEN }}
build:

build-lambdas:
runs-on: ubuntu-latest
needs: [version]
env:
Expand All @@ -131,14 +156,16 @@ jobs:
echo "BUILDING VERSION ${{ needs.version.outputs.version }}"
echo "Tag name: ${{ needs.version.outputs.version_tag }}"
- name: Build Package
run: BUILD_VERSION="${{ needs.version.outputs.version }}" make build-linux
run: |
mkdir -p _out
BUILD_VERSION="${{ needs.version.outputs.version }}" make build-linux-aux
- name: Copy to S3 Archive
run: |
cd _out
rm pixlise-api-linux
#rm pixlise-api-linux
# WAS USING: wget https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem
wget https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem
mkdir dataimport integrationtest
mkdir -p dataimport integrationtest
zip -q dataimport/dataimport-linux-${{ needs.version.outputs.version }}.zip global-bundle.pem bootstrap
rm bootstrap
# mkdir test-data
Expand All @@ -148,11 +175,11 @@ jobs:
# zip -q importtest/importtest-linux-${{ needs.version.outputs.version }}.zip importtest-linux test-data/000000001-21-10-2022-15-37-00.zip
# rm importtest-linux
mv job-runner job-runner-${{ needs.version.outputs.version }}
mkdir job-runner
mkdir -p job-runner
cp job-runner-${{ needs.version.outputs.version }} ./job-runner
aws s3 cp . s3://corestack-buildartifactsf774a77d-105on4pno9pjm/ --recursive --region us-east-1

docker:
build-api-docker:
needs: [version]
runs-on: ubuntu-latest
permissions:
Expand Down Expand Up @@ -197,6 +224,7 @@ jobs:
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: type=raw,value=${{ needs.version.outputs.version }}

# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
Expand All @@ -210,6 +238,7 @@ jobs:
build-args: |
VERSION=${{ needs.version.outputs.version }}
GITHUB_SHA=${{ needs.version.outputs.github_sha_short }}

# Sign the resulting Docker image digest except on PRs.
# This will only write to the public Rekor transparency log when the Docker
# repository is public to avoid leaking data. If you would like to publish
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

jobs:
release:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ env:
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

jobs:
staging:
Expand Down
20 changes: 0 additions & 20 deletions .github/workflows/update-trello.yml

This file was deleted.

13 changes: 3 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,13 @@ __debug_bin.exe

# Build output from make for exes, coverage reports, etc
/_out/
/vips/
#generated-protos/
api/ws/wsMessage.go
/OLDCODE
auth0dummy-LOCAL-ONLY.go-
/local-mongo/dbseed/from-prod-Jan2024/
/local-mongo/dbseed/migrated/
/local-mongo/dbseed/migration-source/
/local-mongo/dbseed/old/
/local-mongo/dbseed/*.json
/local-mongo/dbseed/*.sh
/local-mongo/dbseed/json/
/local-mongo/3repl/

db-restore/
mongo-db-local-*/
mongo-db-pixlise-*/

local-api-config*.json
local-api-config-unittest.json
Expand Down
23 changes: 16 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,39 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
FROM golang:1.22-alpine AS builder

FROM golang:1.24-alpine AS builder

ARG VERSION
ARG GITHUB_SHA

RUN apk --no-cache add ca-certificates libc6-compat wget make bash
RUN apk add --no-cache ca-certificates libc6-compat wget make bash build-base pkgconfig vips-dev

COPY . /build
ENV CGO_ENABLED=1
ENV BUILD_VERSION=${VERSION}
ENV GITHUB_SHA=${GITHUB_SHA}

RUN cd /build && ./genvips.sh
RUN cd /build && make build-linux-api

RUN cd /build && export BUILD_VERSION=${VERSION} && export GITHUB_SHA=${GITHUB_SHA} && make build-linux

FROM alpine:latest

RUN apk --no-cache add ca-certificates libc6-compat wget
WORKDIR /root
# Copy the Pre-built binary file from the previous stage

# Copy the Pre-built binary file from the previous stage
COPY --from=builder /build/_out/pixlise-api-linux ./
#COPY ./_out/pixlise-api-linux ./
#RUN ls -al

COPY beam-tool/BGT ./
COPY beam-tool/Geometry_PIXL_EM_Landing_25Jan2021.csv ./
#RUN ls -al

RUN apk add --no-cache vips-dev

RUN chmod +x ./pixlise-api-linux && wget https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem -O global-bundle.pem
RUN chmod +x ./BGT

# Expose port 8080 to the outside world
EXPOSE 8080

Expand Down
28 changes: 18 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,42 @@ lint: ## Lint the files
golint ${PKG_LIST}

unittest: ## Run unittests
pwd
cd ..
mkdir -p _out
go install github.com/favadi/protoc-go-inject-tag@latest
go run ./data-formats/codegen/main.go -protoPath ./data-formats/api-messages/ -goOutPath ./api/ws/
protoc-go-inject-tag -remove_tag_comment -input="./generated-protos/*.pb.go"
go test -v ./...
go test ./...

integrationtest:
mkdir -p _out
echo "version: ${BUILD_VERSION}"
echo "sha: ${GITHUB_SHA}"
GOOS=linux GOARCH=amd64 go build -ldflags "-X 'github.com/pixlise/core/v4/api/services.ApiVersion=${BUILD_VERSION}' -X 'github.com/pixlise/core/v4/api/services.GitHash=${GITHUB_SHA}'" -v -o ./api-service ./internal/api
GOOS=linux GOARCH=amd64 go build -ldflags "-X 'github.com/pixlise/core/v4/api/services.ApiVersion=${BUILD_VERSION}' -X 'github.com/pixlise/core/v4/api/services.GitHash=${GITHUB_SHA}'" -v -o ./internal/cmd-line-tools/api-integration-test/tester ./internal/cmd-line-tools/api-integration-test
go install github.com/favadi/protoc-go-inject-tag@latest
go run ./data-formats/codegen/main.go -protoPath ./data-formats/api-messages/ -goOutPath ./api/ws/
protoc-go-inject-tag -remove_tag_comment -input="./generated-protos/*.pb.go"
GOOS=linux GOARCH=amd64 go build -ldflags "-X 'github.com/pixlise/core/v4/api/services.ApiVersion=${BUILD_VERSION}' -X 'github.com/pixlise/core/v4/api/services.GitHash=${GITHUB_SHA}'" -o ./api-service ./internal/api
GOOS=linux GOARCH=amd64 go build -ldflags "-X 'github.com/pixlise/core/v4/api/services.ApiVersion=${BUILD_VERSION}' -X 'github.com/pixlise/core/v4/api/services.GitHash=${GITHUB_SHA}'" -o ./internal/cmd-line-tools/api-integration-test/tester ./internal/cmd-line-tools/api-integration-test

codegen:
./genproto.sh checkgen

build: build-linux build-mac
build: build-linux-api build-linux-aux build-mac

build-linux-api:
mkdir -p _out
echo "version: ${BUILD_VERSION}"
echo "sha: ${GITHUB_SHA}"

GOOS=linux GOARCH=amd64 go run ./data-formats/codegen/main.go -protoPath ./data-formats/api-messages/ -goOutPath ./api/ws/
GOOS=linux GOARCH=amd64 go build -ldflags "-X 'github.com/pixlise/core/v4/api/services.ApiVersion=${BUILD_VERSION}' -X 'github.com/pixlise/core/v4/api/services.GitHash=${GITHUB_SHA}'" -o ./_out/pixlise-api-linux ./internal/api

build-linux:
build-linux-aux:
mkdir -p _out
echo "version: ${BUILD_VERSION}"
echo "sha: ${GITHUB_SHA}"
GOOS=linux GOARCH=amd64 go run ./data-formats/codegen/main.go -protoPath ./data-formats/api-messages/ -goOutPath ./api/ws/
GOOS=linux GOARCH=amd64 go build -ldflags "-X 'github.com/pixlise/core/v4/api/services.ApiVersion=${BUILD_VERSION}' -X 'github.com/pixlise/core/v4/api/services.GitHash=${GITHUB_SHA}'" -v -o ./_out/pixlise-api-linux ./internal/api
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-X 'github.com/pixlise/core/v4/api/services.ApiVersion=${BUILD_VERSION}' -X 'github.com/pixlise/core/v4/api/services.GitHash=${GITHUB_SHA}'" -v -o ./_out/bootstrap ./internal/lambdas/data-import
GOOS=linux GOARCH=amd64 go build -v -o ./_out/job-runner ./internal/cmd-line-tools/job-runner
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-X 'github.com/pixlise/core/v4/api/services.ApiVersion=${BUILD_VERSION}' -X 'github.com/pixlise/core/v4/api/services.GitHash=${GITHUB_SHA}'" -o ./_out/bootstrap ./internal/lambdas/data-import
GOOS=linux GOARCH=amd64 go build -o ./_out/job-runner ./internal/cmd-line-tools/job-runner
# GOOS=linux GOARCH=amd64 go build -v -o ./_out/importtest-linux ./internal/cmdline-tools/import-integration-test
# GOOS=linux GOARCH=amd64 go build -v -o ./_out/integrationtest-linux ./internal/cmdline-tools/api-integration-test

Expand Down
7 changes: 2 additions & 5 deletions api/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,9 @@ type APIConfig struct {
PiquantDockerImage string // PIQUANT docker image to use to run a job
PiquantJobsBucket string // PIQUANT job scratch drive

PosterImage string
QuantDestinationPackage string

QuantExecutor string
QuantNamespace string // Used for running large multi-node quants

QuantObjectType string

SentryEndpoint string

UsersBucket string
Expand Down Expand Up @@ -121,6 +116,8 @@ type APIConfig struct {
RestoreEnabled bool

ImpersonateEnabled bool

MongoDebug bool
}

func homeDir() string {
Expand Down
Loading
Loading