aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/shell/bazel/remote_helpers.sh
Commit message (Collapse)AuthorAge
* maven_jar: Actually add support for sources classifierGravatar David Ostrovsky2018-06-08
| | | | | | | | | | | | | | | | | | | | | | | | Closes: #308, #4798. 7a7c41d7d342cd427e74f091b55690eed13e280d was incomplete addition of sources classifier. API wasn't extended to support source SHA1. This has two implications: 1. Sources sha1 artifact cannot be checked once downloaded. 2. Repository cache integration: when enabled, the source artifact cannot be retrieved from the cache, because its sha1 is not known. Rectify the problem by adding src_sha1 attribute to native maven_jar rule. Test Plan: $ bazel test src/test/shell/bazel:bazel_repository_cache_test PiperOrigin-RevId: 198561462 Change-Id: I9c620cdc3876673195483f9e75bb58108acc87be PiperOrigin-RevId: 199855818
* Add deps attributes to the Skylark maven_{a,j}ar rules.Gravatar ajmichael2017-11-14
| | | | | | | | | | | | | | | | | | | | | | | | | | The deps are passed through into the generated java_import and aar_import rules. This is necessary for AARs with resource dependencies since maven_aar ignores transitive dependencies. It's less significant for the Java rules, since typically JARs on Maven are compiled class files and as such only have runtime dependencies. Example usage: ``` # WORKSPACE load("@bazel_tools//tools/build_defs/repo:maven_rules.bzl", "maven_aar") maven_aar( name = "android_image_cropper", artifact = "com.theartofdev.edmodo:android-image-cropper:2.3.1", deps = [ "@androidsdk//com.android.support:appcompat-v7-24.1.1", ], ) ``` Fixes https://github.com/bazelbuild/bazel/issues/2863. Fixes https://github.com/bazelbuild/bazel/issues/3980. Also, cleans up some broken stuff in the tests (sadly, they don't run on jenkins, so nothing caught that they were broken). test_maven_jar_with_classifier_skylark still does not work, so I disabled. RELNOTES: Add deps attribute to Skylark maven_aar and maven_jar workspace rules. PiperOrigin-RevId: 175698282
* Remove "set -o pipefail" as it breaks bazel_sandboxing_test.Gravatar philwo2017-08-24
| | | | | | http://ci.bazel.io/job/bazel-tests/978/artifact/tests-node=linux-x86_64-variation=/src/test/shell/bazel/bazel_sandboxing_test/test.log/*view*/ PiperOrigin-RevId: 166345991
* Pull maven -src jars when available alongside jars re:Gravatar juliexxia2017-08-24
| | | | | | | https://github.com/bazelbuild/bazel/issues/308 RELNOTES: None. PiperOrigin-RevId: 166219871
* Make tests more portableGravatar Klaus Aehlig2017-08-04
| | | | | | | | | By replacing uses of /bin/bash by /bin/sh, a tool which is more reliably at this location. Then, enable most of the bazel tests for FreeBSD as well. Change-Id: Ic56a1705858f1ed67d1e96e2937e9389dd1d0e36 PiperOrigin-RevId: 164241635
* maven_rules.bzl: Fix maven coordinates order mismatch Gravatar David Ostrovsky2017-01-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Classifier should be provided in the form: "groupId:artifactId:version[:packaging][:classifier]" because that's what maven-dependency-plugin expects and not in the form: "groupId:artifactId[:packaging][:classifier]:version" as documented here: [1]. Also it was missed to reflect the classifier in the output artifact name. TEST PLAN: WORKSPACE: load("//tools:maven_rules.bzl", "maven_jar", "maven_dependency_plugin") maven_dependency_plugin() maven_jar( name = "jetty_server_sources", artifact = "org.eclipse.jetty:jetty-server:9.3.11.v20160721:jar:sources", sha1 = "b23cac190808baed928260b2c9beca3b1ed232b4", ) BUILD: java_library( name = "jetty-server-sources", exports = ["@jetty_server_sources//jar"], ) $ bazel build :jetty-server-sources [...] Target //:jetty-server-sources up-to-date: bazel-bin/libjetty-server-sources.jar [1] https://maven.apache.org/pom.html#Maven_Coordinates Fixes #2049. -- Change-Id: I3297fb3676324cc6b4bb6ff6b2b6e18ce33f633c Reviewed-on: https://cr.bazel.build/7213 PiperOrigin-RevId: 144972944 MOS_MIGRATED_REVID=144972944
* Creates maven_aar rule to generate aar_import for AARs from Maven.Gravatar Adam Michael2016-11-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See https://github.com/bazelbuild/bazel/issues/561. To use this rule, you will need to include the following line in your WORKSPACE file: load("@bazel_tools//tools/build_defs/repo:maven_rules.bzl", "maven_aar") After that, you can use the maven_aar repository rule in your WORKSPACE file as such: maven_aar( name = "facebook_android_sdk", artifact = "com.facebook.android:facebook-android-sdk:3.19.0", ) Then in your BUILD files, your android_library and android_binary targets can depend on the AAR with the following syntax: android_binary( name = "my_app", ... deps = [ "@facebook_android_sdk//aar", ... ], ) The resources, classes and native libs from the AAR will be provided. Note however that some features of AAR files are not yet supported, including assets, Proguard maps and lint jars. -- MOS_MIGRATED_REVID=138575421
* Implementation of maven_jar rule in Skylark.Gravatar Jingwen Chen2016-09-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | **Experimental** This is an initial implementation of the maven_jar rule in Skylark, targeted at the FRs in issue #1410. Implemented a wrapper around the maven binary to pull dependencies from remote repositories into a directory under {output_base}/external. Attributes `name`, `artifact`, `repository`, `sha1` have been implemented, but not `server`. Caveat: this rule assumes that the Maven dependency is installed in the system. Hence, the maven_skylark_test integration tests are tagged with "manual" and commented out because the Bazel CI isn't configured with the Maven binary yet. Added a serve_not_found helper for 404 response tests. Usage: ``` load("@bazel_tools//tools/build_defs/repo:maven_rules.bzl", "maven_jar") maven_jar( name = "com_google_guava_guava", artifact = "com.google.guava:guava:18.0", sha1 = "cce0823396aa693798f8882e64213b1772032b09", repository = "http://uk.maven.org/maven2", ) ``` With regards to server, there are some limitations with retrieving a maven_server's attribute at Loading Phase without the use of hacky macros (issue #1704), and even if macros are used, the maven_server is not treated as an actual dependency by maven_jar. There is a test (`test_unimplemented_server_attr`) to ensure that the error message to shown to users if they use the server attribute with this rule. -- Change-Id: I167f9d13835c30be971928b4cc60167a8e396893 Reviewed-on: https://bazel-review.googlesource.com/c/5770 MOS_MIGRATED_REVID=133971809
* Rationalize copyright headersGravatar Damien Martin-Guillerez2015-09-25
| | | | | | | | | | | The headers were modified with `find . -type f -exec 'sed' '-Ei' 's|Copyright 201([45]) Google|Copyright 201\1 The Bazel Authors|' '{}' ';'` And manual edit for not Google owned copyright. Because of the nature of ijar, I did not modified the header of file owned by Alan Donovan. The list of authors were extracted from the git log. It is missing older Google contributors that can be added on-demand. -- MOS_MIGRATED_REVID=103938715
* Add support for Maven username & password authenticationGravatar Kristina Chodorow2015-09-22
| | | | | | | | | | Progress on issue #264. RELNOTES: Maven servers that require username & password authentication are now supported (see maven_server documentation). -- MOS_MIGRATED_REVID=103583838
* Deflake maven_testGravatar Kristina Chodorow2015-09-16
| | | | | | | | Change the test to only starts up the fileserver when needed, not before each test case, to prevent timeouts. -- MOS_MIGRATED_REVID=103216306
* Add a maven_server ruleGravatar Kristina Chodorow2015-09-16
| | | | | | | | This will also be used for authentication, but that has not been implemented yet. -- MOS_MIGRATED_REVID=103194964
* Split out some sections of external_integration_testGravatar Kristina Chodorow2015-08-12
Also added a little more error message to the fetch test. -- MOS_MIGRATED_REVID=100475915