1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: Apache-2.0
5 # Use bash, and run all lines in each recipe as one shell command
9 APP_NAME?=arvados-workbench2
11 # VERSION uses all the above to produce X.Y.Z.timestamp
12 # something in the lines of 1.2.0.20180612145021, this will be the package version
13 # it can be overwritten when invoking make as in make packages VERSION=1.2.0
14 VERSION?=$(shell ./version-at-commit.sh HEAD)
16 # ITERATION is the package iteration, intended for manual change if anything non-code related
17 # changes in the package. (i.e. example config files externally added
20 TARGETS?="centos7 debian8 debian9 debian10 ubuntu1404 ubuntu1604 ubuntu1804"
22 DESCRIPTION=Arvados Workbench2 - Arvados is a free and open source platform for big data science.
23 MAINTAINER=Arvados Package Maintainers <packaging@arvados.org>
25 # DEST_DIR will have the build package copied.
26 DEST_DIR=/var/www/arvados-workbench2/workbench2/
29 DEB_FILE=$(APP_NAME)_$(VERSION)-$(ITERATION)_amd64.deb
32 RPM_FILE=$(APP_NAME)-$(VERSION)-$(ITERATION).x86_64.rpm
34 export WORKSPACE?=$(shell pwd)
36 .PHONY: help clean* yarn-install test build packages packages-with-version
40 @echo >&2 "There is no default make target here. Did you mean 'make test'?"
42 @echo >&2 "More info:"
43 @echo >&2 " Installing --> http://doc.arvados.org/install"
44 @echo >&2 " Developing/contributing --> https://dev.arvados.org"
45 @echo >&2 " Project home --> https://arvados.org"
50 rm -f $(WORKSPACE)/*.deb
53 rm -f $(WORKSPACE)/*.rpm
56 rm -rf $(WORKSPACE)/node_modules
58 clean: clean-rpm clean-deb clean-node-modules
63 unit-tests: yarn-install
64 yarn test --no-watchAll --bail --ci
66 integration-tests: yarn-install
67 yarn run cypress install
68 $(WORKSPACE)/tools/run-integration-tests.sh
70 test: unit-tests integration-tests
73 VERSION=$(VERSION) yarn build
81 --iteration "$(ITERATION)" \
82 --vendor="The Arvados Authors" \
83 --maintainer="$(MAINTAINER)" \
84 --url="https://arvados.org" \
85 --license="GNU Affero General Public License, version 3.0" \
86 --description="$(DESCRIPTION)" \
87 --config-files="etc/arvados/workbench2/workbench2.example.json" \
88 $(WORKSPACE)/build/=$(DEST_DIR)
96 --iteration "$(ITERATION)" \
97 --vendor="The Arvados Authors" \
98 --maintainer="$(MAINTAINER)" \
99 --url="https://arvados.org" \
100 --license="GNU Affero General Public License, version 3.0" \
101 --description="$(DESCRIPTION)" \
102 --config-files="etc/arvados/workbench2/workbench2.example.json" \
103 $(WORKSPACE)/build/=$(DEST_DIR)
105 copy: $(DEB_FILE) $(RPM_FILE)
106 for target in $(TARGETS) ; do \
107 mkdir -p packages/$$target
108 if [[ $$target =~ ^centos ]]; then
109 cp -p $(RPM_FILE) packages/$$target ; \
111 cp -p $(DEB_FILE) packages/$$target ; \
117 # use FPM to create DEB and RPM
120 workbench2-build-image:
121 docker build -t workbench2-build .