Skip to content

Commit

Permalink
Merge branch 'master' into micro-ocdav
Browse files Browse the repository at this point in the history
  • Loading branch information
kobergj committed Apr 4, 2022
2 parents d1d4794 + 95763dd commit a07a5bd
Show file tree
Hide file tree
Showing 206 changed files with 2,721 additions and 3,765 deletions.
6 changes: 0 additions & 6 deletions .bingo/Variables.mk
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@ $(GOLANGCI_LINT): $(BINGO_DIR)/golangci-lint.mod
@echo "(re)installing $(GOBIN)/golangci-lint-v1.43.0"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.43.0 "github.com/golangci/golangci-lint/cmd/golangci-lint"

GOX := $(GOBIN)/gox-v1.0.1
$(GOX): $(BINGO_DIR)/gox.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/gox-v1.0.1"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=gox.mod -o=$(GOBIN)/gox-v1.0.1 "github.com/mitchellh/gox"

HUGO := $(GOBIN)/hugo-v0.91.0
$(HUGO): $(BINGO_DIR)/hugo.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
Expand Down
5 changes: 0 additions & 5 deletions .bingo/gox.mod

This file was deleted.

6 changes: 0 additions & 6 deletions .bingo/gox.sum

This file was deleted.

2 changes: 0 additions & 2 deletions .bingo/variables.env
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ CALENS="${GOBIN}/calens-v0.2.0"

GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.43.0"

GOX="${GOBIN}/gox-v1.0.1"

HUGO="${GOBIN}/hugo-v0.91.0"

MOCKERY="${GOBIN}/mockery-v2.9.4"
Expand Down
4 changes: 2 additions & 2 deletions .drone.env
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# The test runner source for API tests
CORE_COMMITID=df1a1eb2816775fe9c202c50ec8e8a1e01ecb256
CORE_COMMITID=e285879a8a79e692497937ebf340bc6b9c925b4f
CORE_BRANCH=master

# The test runner source for UI tests
WEB_COMMITID=77faf9890974083c0c555fd83586c2448845b11d
WEB_COMMITID=805627004b9445c1f69ce9a6d824a18a2b83aca4
WEB_BRANCH=master
9 changes: 6 additions & 3 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ OC_CI_GOLANG = "owncloudci/golang:1.17"
OC_CI_NODEJS = "owncloudci/nodejs:%s"
OC_CI_PHP = "owncloudci/php:%s"
OC_CI_WAIT_FOR = "owncloudci/wait-for:latest"
OC_OC_TEST_MIDDLEWARE = "owncloud/owncloud-test-middleware:1.3.1"
OC_OC_TEST_MIDDLEWARE = "owncloud/owncloud-test-middleware:1.4.0"
OC_SERVER = "owncloud/server:10"
OC_UBUNTU = "owncloud/ubuntu:18.04"
OSIXIA_OPEN_LDAP = "osixia/openldap:latest"
Expand Down Expand Up @@ -1376,6 +1376,9 @@ def makeNodeGenerate(module):
{
"name": "generate nodejs",
"image": OC_CI_NODEJS % DEFAULT_NODEJS_VERSION,
"environment": {
"CHROMEDRIVER_SKIP_DOWNLOAD": "true", # install fails on arm and chromedriver is a test only dependency
},
"commands": [
"%s ci-node-generate" % (make),
],
Expand Down Expand Up @@ -1454,7 +1457,7 @@ def ocisServer(storage, accounts_hash_difficulty = 4, volumes = [], depends_on =
user = "33:33"
environment = {
# Keycloak IDP specific configuration
"PROXY_OIDC_ISSUER": "https://keycloak/auth/realmsowncloud",
"PROXY_OIDC_ISSUER": "https://keycloak/auth/realms/owncloud",
"WEB_OIDC_AUTHORITY": "https://keycloak/auth/realms/owncloud",
"WEB_OIDC_CLIENT_ID": "ocis-web",
"WEB_OIDC_METADATA_URL": "https://keycloak/auth/realms/owncloud/.well-known/openid-configuration",
Expand Down Expand Up @@ -2272,7 +2275,7 @@ def copyConfigs():
"commands": [
# ocis proxy config
"mkdir -p /etc/ocis",
"cp %s/ocis/proxy.json /etc/ocis/proxy.json" % (PARALLEL_DEPLOY_CONFIG_PATH),
"cp %s/ocis/proxy.yaml /etc/ocis/proxy.yaml" % (PARALLEL_DEPLOY_CONFIG_PATH),
# oc10 configs
"mkdir -p /etc/templates",
"mkdir -p /etc/pre_server.d",
Expand Down
116 changes: 104 additions & 12 deletions .make/release.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,118 @@ release-dirs:

# docker specific packaging flags
DOCKER_LDFLAGS += -X "$(OCIS_REPO)/ocis-pkg/config/defaults.BaseDataPathType=path" -X "$(OCIS_REPO)/ocis-pkg/config/defaults.BaseDataPathValue=/var/lib/ocis"
release-linux-docker-amd64: $(GOX) release-dirs
@$(GOX) -tags 'netgo $(TAGS)' -ldflags '-extldflags "-static" $(LDFLAGS) $(DOCKER_LDFLAGS)' -os 'linux' -arch 'amd64' -output '$(DIST)/binaries/$(EXECUTABLE)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME)

release-linux-docker-arm: $(GOX) release-dirs
@$(GOX) -tags 'netgo $(TAGS)' -ldflags '-extldflags "-static" $(LDFLAGS) $(DOCKER_LDFLAGS)' -os 'linux' -arch 'arm' -output '$(DIST)/binaries/$(EXECUTABLE)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME)
release-linux-docker-amd64: release-dirs
GOOS=linux \
GOARCH=amd64 \
go build \
-tags 'netgo $(TAGS)' \
-buildmode=pie \
-trimpath \
-ldflags '-extldflags "-static" $(LDFLAGS) $(DOCKER_LDFLAGS)' \
-o '$(DIST)/binaries/$(EXECUTABLE)-linux-amd64' \
./cmd/$(NAME)

release-linux-docker-arm64: $(GOX) release-dirs
@$(GOX) -tags 'netgo $(TAGS)' -ldflags '-extldflags "-static" $(LDFLAGS) $(DOCKER_LDFLAGS)' -os 'linux' -arch 'arm64' -output '$(DIST)/binaries/$(EXECUTABLE)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME)
release-linux-docker-arm: release-dirs
GOOS=linux \
GOARCH=arm \
go build \
-tags 'netgo $(TAGS)' \
-trimpath \
-ldflags '-extldflags "-static" $(LDFLAGS) $(DOCKER_LDFLAGS)' \
-o '$(DIST)/binaries/$(EXECUTABLE)-linux-arm' \
./cmd/$(NAME)

@# https://github.com/golang/go/issues/50405
@# -buildmode=pie not easily doable for arm

release-linux-docker-arm64: release-dirs
GOOS=linux \
GOARCH=arm64 \
go build \
-tags 'netgo $(TAGS)' \
-buildmode=pie \
-trimpath \
-ldflags '-extldflags "-static" $(LDFLAGS) $(DOCKER_LDFLAGS)' \
-o '$(DIST)/binaries/$(EXECUTABLE)-linux-arm64' \
./cmd/$(NAME)

.PHONY: release-linux
release-linux: $(GOX) release-dirs
@$(GOX) -tags 'netgo $(TAGS)' -ldflags '-extldflags "-static" $(LDFLAGS)' -os 'linux' -arch 'amd64 386 arm64 arm' -output '$(DIST)/binaries/$(EXECUTABLE)-$(OUTPUT)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME)
release-linux: release-dirs
GOOS=linux \
GOARCH=amd64 \
go build \
-tags 'netgo $(TAGS)' \
-buildmode=pie \
-trimpath \
-ldflags '-extldflags "-static" $(LDFLAGS)' \
-o '$(DIST)/binaries/$(EXECUTABLE)-linux-amd64' \
./cmd/$(NAME)

GOOS=linux \
GOARCH=386 \
go build \
-tags 'netgo $(TAGS)' \
-trimpath \
-ldflags '-extldflags "-static" $(LDFLAGS)' \
-o '$(DIST)/binaries/$(EXECUTABLE)-linux-386' \
./cmd/$(NAME)

GOOS=linux \
GOARCH=arm64 \
go build \
-tags 'netgo $(TAGS)' \
-buildmode=pie \
-trimpath \
-ldflags '-extldflags "-static" $(LDFLAGS)' \
-o '$(DIST)/binaries/$(EXECUTABLE)-linux-arm64' \
./cmd/$(NAME)

GOOS=linux \
GOARCH=arm \
go build \
-tags 'netgo $(TAGS)' \
-trimpath \
-ldflags '-extldflags "-static" $(LDFLAGS)' \
-o '$(DIST)/binaries/$(EXECUTABLE)-linux-arm' \
./cmd/$(NAME)

@# https://github.com/golang/go/issues/50405
@# -buildmode=pie not easily doable for arm

.PHONY: release-windows
release-windows: $(GOX) release-dirs
@$(GOX) -tags 'netgo $(TAGS)' -ldflags '-extldflags "-static" $(LDFLAGS)' -os 'windows' -arch 'amd64' -output '$(DIST)/binaries/$(EXECUTABLE)-$(OUTPUT)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME)
release-windows: release-dirs
GOOS=windows \
GOARCH=amd64 \
go build \
-tags 'netgo $(TAGS)' \
-buildmode=pie \
-trimpath \
-ldflags '-extldflags "-static" $(LDFLAGS)' \
-o '$(DIST)/binaries/$(EXECUTABLE)-windows-amd64' \
./cmd/$(NAME)

.PHONY: release-darwin
release-darwin: $(GOX) release-dirs
@$(GOX) -tags 'netgo $(TAGS)' -ldflags '$(LDFLAGS)' -os 'darwin' -arch 'amd64 arm64' -output '$(DIST)/binaries/$(EXECUTABLE)-$(OUTPUT)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME)
release-darwin: release-dirs
GOOS=darwin \
GOARCH=amd64 \
go build \
-tags 'netgo $(TAGS)' \
-buildmode=pie \
-trimpath \
-ldflags '$(LDFLAGS)' \
-o '$(DIST)/binaries/$(EXECUTABLE)-darwin-amd64' \
./cmd/$(NAME)

GOOS=darwin \
GOARCH=arm64 \
go build \
-tags 'netgo $(TAGS)' \
-buildmode=pie \
-trimpath \
-ldflags '$(LDFLAGS)' \
-o '$(DIST)/binaries/$(EXECUTABLE)-darwin-arm64' \
./cmd/$(NAME)

.PHONY: release-copy
release-copy:
Expand Down
Loading

0 comments on commit a07a5bd

Please sign in to comment.