Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
43 changes: 41 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export SHELL:=/bin/bash
export SHELLOPTS:=$(if $(SHELLOPTS),$(SHELLOPTS):)pipefail:errexit

USE_NIX := false
# https://stackoverflow.com/questions/4122831/disable-make-builtin-rules-and-variables-from-inside-the-make-file
MAKEFLAGS += --no-builtin-rules
.SUFFIXES:
Expand Down Expand Up @@ -158,7 +159,9 @@ ui/dist/app/index.html: $(shell find ui/src -type f && find ui -maxdepth 1 -type
JOBS=max yarn --cwd ui build

$(GOPATH)/bin/staticfiles:
ifneq ($(USE_NIX), true)
go install bou.ke/staticfiles@dd04075
endif

ifeq ($(STATIC_FILES),true)
server/static/files.go: $(GOPATH)/bin/staticfiles ui/dist/app/index.html
Expand Down Expand Up @@ -244,8 +247,8 @@ argoexec-image:
.PHONY: codegen
codegen: types swagger manifests $(GOPATH)/bin/mockery docs/fields.md docs/cli/argo.md
go generate ./...
make --directory sdks/java generate
make --directory sdks/python generate
make --directory sdks/java USE_NIX=$(USE_NIX) generate
make --directory sdks/python USE_NIX=$(USE_NIX) generate

.PHONY: check-pwd
check-pwd:
Expand Down Expand Up @@ -275,27 +278,49 @@ swagger: \


$(GOPATH)/bin/mockery:
ifneq ($(USE_NIX), true)
go install github.com/vektra/mockery/v2@v2.10.0
endif
$(GOPATH)/bin/controller-gen:
ifneq ($(USE_NIX), true)
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.4.1
endif
$(GOPATH)/bin/go-to-protobuf:
ifneq ($(USE_NIX), true)
go install k8s.io/code-generator/cmd/go-to-protobuf@v0.21.5
endif
$(GOPATH)/src/github.com/gogo/protobuf:
ifneq ($(USE_NIX), true)
[ -e $(GOPATH)/src/github.com/gogo/protobuf ] || git clone --depth 1 https://github.com/gogo/protobuf.git -b v1.3.2 $(GOPATH)/src/github.com/gogo/protobuf
endif
$(GOPATH)/bin/protoc-gen-gogo:
ifneq ($(USE_NIX), true)
go install github.com/gogo/protobuf/protoc-gen-gogo@v1.3.2
endif
$(GOPATH)/bin/protoc-gen-gogofast:
ifneq ($(USE_NIX), true)
go install github.com/gogo/protobuf/protoc-gen-gogofast@v1.3.2
endif
$(GOPATH)/bin/protoc-gen-grpc-gateway:
ifneq ($(USE_NIX), true)
go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway@v1.16.0
endif
$(GOPATH)/bin/protoc-gen-swagger:
ifneq ($(USE_NIX), true)
go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger@v1.16.0
endif
$(GOPATH)/bin/openapi-gen:
ifneq ($(USE_NIX), true)
go install k8s.io/kube-openapi/cmd/openapi-gen@v0.0.0-20220124234850-424119656bbf
endif
$(GOPATH)/bin/swagger:
ifneq ($(USE_NIX), true)
go install github.com/go-swagger/go-swagger/cmd/swagger@v0.28.0
endif
$(GOPATH)/bin/goimports:
ifneq ($(USE_NIX), true)
go install golang.org/x/tools/cmd/goimports@v0.1.7
endif

/usr/local/bin/clang-format:
ifeq (, $(shell which clang-format))
Expand Down Expand Up @@ -449,7 +474,9 @@ dist/argosay:
cp test/e2e/images/argosay/v2/argosay dist/

$(GOPATH)/bin/goreman:
ifneq ($(USE_NIX), true)
go install github.com/mattn/goreman@v0.3.11
endif

.PHONY: start
ifeq ($(RUN_MODE),local)
Expand Down Expand Up @@ -491,7 +518,9 @@ ifeq ($(RUN_MODE),local)
endif

$(GOPATH)/bin/stern:
ifneq ($(USE_NIX), true)
go install github.com/stern/stern@latest
endif

.PHONY: logs
logs: $(GOPATH)/bin/stern
Expand Down Expand Up @@ -612,31 +641,41 @@ docs/cli/argo.md: $(CLI_PKGS) go.sum server/static/files.go hack/cli/main.go
# docs

/usr/local/bin/mdspell:
ifneq ($(USE_NIX), true)
npm i -g markdown-spellcheck
endif

.PHONY: docs-spellcheck
docs-spellcheck: /usr/local/bin/mdspell
# check docs for spelling mistakes
mdspell --ignore-numbers --ignore-acronyms --en-us --no-suggestions --report $(shell find docs -name '*.md' -not -name upgrading.md -not -name fields.md -not -name upgrading.md -not -name executor_swagger.md -not -path '*/cli/*')

/usr/local/bin/markdown-link-check:
ifneq ($(USE_NIX), true)
npm i -g markdown-link-check
endif

.PHONY: docs-linkcheck
docs-linkcheck: /usr/local/bin/markdown-link-check
# check docs for broken links
ifneq ($(USE_NIX), true)
markdown-link-check -q -c .mlc_config.json $(shell find docs -name '*.md' -not -name fields.md -not -name executor_swagger.md)
endif

/usr/local/bin/markdownlint:
ifneq ($(USE_NIX), true)
npm i -g markdownlint-cli
endif

.PHONY: docs-lint
docs-lint: /usr/local/bin/markdownlint
# lint docs
markdownlint docs --fix --ignore docs/fields.md --ignore docs/executor_swagger.md --ignore docs/cli --ignore docs/walk-through/the-structure-of-workflow-specs.md

/usr/local/bin/mkdocs:
ifneq ($(USE_NIX), true)
python -m pip install mkdocs==1.2.4 mkdocs_material==8.1.9 mkdocs-spellcheck==0.2.1
endif

.PHONY: docs
docs: /usr/local/bin/mkdocs \
Expand Down
7 changes: 6 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,12 @@
src = pkgs.fetchFromGitHub {
owner = "vektra";
repo = "mockery";
rev = "v${version}";
rev = "v${version}"; # Look 4 lines below this one!!!
sha256 = "sha256-udzBhCkESd/5GEJf9oVz0nAQDmsk4tenvDP6tbkBIao=";
};
ldflags = [
"-X github.com/vektra/mockery/v2/pkg/config.SemVer=v${version}" # IMPERATIVE TO LOOK AT SOURCE CODE WHEN UPDATING VERSION!!!
];
doCheck = false;
vendorHash = "sha256-iuQx2znOh/zsglnJma7Y4YccVArSFul/IOaNh449SpA=";
};
Expand Down Expand Up @@ -315,6 +318,7 @@
clang-tools
protobuf
myyarn
diffutils
];
};

Expand Down Expand Up @@ -344,6 +348,7 @@
clang-tools
protobuf
myyarn
diffutils
];
enterShell = ''
unset GOPATH;
Expand Down
10 changes: 9 additions & 1 deletion sdks/java/Makefile
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
USE_NIX := false
GIT_TAG := $(shell git describe --exact-match --tags --abbrev=0 2> /dev/null || echo untagged)
ifeq ($(GIT_TAG),untagged)
# "SNAPSHOT" is "latest" for Java
Expand All @@ -19,6 +20,12 @@ publish: generate
$(MVN) deploy -DskipTests -DaltDeploymentRepository=github::default::https://maven.pkg.github.com/argoproj/argo-workflows

generate:
ifeq ($(USE_NIX), true)
chmod -R 777 client || exit 0
rm -rf $(WD)
nix build
cp -r result/data/client ./client
else
rm -Rf $(WD)
mkdir -p $(WD)
cp settings.xml $(WD)/settings.xml
Expand Down Expand Up @@ -71,6 +78,7 @@ generate:
$(CHOWN) $(WD) || sudo $(CHOWN) $(WD)
# adding kubernetes-client
cd client && sed 's/<dependencies>/<dependencies><dependency><groupId>io.kubernetes<\/groupId><artifactId>client-java<\/artifactId><version>14.0.1<\/version><\/dependency>/g' pom.xml > tmp && mv tmp pom.xml
endif

client/pom.xml: generate

Expand All @@ -80,4 +88,4 @@ install: client/pom.xml
test:
../../hack/access-token.sh init
kubectl delete wf --all
env ARGO_TOKEN="`../../hack/access-token.sh get`" mvn -f tests test
env ARGO_TOKEN="`../../hack/access-token.sh get`" mvn -f tests test
99 changes: 99 additions & 0 deletions sdks/java/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading