Skip to content

Commit

Permalink
Merge pull request #5 from moka-guys/v2.0.0_ammendment
Browse files Browse the repository at this point in the history
V2.0.0 ammendment (#5)
  • Loading branch information
RachelDuffin authored Jun 7, 2024
2 parents 0394332 + 0f455a4 commit f86469d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 12 deletions.
23 changes: 12 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
BUILD := $(shell git log -1 --pretty=%h)
BUILD := $(shell git describe --tags --always --dirty)
DIR := $(shell pwd)
TEST_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))test

# define image names
APP := scidb
REGISTRY := fhprs
APP := fhprs
REGISTRY := seglh

# build tags
IMG := $(REGISTRY)/$(APP)
IMG_VERSIONED := $(IMG):$(BUILD)
IMG_LATEST := $(IMG):latest

.PHONY: push build tag test
.PHONY: push build tag test version cleanbuild

.PHONY: build

push: build tag
push: build
docker push $(IMG_VERSIONED)
docker push $(IMG_LATEST)

build:
docker build -t $(IMG_VERSIONED) .

tag:
build: version
docker buildx build --platform linux/amd64 -t $(IMG_VERSIONED) . || docker build -t $(IMG_VERSIONED) .
docker tag $(IMG_VERSIONED) $(IMG_LATEST)
docker save $(IMG_VERSIONED) | gzip > $(DIR)/$(REGISTRY)-$(APP):$(BUILD).tar.gz

test: build
echo "Incomplete VCF (positions missing):"
docker run -it --rm -v $(TEST_DIR):/resources $(IMG_VERSIONED) /resources/incomplete.vcf
echo "Complete VCF (all variant positions covered):"
docker run -it --rm -v $(TEST_DIR):/resources $(IMG_VERSIONED) /resources/complete.vcf

cleanbuild:
docker buildx build --platform linux/amd64 --no-cache -t $(IMG_VERSIONED) .
12 changes: 11 additions & 1 deletion README → README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ Code adopted from Bristol and modernised for python3 and pyVCF. Uses build 38 ge
## Docker image build
`make build`

To build the docker image from scratch, using no cached layers:

`make cleanbuild`

## Docker image upload
To upload the built docker image to DockerHub:

`make push`

## Test
This runs against the two files with all or paritally missing positions
This runs against the two files with all or partially missing positions

`make test`

0 comments on commit f86469d

Please sign in to comment.