Skip to content

Commit 7f1cc6b

Browse files
author
ace-n
committed
Split lint out into separate build
1 parent 9aaf3af commit 7f1cc6b

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

.kokoro/lint.cfg

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
env_vars: {
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-kokoro-resources/php74"
7+
}
8+
9+
env_vars: {
10+
key: "RUN_CS_CHECK"
11+
value: "true"
12+
}

.kokoro/lint.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/bash
2+
3+
# Copyright 2021 Google Inc.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
set -e
18+
19+
if [ "${BASH_DEBUG}" = "true" ]; then
20+
set -x
21+
fi
22+
23+
# Kokoro directory for running these samples
24+
cd github/php-docs-samples
25+
26+
mkdir -p build/logs
27+
28+
export PULL_REQUEST_NUMBER=$KOKORO_GITHUB_PULL_REQUEST_NUMBER
29+
30+
# Run code standards check when appropriate
31+
if [ "${RUN_CS_CHECK}" = "true" ]; then
32+
bash testing/run_cs_check.sh
33+
fi

0 commit comments

Comments
 (0)