1 # Copyright 2019 The Go Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style
3 # license that can be found in the LICENSE file.
5 # Build gopls, and run the govim integration tests. See README.md for
6 # instructions on how to use this.
9 # This bucket must be owned by the GCP project executing the build. If
10 # you are running this from your own project, override using --substitutions.
11 _RESULT_BUCKET: 'golang-gopls_integration_tests'
14 # Build gopls from source, to use with the govim integration tests.
16 env: ['GOPROXY=https://proxy.golang.org']
20 # Run the tests. Note that the script in this step does not return the exit
21 # code from `go test`, but rather saves it for use in the final step after
22 # uploading artifacts.
23 - name: 'gcr.io/$PROJECT_ID/govim-harness:3'
29 - GOVIM_TESTSCRIPT_WORKDIR_ROOT=/artifacts
31 args: ['/workspace/gopls/integration/govim/run_tests_for_cloudbuild.sh']
33 # The govim tests produce a large number of artifacts; tarball/gzip to reduce
34 # roundtrips and save space.
39 args: ['tar', '-czf', 'artifacts.tar.gz', '/artifacts']
41 # Upload artifacts to GCS.
42 - name: 'gcr.io/cloud-builders/gsutil'
43 args: ['cp', 'artifacts.tar.gz', 'gs://${_RESULT_BUCKET}/govim/${BUILD_ID}/artifacts.tar.gz']
45 # Exit with the actual exit code of the integration tests.
47 args: ['bash', 'govim_test_result.sh']
49 # Write build logs to the same bucket as artifacts, so they can be more easily
51 logsBucket: 'gs://${_RESULT_BUCKET}'