diff options
27 files changed, 211 insertions, 45 deletions
diff --git a/Documentation/config-gerrit.txt b/Documentation/config-gerrit.txt index f0a22cdfc4..7090ff8e35 100644 --- a/Documentation/config-gerrit.txt +++ b/Documentation/config-gerrit.txt @@ -2165,7 +2165,7 @@ Typically this would be set to something like "http://review.example.com/" or "http://example.com:8080/gerrit/" so Gerrit can output links that point back to itself. + -Setting this is highly recommended, as its necessary for the upload +Setting this is highly recommended, as it is necessary for the upload code invoked by "git push" or "repo upload" to output hyperlinks to the newly uploaded changes. diff --git a/Documentation/dev-bazel.txt b/Documentation/dev-bazel.txt index 52b9899bf6..98ca9a4f04 100644 --- a/Documentation/dev-bazel.txt +++ b/Documentation/dev-bazel.txt @@ -384,7 +384,6 @@ The following values are currently supported for the group name: * git-protocol-v2 * git-upload-archive * notedb -* no_rbe * pgm * rest * server @@ -683,6 +682,40 @@ gcloud alpha remote-build-execution worker-pools create default \ --disk-size=200 ``` +Due to outdated Git version in official RBE docker images, a custom RBE docker +image must be used. To build custom docker imager, change to the directory +`tools/platforms` and build and publish custom RBE docker image. + +To build the custom RBE docker image, run: + +``` +docker build -t gcr.io/api-project-164060093628/rbe-ubuntu18-04 . +``` + +To publish the custom RBE docker image, run: + +``` +docker push gcr.io/api-project-164060093628/rbe-ubuntu18-04 +[...] +latest: digest: sha256:de5186d4313630a6111f9a2449b72563d0bc59ec9fb60956f063b69a38a76834 size: 1584 +``` + +Re-build rbe_autoconfig project conduct a new release and switch to using it +in `WORKSPACE` file. + +Note, to authenticate to the gcr.io registry, the following command must be +used: + +``` +gcloud auth configure-docker +``` + +To see the documentation, developer must be added to this group: +https://groups.google.com/forum/#!forum/rbe-alpha-customers. + +Documentation can be found at: +https://cloud.google.com/remote-build-execution/docs. + To use RBE, execute ``` diff --git a/Documentation/dev-plugins.txt b/Documentation/dev-plugins.txt index 67e49eb0ed..3d0d6f9252 100644 --- a/Documentation/dev-plugins.txt +++ b/Documentation/dev-plugins.txt @@ -2645,7 +2645,7 @@ A change can be submitted if all the plugins accept the change. Plugins may also decide not to vote on a given change by returning an `Optional.empty()` (ie: the plugin is not enabled for this repository). -If a plugin decides not to vote, it's name will not be displayed in the UI and +If a plugin decides not to vote, its name will not be displayed in the UI and it will not be recoded in the database. .Gerrit's Pre-submit handling with three plugins diff --git a/Documentation/note-db.txt b/Documentation/note-db.txt index a13cbfb2eb..7b436a9042 100644 --- a/Documentation/note-db.txt +++ b/Documentation/note-db.txt @@ -192,5 +192,5 @@ section serves primarily as a reference. In case of rollback from NoteDB to ReviewDB, all the meta refs and the sequence ref need to be removed. -The [remove-notedb-refs.sh,role=external,window=_blank](https://gerrit.googlesource.com/gerrit/+/refs/heads/master/contrib/remove-notedb-refs.sh) +The link:https://gerrit.googlesource.com/gerrit/+/refs/heads/master/contrib/remove-notedb-refs.sh[remove-notedb-refs.sh,role=external,window=_blank] script has been written to automate this process. @@ -34,11 +34,11 @@ load("//tools:nongoogle.bzl", "TESTCONTAINERS_VERSION", "declare_nongoogle_deps" http_archive( name = "rbe_jdk11", - sha256 = "766796de71916118e528b9f4334c29c9c9b4e926227bf3264dee555e6a4306c8", - strip_prefix = "rbe_autoconfig-2.0.0", + sha256 = "5939e2a4e56d1fc53b6c44c6db97ee068c9f4bd18e86c762f6ab8b4fff5e294b", + strip_prefix = "rbe_autoconfig-3.0.0", urls = [ - "https://gerrit-bazel.storage.googleapis.com/rbe_autoconfig/v2.0.0.tar.gz", - "https://github.com/davido/rbe_autoconfig/archive/v2.0.0.tar.gz", + "https://gerrit-bazel.storage.googleapis.com/rbe_autoconfig/v3.0.0.tar.gz", + "https://github.com/davido/rbe_autoconfig/archive/v3.0.0.tar.gz", ], ) @@ -226,36 +226,30 @@ maven_jar( sha1 = "28c59f58f5adcc307604602e2aa89e2aca14c554", ) -SLF4J_VERS = "1.7.26" +SLF4J_VERS = "1.7.33" maven_jar( name = "log-api", artifact = "org.slf4j:slf4j-api:" + SLF4J_VERS, - sha1 = "77100a62c2e6f04b53977b9f541044d7d722693d", + sha1 = "d375aa1b98d34d5ddf73a3f19eaad66e98975b12", ) maven_jar( name = "log-ext", artifact = "org.slf4j:slf4j-ext:" + SLF4J_VERS, - sha1 = "31cdf122e000322e9efcb38913e9ab07825b17ef", + sha1 = "00da03640ae1ad57f964dcaa542fb5d804dce8a6", ) maven_jar( name = "impl-log4j", - artifact = "org.slf4j:slf4j-log4j12:" + SLF4J_VERS, - sha1 = "12f5c685b71c3027fd28bcf90528ec4ec74bf818", + artifact = "org.slf4j:slf4j-reload4j:" + SLF4J_VERS, + sha1 = "ddc89144bfb56781936120b2334a70869b68db6d", ) maven_jar( name = "jcl-over-slf4j", artifact = "org.slf4j:jcl-over-slf4j:" + SLF4J_VERS, - sha1 = "33fbc2d93de829fa5e263c5ce97f5eab8f57d53e", -) - -maven_jar( - name = "log4j", - artifact = "log4j:log4j:1.2.17", - sha1 = "5af35056b4d257e4b64b9e8069c0746e8b08629f", + sha1 = "28c441128bc81b6d95cc2857ae5bb46ae5bf658b", ) maven_jar( diff --git a/java/com/google/gerrit/common/UsedAt.java b/java/com/google/gerrit/common/UsedAt.java index 73b1d40327..3e103c8625 100644 --- a/java/com/google/gerrit/common/UsedAt.java +++ b/java/com/google/gerrit/common/UsedAt.java @@ -42,6 +42,7 @@ public @interface UsedAt { PLUGIN_SERVICEUSER, PLUGIN_HIGH_AVAILABILITY, PLUGIN_MULTI_SITE, + PLUGIN_WEBSESSION_FLATFILE, PLUGINS_ALL, // Use this project if a method/type is generally made available to all plugins. } diff --git a/java/com/google/gerrit/httpd/CacheBasedWebSession.java b/java/com/google/gerrit/httpd/CacheBasedWebSession.java index 7212e3e6e6..f302095476 100644 --- a/java/com/google/gerrit/httpd/CacheBasedWebSession.java +++ b/java/com/google/gerrit/httpd/CacheBasedWebSession.java @@ -19,6 +19,7 @@ import static java.util.concurrent.TimeUnit.HOURS; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Strings; import com.google.gerrit.common.Nullable; +import com.google.gerrit.common.UsedAt; import com.google.gerrit.entities.Account; import com.google.gerrit.extensions.restapi.BadRequestException; import com.google.gerrit.httpd.WebSessionManager.Key; @@ -44,7 +45,9 @@ import org.eclipse.jgit.http.server.GitSmartHttpTools; @RequestScoped public abstract class CacheBasedWebSession implements WebSession { @VisibleForTesting public static final String ACCOUNT_COOKIE = "GerritAccount"; - protected static final long MAX_AGE_MINUTES = HOURS.toMinutes(12); + + @UsedAt(UsedAt.Project.PLUGIN_WEBSESSION_FLATFILE) + public static final long MAX_AGE_MINUTES = HOURS.toMinutes(12); private final HttpServletRequest request; private final HttpServletResponse response; diff --git a/java/com/google/gerrit/httpd/auth/openid/OpenIdServiceImpl.java b/java/com/google/gerrit/httpd/auth/openid/OpenIdServiceImpl.java index b685011744..c655b6cd4d 100644 --- a/java/com/google/gerrit/httpd/auth/openid/OpenIdServiceImpl.java +++ b/java/com/google/gerrit/httpd/auth/openid/OpenIdServiceImpl.java @@ -172,7 +172,7 @@ class OpenIdServiceImpl { aReq.addExtension(pape); } } catch (MessageException | ConsumerException e) { - logger.atSevere().withCause(e).log("Cannot create OpenID redirect for %s" + openidIdentifier); + logger.atSevere().withCause(e).log("Cannot create OpenID redirect for %s", openidIdentifier); return new DiscoveryResult(DiscoveryResult.Status.ERROR); } diff --git a/java/com/google/gerrit/mail/ParserUtil.java b/java/com/google/gerrit/mail/ParserUtil.java index 4b292f3e68..40c5a95e80 100644 --- a/java/com/google/gerrit/mail/ParserUtil.java +++ b/java/com/google/gerrit/mail/ParserUtil.java @@ -115,7 +115,8 @@ public class ParserUtil { int numConsecutiveDigits = 0; int maxConsecutiveDigits = 0; int numDigitGroups = 0; - for (char c : s.toCharArray()) { + for (int i = 0; i < s.length(); i++) { + char c = s.charAt(i); if (c >= '0' && c <= '9') { numConsecutiveDigits++; } else if (numConsecutiveDigits > 0) { diff --git a/java/com/google/gerrit/server/git/DelegateRepository.java b/java/com/google/gerrit/server/git/DelegateRepository.java index ddfc1150ae..9ead038fc2 100644 --- a/java/com/google/gerrit/server/git/DelegateRepository.java +++ b/java/com/google/gerrit/server/git/DelegateRepository.java @@ -65,6 +65,10 @@ public class DelegateRepository extends Repository { this.delegate = delegate; } + Repository delegate() { + return delegate; + } + @Override public void create(boolean bare) throws IOException { delegate.create(bare); diff --git a/java/com/google/gerrit/server/git/GarbageCollection.java b/java/com/google/gerrit/server/git/GarbageCollection.java index 9b52f48e50..c37572d0fd 100644 --- a/java/com/google/gerrit/server/git/GarbageCollection.java +++ b/java/com/google/gerrit/server/git/GarbageCollection.java @@ -86,7 +86,12 @@ public class GarbageCollection { try (Repository repo = repoManager.openRepository(p)) { logGcConfiguration(p, repo, aggressive); print(writer, "collecting garbage for \"" + p + "\":\n"); - GarbageCollectCommand gc = Git.wrap(repo).gc(); + GarbageCollectCommand gc = + Git.wrap( + repo instanceof DelegateRepository + ? ((DelegateRepository) repo).delegate() + : repo) + .gc(); gc.setAggressive(aggressive); logGcInfo(p, "before:", gc.getStatistics()); gc.setProgressMonitor( diff --git a/java/com/google/gerrit/server/git/GitRepositoryManagerModule.java b/java/com/google/gerrit/server/git/GitRepositoryManagerModule.java index 354b69feb8..e4137b0406 100644 --- a/java/com/google/gerrit/server/git/GitRepositoryManagerModule.java +++ b/java/com/google/gerrit/server/git/GitRepositoryManagerModule.java @@ -15,6 +15,7 @@ package com.google.gerrit.server.git; import com.google.gerrit.lifecycle.LifecycleModule; +import com.google.gerrit.server.ModuleImpl; import com.google.gerrit.server.config.RepositoryConfig; import com.google.inject.Inject; @@ -22,7 +23,9 @@ import com.google.inject.Inject; * Module to install {@link MultiBaseLocalDiskRepositoryManager} rather than {@link * LocalDiskRepositoryManager} if needed. */ +@ModuleImpl(name = GitRepositoryManagerModule.MANAGER_MODULE) public class GitRepositoryManagerModule extends LifecycleModule { + public static final String MANAGER_MODULE = "git-manager"; private final RepositoryConfig repoConfig; diff --git a/java/com/google/gerrit/server/git/MergeUtil.java b/java/com/google/gerrit/server/git/MergeUtil.java index 58df343c8e..16a1ae6cc5 100644 --- a/java/com/google/gerrit/server/git/MergeUtil.java +++ b/java/com/google/gerrit/server/git/MergeUtil.java @@ -304,13 +304,13 @@ public class MergeUtil { int nameLength = Math.max(oursName.length(), theirsName.length()); String oursNameFormatted = String.format( - "%0$-" + nameLength + "s (%s %s)", + "%-" + nameLength + "s (%s %s)", oursName, abbreviateName(ours, NAME_ABBREV_LEN), oursMsg.substring(0, Math.min(oursMsg.length(), 60))); String theirsNameFormatted = String.format( - "%0$-" + nameLength + "s (%s %s)", + "%-" + nameLength + "s (%s %s)", theirsName, abbreviateName(theirs, NAME_ABBREV_LEN), theirsMsg.substring(0, Math.min(theirsMsg.length(), 60))); diff --git a/java/com/google/gerrit/server/git/MultiProgressMonitor.java b/java/com/google/gerrit/server/git/MultiProgressMonitor.java index 7e5c99fc86..15fbe3fb76 100644 --- a/java/com/google/gerrit/server/git/MultiProgressMonitor.java +++ b/java/com/google/gerrit/server/git/MultiProgressMonitor.java @@ -161,7 +161,7 @@ public class MultiProgressMonitor { volatileTotal.addAndGet(workUnits); } else { logger.atWarning().log( - "Total work has been finalized on sub-task " + getName() + " and cannot be updated"); + "Total work has been finalized on sub-task %s and cannot be updated", getName()); } } diff --git a/java/com/google/gerrit/server/project/CreateRefControl.java b/java/com/google/gerrit/server/project/CreateRefControl.java index 69ac93e839..2e76949942 100644 --- a/java/com/google/gerrit/server/project/CreateRefControl.java +++ b/java/com/google/gerrit/server/project/CreateRefControl.java @@ -105,7 +105,7 @@ public class CreateRefControl { // If the tag has a PGP signature, allow a lower level of permission // than if it doesn't have a PGP signature. PermissionBackend.ForRef forRef = permissionBackend.user(user.get()).ref(branch); - if (tag.getFullMessage().contains("-----BEGIN PGP SIGNATURE-----\n")) { + if (tag.getRawGpgSignature() != null) { forRef.check(RefPermission.CREATE_SIGNED_TAG); } else { forRef.check(RefPermission.CREATE_TAG); diff --git a/javatests/com/google/gerrit/git/BUILD b/javatests/com/google/gerrit/git/BUILD index b12924a63a..c2c9ccef99 100644 --- a/javatests/com/google/gerrit/git/BUILD +++ b/javatests/com/google/gerrit/git/BUILD @@ -7,10 +7,7 @@ junit_tests( size = "medium", timeout = "short", srcs = MEDIUM_TESTS, - tags = [ - "no_rbe", - "no_windows", - ], + tags = ["no_windows"], deps = [ "//java/com/google/gerrit/git", "//lib:guava", diff --git a/javatests/com/google/gerrit/integration/git/BUILD b/javatests/com/google/gerrit/integration/git/BUILD index bcb16f4fde..28755af59e 100644 --- a/javatests/com/google/gerrit/integration/git/BUILD +++ b/javatests/com/google/gerrit/integration/git/BUILD @@ -3,10 +3,7 @@ load("//javatests/com/google/gerrit/acceptance:tests.bzl", "acceptance_tests") acceptance_tests( srcs = ["GitProtocolV2IT.java"], group = "protocol-v2", - labels = [ - "git-protocol-v2", - "no_rbe", - ], + labels = ["git-protocol-v2"], ) acceptance_tests( diff --git a/javatests/com/google/gerrit/mail/data/NonUTF8Message.java b/javatests/com/google/gerrit/mail/data/NonUTF8Message.java index 60368eb79c..86a0b56404 100644 --- a/javatests/com/google/gerrit/mail/data/NonUTF8Message.java +++ b/javatests/com/google/gerrit/mail/data/NonUTF8Message.java @@ -45,7 +45,8 @@ public class NonUTF8Message extends RawMailMessage { public int[] rawChars() { int[] arr = new int[raw.length()]; int i = 0; - for (char c : raw.toCharArray()) { + for (int j = 0; j < raw.length(); j++) { + char c = raw.charAt(j); arr[i++] = c; } return arr; diff --git a/javatests/com/google/gerrit/pgm/BUILD b/javatests/com/google/gerrit/pgm/BUILD index 0655bb2490..0fe4fad1c0 100644 --- a/javatests/com/google/gerrit/pgm/BUILD +++ b/javatests/com/google/gerrit/pgm/BUILD @@ -4,7 +4,6 @@ load("//tools/bzl:license.bzl", "license_test") junit_tests( name = "pgm_tests", srcs = glob(["**/*.java"]), - tags = ["no_rbe"], deps = [ "//java/com/google/gerrit/pgm/http/jetty", "//java/com/google/gerrit/pgm/init/api", diff --git a/javatests/com/google/gerrit/server/BUILD b/javatests/com/google/gerrit/server/BUILD index fe4012c560..7ab7ae9a6e 100644 --- a/javatests/com/google/gerrit/server/BUILD +++ b/javatests/com/google/gerrit/server/BUILD @@ -27,10 +27,7 @@ junit_tests( ), resource_strip_prefix = "resources", resources = ["//resources/com/google/gerrit/server"], - tags = [ - "no_rbe", - "no_windows", - ], + tags = ["no_windows"], visibility = ["//visibility:public"], runtime_deps = [ "//java/com/google/gerrit/lucene", diff --git a/javatests/com/google/gerrit/server/config/GitwebConfigTest.java b/javatests/com/google/gerrit/server/config/GitwebConfigTest.java index cb6de34b76..73160743e5 100644 --- a/javatests/com/google/gerrit/server/config/GitwebConfigTest.java +++ b/javatests/com/google/gerrit/server/config/GitwebConfigTest.java @@ -24,7 +24,8 @@ public class GitwebConfigTest { @Test public void validPathSeparator() { - for (char c : VALID_CHARACTERS.toCharArray()) { + for (int i = 0; i < VALID_CHARACTERS.length(); i++) { + char c = VALID_CHARACTERS.charAt(i); assertWithMessage("valid character rejected: " + c) .that(GitwebConfig.isValidPathSeparator(c)) .isTrue(); @@ -33,7 +34,8 @@ public class GitwebConfigTest { @Test public void inalidPathSeparator() { - for (char c : SOME_INVALID_CHARACTERS.toCharArray()) { + for (int i = 0; i < SOME_INVALID_CHARACTERS.length(); i++) { + char c = SOME_INVALID_CHARACTERS.charAt(i); assertWithMessage("invalid character accepted: " + c) .that(GitwebConfig.isValidPathSeparator(c)) .isFalse(); diff --git a/javatests/com/google/gerrit/server/git/GarbageCollectionTest.java b/javatests/com/google/gerrit/server/git/GarbageCollectionTest.java new file mode 100644 index 0000000000..41b5d79090 --- /dev/null +++ b/javatests/com/google/gerrit/server/git/GarbageCollectionTest.java @@ -0,0 +1,101 @@ +// Copyright (C) 2022 The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package com.google.gerrit.server.git; + +import static com.google.common.truth.Truth.assertThat; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import com.google.common.collect.ImmutableList; +import com.google.gerrit.entities.Project; +import com.google.gerrit.entities.Project.NameKey; +import com.google.gerrit.extensions.registration.DynamicSet; +import com.google.gerrit.server.config.GcConfig; +import com.google.gerrit.server.config.SitePaths; +import com.google.gerrit.server.plugincontext.PluginContext.PluginMetrics; +import com.google.gerrit.server.plugincontext.PluginSetContext; +import java.io.IOException; +import org.eclipse.jgit.errors.RepositoryNotFoundException; +import org.eclipse.jgit.lib.Config; +import org.eclipse.jgit.lib.Repository; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.TemporaryFolder; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnit; +import org.mockito.junit.MockitoRule; + +public class GarbageCollectionTest { + private static final Project.NameKey FOO = Project.nameKey("foo"); + + @Rule public final MockitoRule mockito = MockitoJUnit.rule(); + @Rule public TemporaryFolder temporaryFolder = new TemporaryFolder(); + + @Mock private GcConfig gcConfig; + @Mock private DelegateRepository wrapper; + + private SitePaths site; + private Config cfg; + + @Before + public void setup() throws Exception { + site = new SitePaths(temporaryFolder.newFolder().toPath()); + site.resolve("git").toFile().mkdir(); + cfg = new Config(); + cfg.setString("gerrit", null, "basePath", "git"); + } + + @Test + public void shouldCallGcOnDelegatedRepositoryWhenDelegateRepositoryIsPassed() throws IOException { + // given + GarbageCollection objectUnderTest = prepareObjectForTesting(); + + // when + objectUnderTest.run(ImmutableList.of(FOO), false, null); + + // then + verify(wrapper).delegate(); + } + + private GarbageCollection prepareObjectForTesting() throws IOException { + LocalDiskRepositoryManager repoManager = new DelegatedRepositoryManager(site, cfg, wrapper); + try (Repository repo = repoManager.createRepository(FOO)) { + assertThat(repo).isNotNull(); + } + return new GarbageCollection( + repoManager, + new GarbageCollectionQueue(), + gcConfig, + new PluginSetContext<>(new DynamicSet<>(), PluginMetrics.DISABLED_INSTANCE)); + } + + private static final class DelegatedRepositoryManager extends LocalDiskRepositoryManager { + private final DelegateRepository wrapper; + + private DelegatedRepositoryManager(SitePaths site, Config cfg, DelegateRepository wrapper) { + super(site, cfg); + this.wrapper = wrapper; + } + + @Override + public Repository openRepository(NameKey name) throws RepositoryNotFoundException { + Repository opened = super.openRepository(name); + when(wrapper.delegate()).thenReturn(opened); + when(wrapper.getConfig()).thenReturn(opened.getConfig()); + return wrapper; + } + } +} diff --git a/lib/nongoogle_test.sh b/lib/nongoogle_test.sh index 272cfa94bb..bdd40fcbb3 100755 --- a/lib/nongoogle_test.sh +++ b/lib/nongoogle_test.sh @@ -33,6 +33,7 @@ jackson-core jimfs jna jruby +log4j mina-core nekohtml objenesis diff --git a/modules/jgit b/modules/jgit -Subproject 60b81c5a9280e44fa48d533a61f915382b2b9ce +Subproject 1e59cabc08ffddaae7129f0407f7ae17f01c5d9 diff --git a/tools/js/download_bower.py b/tools/js/download_bower.py index 2a75fc16ed..3bd9be973d 100755 --- a/tools/js/download_bower.py +++ b/tools/js/download_bower.py @@ -55,7 +55,7 @@ def bower_info(bower, name, package, version): raise OSError('Command failed: %s' % ' '.join(cmd)) try: - info = json.loads(out) + info = json.loads(out.decode('utf8')) except ValueError: raise ValueError('invalid JSON from %s:\n%s' % (" ".join(cmd), out)) info_name = info.get('name') diff --git a/tools/nongoogle.bzl b/tools/nongoogle.bzl index 3d0459258c..f482e3d3ec 100644 --- a/tools/nongoogle.bzl +++ b/tools/nongoogle.bzl @@ -17,6 +17,12 @@ def declare_nongoogle_deps(): """ maven_jar( + name = "log4j", + artifact = "ch.qos.reload4j:reload4j:1.2.18.1", + sha1 = "7075022a11e18c1ad230de5be074e0c691fed17b", + ) + + maven_jar( name = "j2objc", artifact = "com.google.j2objc:j2objc-annotations:1.1", sha1 = "ed28ded51a8b1c6b112568def5f4b455e6809019", diff --git a/tools/platforms/Dockerfile b/tools/platforms/Dockerfile new file mode 100644 index 0000000000..157529c08a --- /dev/null +++ b/tools/platforms/Dockerfile @@ -0,0 +1,21 @@ +# Copyright (C) 2021 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM gcr.io/cloud-marketplace/google/rbe-ubuntu18-04:latest + +# Install Git >=2.18.0 +RUN add-apt-repository ppa:git-core/ppa && \ + apt-get -y update && \ + apt-get -y install git && \ + apt-get clean |