Merge branch 'stable-2.16' into stable-3.0
* stable-2.16:
Set version to 2.16.17
Do not overwirte /etc/default/gerritcodereview upon upgrade
Avoid use of negative checks for directories
Change-Id: I1e1ececb0fc3fcc2073fed6fc041549d38dfffda
diff --git a/docker/centos7/Makefile b/docker/centos7/Makefile
deleted file mode 100644
index 9a371f0..0000000
--- a/docker/centos7/Makefile
+++ /dev/null
@@ -1,57 +0,0 @@
-# Customise the following variable as Make parameters
-# to produce a yum.repo for a VENDOR distribution
-# Default values are pointing to GerritForge (www.gerritforge.com)
-VERSION=2.16.17
-RELEASE=1
-REPO_VERSION=1
-REPO_RELEASE=1
-VENDOR=GerritForge
-VENDOR_LC=$(shell echo $(VENDOR) | tr A-Z a-z)
-IMAGE=$(VENDOR_LC)/gerrit-centos7
-NO_CACHE=true
-
-# End of the variables that can be customized
-
-define DOCKERFILE
-FROM centos:7.5.1804
-MAINTAINER $(VENDOR)
-
-# Allow remote connectivity and sudo
-RUN yum -y install openssh-client initscripts sudo
-
-# Add Gerrit packages repository
-RUN rpm -i https://$(VENDOR_LC).com/$(VENDOR_LC)-repo-$(REPO_VERSION)-$(REPO_RELEASE).noarch.rpm
-
-# Install OpenJDK and Gerrit in two subsequent transactions
-# (pre-trans Gerrit script needs to have access to the Java command)
-RUN yum -y install java-1.8.0-openjdk
-RUN yum -y install gerrit-$(VERSION)-$(RELEASE)
-
-USER gerrit
-RUN java -jar /var/gerrit/bin/gerrit.war init --batch --install-all-plugins -d /var/gerrit
-RUN java -jar /var/gerrit/bin/gerrit.war reindex -d /var/gerrit
-
-# Allow incoming traffic
-EXPOSE 29418 8080
-
-VOLUME ["/var/gerrit/git", "/var/gerrit/index", "/var/gerrit/cache", "/var/gerrit/db", "/var/gerrit/etc"]
-
-# Start Gerrit
-CMD /var/gerrit/bin/gerrit.sh start && tail -f /var/gerrit/logs/error_log
-endef
-export DOCKERFILE
-
-image: prepare
- echo "$$DOCKERFILE" > Dockerfile
- docker build --no-cache=$(NO_CACHE) -t $(IMAGE):$(VERSION) .
-
-clean:
- -rm Dockerfile
-
-prepare:
- echo "$$DOCKERFILE" > Dockerfile
-
-run: image
- docker run -d --hostname $$HOSTNAME -p 8080:8080 -p 29418:29418 $(IMAGE):$(VERSION)
-
-.PHONY: clean prepare image
diff --git a/docker/ubuntu16.04/Makefile b/docker/ubuntu16.04/Makefile
deleted file mode 100644
index 5a6a83c..0000000
--- a/docker/ubuntu16.04/Makefile
+++ /dev/null
@@ -1,60 +0,0 @@
-# Customise the following variable as Make parameters
-# to produce a yum.repo for a VENDOR distribution
-# Default values are pointing to GerritForge (www.gerritforge.com)
-VERSION=2.16.17
-RELEASE=1
-VENDOR=GerritForge
-VENDOR_LC=$(shell echo $(VENDOR) | tr A-Z a-z)
-IMAGE=$(VENDOR_LC)/gerrit-ubuntu16.04
-PGP_KEY_ID=1871F775
-NO_CACHE=true
-
-# End of the variables that can be customized
-
-define DOCKERFILE
-FROM ubuntu:16.04
-MAINTAINER $(VENDOR)
-
-# Add Gerrit packages repository
-RUN echo "deb mirror://mirrorlist.$(VENDOR_LC).com/deb gerrit contrib" > /etc/apt/sources.list.d/$(VENDOR).list
-RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $(PGP_KEY_ID)
-
-# Allow remote connectivity and sudo
-RUN apt-get update
-RUN apt-key update
-RUN apt-get -y install openssh-client sudo
-
-# Install OpenJDK and Gerrit in two subsequent transactions
-# (pre-trans Gerrit script needs to have access to the Java command)
-RUN apt-get -y install openjdk-8-jdk
-RUN apt-get -y install gerrit=$(VERSION)-$(RELEASE) && rm -f /var/gerrit/logs/*
-
-USER gerrit
-RUN java -jar /var/gerrit/bin/gerrit.war init --batch --install-all-plugins -d /var/gerrit
-
-# Allow incoming traffic
-EXPOSE 29418 8080
-
-VOLUME ["/var/gerrit/git", "/var/gerrit/index", "/var/gerrit/cache", "/var/gerrit/db", "/var/gerrit/etc"]
-
-# Start Gerrit
-CMD /var/gerrit/bin/gerrit.sh start && tail -f /var/gerrit/logs/error_log
-endef
-export DOCKERFILE
-
-image: prepare
- echo "$$DOCKERFILE" > Dockerfile
- docker build --no-cache=$(NO_CACHE) -t $(IMAGE):$(VERSION) .
-
-clean:
- -rm -Rf docker_files
- -rm Dockerfile
-
-prepare:
- echo "$$DOCKERFILE" > Dockerfile
- -mkdir -p docker_files
-
-run: image
- docker run -d --hostname $$HOSTNAME -p 8080:8080 -p 29418:29418 $(IMAGE):$(VERSION)
-
-.PHONY: clean prepare image
diff --git a/fpm/Makefile b/fpm/Makefile
index 3ec8579..9dac57b 100644
--- a/fpm/Makefile
+++ b/fpm/Makefile
@@ -1,5 +1,5 @@
-VERSION=2.16.17
-WAR_VERSION=2.16.17
+VERSION=3.0.7
+WAR_VERSION=3.0.7
URL=https://gerrit-releases.storage.googleapis.com/gerrit-$(WAR_VERSION).war
CI_URL=https://gerrit-ci.gerritforge.com
RELEASE=1
@@ -22,13 +22,10 @@
WAR=$(BUILD_ROOT)/bin/gerrit.war
PLUGINS_CI=https://gerrit-ci.gerritforge.com/job
LIBS_JOBS= \
- plugin-out-of-the-box-bazel-master-stable-2.16/lastSuccessfulBuild/artifact/bazel-bin/plugins/out-of-the-box/out-of-the-box.jar
+ plugin-out-of-the-box-bazel-master-stable-3.0/lastSuccessfulBuild/artifact/bazel-bin/plugins/out-of-the-box/out-of-the-box.jar
PLUGINS_JOBS= \
- plugin-plugin-manager-bazel-stable-2.16/lastSuccessfulBuild/artifact/bazel-bin/plugins/plugin-manager/plugin-manager.jar \
- plugin-avatars-gravatar-bazel-stable-2.16/lastSuccessfulBuild/artifact/bazel-bin/plugins/avatars-gravatar/avatars-gravatar.jar \
- plugin-gitiles-bazel-stable-2.16/lastSuccessfulBuild/artifact/bazel-bin/plugins/gitiles/gitiles.jar \
- plugin-delete-project-bazel-stable-2.16/lastSuccessfulBuild/artifact/bazel-bin/plugins/delete-project/delete-project.jar \
- plugin-uploadvalidator-bazel-stable-2.16/lastSuccessfulBuild/artifact/bazel-bin/plugins/uploadvalidator/uploadvalidator.jar
+ plugin-avatars-gravatar-bazel-master-stable-3.0/lastSuccessfulBuild/artifact/bazel-bin/plugins/avatars-gravatar/avatars-gravatar.jar \
+ plugin-uploadvalidator-bazel-stable-3.0/lastSuccessfulBuild/artifact/bazel-bin/plugins/uploadvalidator/uploadvalidator.jar
RPM_OUT=$(OUT)/gerrit-$(VERSION)-$(RELEASE).$(BUILD_ARCH).rpm
DEB_OUT=$(OUT)/gerrit-$(VERSION)-$(RELEASE).$(BUILD_ARCH).deb
@@ -69,6 +66,10 @@
mkdir -p $(BUILD_ROOT)/bin
mkdir -p $(BUILD_ROOT)/plugins
mkdir -p $(BUILD_ROOT)/lib
+ mkdir -p $(BUILD_ROOT)/cache
+ mkdir -p $(BUILD_ROOT)/db
+ mkdir -p $(BUILD_ROOT)/git
+ mkdir -p $(BUILD_ROOT)/index
cp -R $(CONFIGS) $(BUILD_ROOT)/etc
-groupadd $(GROUP)
$(eval GROUP_ID := $(shell /usr/bin/getent group $(GROUP) | cut -d ':' -f 3))
diff --git a/fpm/scripts/after-install.sh b/fpm/scripts/after-install.sh
index d8cc02e..edb2a61 100755
--- a/fpm/scripts/after-install.sh
+++ b/fpm/scripts/after-install.sh
@@ -25,7 +25,5 @@
echo "Installation completed"
echo ""
-/etc/init.d/gerrit start
-
URL=$(git config -f /etc/gerrit/gerrit.config gerrit.canonicalWebUrl)
-[ -z "$URL" ] || echo "To start using Gerrit, open: $URL"
+[ -z "$URL" ] || echo "To start using Gerrit, run '/etc/init.d/gerrit start' and open: $URL"
diff --git a/macOS/Makefile b/macOS/Makefile
index f0085bf..9734a36 100644
--- a/macOS/Makefile
+++ b/macOS/Makefile
@@ -1,4 +1,4 @@
-VERSION := 2.16.17
+VERSION := 3.0.7
all: server