Commit graph

2714 commits

Author SHA1 Message Date
Weimin Yu
29e4d8de05
Check dependencies' open-source licenses (#165)
* Check dependencies' open-source licenses

Use jk1/Gradle-License-Report to verify that all
dependencies have open-source licenses.

Note that the following dependencies are not checked:

Dependencies of official Gradle plugins
Dependencies declared in buildscript block
Dependencies of jk1/Gradle-License-Report itself
2019-07-11 12:08:08 -04:00
Weimin Yu
242a560f20
Remove the maybeRuntime configuration (#164)
* Remove the maybeRuntime configuration

It contains dependencies present in the bazel
build but not needed for compile. We now know
they are not needed in runtime either.
2019-07-10 16:56:53 -04:00
gbrodman
3903abd9de
Move and/or delete a bunch of random resources (#152) 2019-07-09 17:38:24 -04:00
Shicong Huang
8371cb838c
Add a 30s timeout for all webdriver tests (#161)
Sometimes, the webdriver tests get stuck forever for no reason. It could
be some issue in the test container but it is hard to root cause it. So,
adding a 30s timeout can either trigger the retry earlier or let the
test just fail.
2019-07-09 14:42:32 -04:00
Shicong Huang
8dd6797614
Read golden images from src directly (#159)
This PR prevents Gradle from copying the golden images
to build/resources/test, so the screenshot test would
read golden images from src/test/resources directly and
display the path in test log if the test fails. Because
the path pointing to the actual file in src/ folder,
the engineer can easily find it.
2019-07-09 10:49:20 -04:00
Lai Jiang
730f108e13
Upgrade to Gradle 5.5 (#158) 2019-07-08 12:56:43 -04:00
gbrodman
e5bafddd2f
Move JS and CSS files to a Javascript source dir (#156) 2019-07-05 12:01:16 -04:00
Lai Jiang
82f51accbd
Set beam deployment environment in GCB trigger (#157) 2019-07-03 16:28:28 -04:00
Shicong Huang
6536631857
Remove injected credentials from invoice pipeline (#155)
We got non-serialization object error when deploying the invoicing
pipeline. It turns out that Beam requires every field in the pipeline
object is serilizable. However, it is non-trivial to make
GoogleCredentialsBundle serilizable because almost all of its
dependency are not serilizable and not contraled by us. Also,
it is non-necessary to inject the credential as the spec11
pipeline also writes output to GCS without having injected
credential. So, removing the injected variable can solve the
problem.

TESTED=First reproduced the problem locally by deploying the invoicing pipeline with the previous code; applied this change and successfully deploy the pipeline without having any issue.
2019-07-03 15:12:48 -04:00
gbrodman
1be92968bf
Attempt login to MosAPI via all available TLDs (#141)
* Attempt login to MosAPI via all available TLDs

There's no reason why we should need a TLD as input here because it
doesn't actually matter which one we use (they all have the same
password).

* Refactor the TLD loop and change cron jobs

* Re-throw the last exception if one exists

* Fix tests and exception

* Remove alpha cron job
2019-07-03 14:25:39 -04:00
Ben McIlwain
0564b207f2
Prevent accidentally using full Drive URL as folder ID (#144)
* Prevent accidentally using full Drive URL as folder ID
2019-07-03 14:22:15 -04:00
gbrodman
8afc4f4d3d
Enforce that source files end in a newline (#153) 2019-07-03 12:16:11 -04:00
guyben13
888bc158fe Add explanation on how to use the MoSAPI endpoint (#137)
* Add explanation on how to use the MoSAPI endpoint

* Add a $ before each command so that it's clearer
2019-07-02 18:20:53 -04:00
Lai Jiang
25ee92b5d8
Re-add hello.xml file (#147)
* Re-add hello.xml file

Apparently it was lost during the great refactoring.

* Remove hello.xml from test resources
2019-07-02 17:21:40 -04:00
gbrodman
cf507dad6d
Move test resource files into src/test/resources (#143)
* Move test resource files into src/test/resources

* fix a test

* Remove references to javatests/ in Java files

* fix import order

* fix semantic merge conflict
2019-07-02 16:54:49 -04:00
gbrodman
32d5940be3
Remove old Bazel files (#151) 2019-07-02 16:24:01 -04:00
Shicong Huang
82fa3d7349
Change button color to blue style (#150) 2019-07-02 15:29:17 -04:00
Ben McIlwain
07239710ef
Throw a more useful error message on attempted domain restore reports (#145)
* Throw a more useful error message on attempted domain restore reports

Per DomainRestoreRequestFlow's Javadoc, we automatically approve and instantly
enact all domain restore requests, thus we don't use or support restore
reports. This improves the registrar-visible error message to help make this
more clear.
2019-07-02 14:11:37 -04:00
gbrodman
0e8724a48f
Require the license in Gradle files (#149) 2019-07-02 11:47:35 -04:00
gbrodman
8332664af9
Move golden test files to src/test/resources (#146) 2019-07-02 11:34:41 -04:00
gbrodman
39abee6279
Update checkstyle.xml with many presubmit checks (#130)
* Update checkstyle.xml with many presubmit checks

* Remove a comment
2019-07-02 10:35:32 -04:00
Shicong Huang
6daf72a54e
Replace deprecated GoogleCredential with new auth lib (#129)
Replace deprecated GoogleCredential with new lib

This PR also introduced a CredentialsBundle class to carry
HttpTransport and JsonFactory object which are needed by
most of the GCP library to instantiate client.
2019-07-02 10:29:51 -04:00
gbrodman
7ce37147c0
Refactor the license check to be a generic presubmit check (#131)
* Refactor the license check to be a generic presubmit check

This includes all of the old presubmits that were in our METADATA file
that are still valid.

* Responses to CR

Added docstrings, refactored the file finder, changed variable names,
and formatted the file

* More respones to CR
2019-06-27 10:08:27 -04:00
Shicong Huang
661e348fcb
Stop provisioning RegistryEnvironment from Dagger (#140)
We found that some webdriver tests failed because RegistryEnvironment
was set to 'production' by other test and was carried over to the
webdriver test, and it was nontrivial to fix them because the instance
of RegistryEnvironment was injected into the testing web server.

Also, to eliminate this problem from potential victims, we stopped
provisioning RegistryEnvironment from Dagger. Instead, we just use
RegistryEnvironment.get() function to get the instance, which indeed
retrives the value from system property every time. If any test case
needs to run the test with other environment, it can just simply use
the existing SystemPropertyRule and RegistryEnvironment.${ENV}.setup
to change it.
2019-06-26 16:57:19 -04:00
Lai Jiang
33a7808e9e
Disable Javadoc and tests in Java 12 (#135)
The API is deprecated and removed in Java 12. Do not build these
classes when using Java 12, till we migrate to the new API.
2019-06-25 22:19:36 -04:00
gbrodman
16b0c420a2
Use strict versions in NPM versioning (#132)
It'll reduce surprise version changes
2019-06-25 16:10:04 -04:00
Lai Jiang
b7f3154f4e
Update GCB beam deployment pipeline (#134)
* Update GCB beam deployment pipeline

Some of the texts are not really secerts because they are per-project.
Also changed the location of the credential file to `secerts` so that in
the future we may add more secerts in that folder.

The encrypted file is base64 encoded, consistent with how the proxy
certificates are encoded. Also made some changes to the other pipelines
to facilitate automation with Spinnaker
2019-06-24 14:36:56 -04:00
Lai Jiang
56105105b5
Exclude Visual Studio Code project files (#136)
* Exclude Visual Studio Code project files
2019-06-24 11:39:48 -04:00
Lai Jiang
368c264e3c
Update IAM binding to restrict proxy service account's access to GCS (#125)
Per
https://cloud.google.com/container-registry/docs/access-control#granting_users_and_other_projects_access_to_a_registry,
for a service account to access GCR, it does not need reader access to *all*
buckets in a project, but just the specific one.

This is duped from cl/254092941.
2019-06-21 15:59:01 -04:00
Lai Jiang
21be4b8227
Update README.md (#128) 2019-06-21 15:24:17 -04:00
gbrodman
3a485a03a6
Add a license-checking Python script (#123)
* Add a license-checking Python script

* Responses to CR
2019-06-21 12:25:35 -04:00
gbrodman
00147c1bc4
Install Chrome in the Cloud Build process (#124)
* Install Chrome in the Cloud Build process

It's not in the built-in Linux apt repos so we need to manually wget it

* Update package lock file
2019-06-20 18:19:23 -04:00
Lai Jiang
520145f641
Move terraform and kubernetes folder to be under proxy (#127)
* Move terraform and kubernetes folder to be under proxy

There is no reason for them to be under proxy/src/... any more now that
we have a Gradle-idiomatic folder structure.
2019-06-20 14:28:32 -04:00
Lai Jiang
9cd7c9402f
Always clone the internal repo to nomulus-internal
Also updated .gcloudignore to not pull in unnecessary files when running
`gcloud builds submit`.
2019-06-20 14:26:36 -04:00
jianglai
6d5777559f Put environment check in its separate task
The check for environment cannot be done when the task is defined,
otherwise running any task will fail when the check does not pass.
Instead, check the environment when the task executes.
2019-06-19 18:46:46 -04:00
jianglai
2a04e1adb4 Ask the gradle wrapper to download source as well
This helps IntelliJ display documentation when editing the `.gradle`
files.
2019-06-19 18:46:46 -04:00
jianglai
e7b00dc4ee Only allow commandine deployment to alpha 2019-06-19 18:46:46 -04:00
jianglai
0b52b87d92 Add a newline 2019-06-19 18:46:46 -04:00
jianglai
06c2456f45 Set default environment to production
This way when "gradle build" runs it will test if we can successfully
stage the produciton GAE files.
2019-06-19 18:46:46 -04:00
Lai Jiang
c56432ea09 Add tasks used in release as dependencies of the build task
Our CI (Travis & Kokoro) runs "gradle build", so we need to make
sure that all tasks used in the release process are called during
the build so that breakage can be caught earlier.

In order to stage the GAE folder we need gcloud to be present.
Therefore the Travis config is changed to install gcloud.

See: https://gist.github.com/mjackson/5887963e7d8b8fb0615416c510ae8857
2019-06-19 18:46:46 -04:00
Ben McIlwain
c50f16853b Don't use @RunWith JUnit annotations on classes with no @Tests
IntelliJ is complaining when this annotation is used on a base class that has no
actual runnable tests itself. The solution is different for different classes
depending on the existing pattern of where the @RunWith annotation is; for some,
it's simplest to move the annotation down to the few extending classes that are
missing it, whereas in others it's easiest just to annotate the base class as
abstract.
2019-06-19 17:43:01 -04:00
gbrodman
d3f0d34e2b
Use Gerrit / Googlesource version of nomulus-internal (#95)
* Use Gerrit / Googlesource version of nomulus-internal

* Remove tag deletion and use a variable substitution
2019-06-19 17:33:23 -04:00
gbrodman
e1db339b88
Add Spotless to the Gradle build (#88)
* Add Spotless to the Gradle build

* spotless apply

* one dot instead of two
2019-06-19 16:24:46 -04:00
gbrodman
973b29bc7a
Move the Soy files to the resources folder (#120) 2019-06-19 12:10:57 -04:00
Weimin Yu
efe33fc66e
Merge pull request #121 from weiminyu/deprecate
Fix or suppress some deprecation warnings
2019-06-19 11:30:02 -04:00
Shicong Huang
c6f2448d63
Merge pull request #122 from hstonec/upgrade-google-auth-lib
Upgrade google-auth-library-java to latest version
2019-06-18 17:54:24 -04:00
Shicong Huang
0630b371df Upgrade google-auth-library-java to latest version
This is a preparation for replacing the deprecated GoogleCredential
library.
2019-06-18 17:27:21 -04:00
Weimin Yu
e2a44b19ef Fix or suppress some deprecation warnings
Fix or suppress deprecation warnings except those about GoogleCredential,
which is being handled separately.

The @SuppressWarnings("deprecation") annotation does not cover imports
even when it is at the class level. We removed imports of deprecated
classes and use their fully qualified names in class body.
2019-06-18 17:23:45 -04:00
Lai Jiang
fd1c364a14
Remove unnecessary provider method (#113)
* Remove unnecessary provide method

This provider is not used. Instead, depending on if the login is performed on
[a remote machine or not](8bdc77501f/core/src/main/java/google/registry/tools/LoginCommand.java (L43)),
the instance is created directly in the command.

* Remove unused imports
2019-06-18 15:55:33 -04:00
Shicong Huang
3df11e7849
Merge pull request #105 from hstonec/deploy-beam-from-gcb
Add a CloudBuild task to deploy Beam pipeline
2019-06-18 15:34:28 -04:00