Skip to content

Commit 2b253c8

Browse files
authored
Add a separate buildkite step checking code formatting and licenses (temporalio#253)
1 parent 42d5b78 commit 2b253c8

File tree

5 files changed

+47
-12
lines changed

5 files changed

+47
-12
lines changed

.buildkite/pipeline.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,18 @@ steps:
99
- docker-compose#v3.0.0:
1010
run: unit-test
1111
config: docker/buildkite/docker-compose.yaml
12-
12+
13+
- label: ":copyright: Copyright and code format"
14+
agents:
15+
queue: "default"
16+
docker: "*"
17+
command: "docker/buildkite/copyright-and-code-format.sh"
18+
timeout_in_minutes: 15
19+
plugins:
20+
- docker-compose#v3.8.0:
21+
run: unit-test
22+
config: docker/buildkite/docker-compose.yaml
23+
1324
- label: ":alien: Fossa scan"
1425
agents:
1526
queue: "default"

.github/CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Primary owners
2+
3+
* @tsurdilo @Spikhalskiy

docker/buildkite/Dockerfile

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
1-
FROM openjdk:8-alpine
2-
3-
# Based on https://github.com/sgerrand/alpine-pkg-glibc
4-
# Needed to run protoc java plugin
5-
RUN wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub
6-
RUN wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.31-r0/glibc-2.31-r0.apk
7-
RUN apk add glibc-2.31-r0.apk
8-
9-
# Install dependencies using apk
10-
RUN apk update && apk add --virtual wget ca-certificates wget && apk add protobuf
1+
FROM openjdk:8-slim
112

123
# Git is needed in order to update the dls submodule
13-
RUN apk add --virtual git
4+
RUN apt-get update && apt-get install -y wget protobuf-compiler git
145

156
# Fossa to run license scans
167
RUN wget -O- https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | sh
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
set -xeou pipefail
3+
4+
./gradlew --no-daemon check -x test
5+
6+
if [ ! -z "$(git status --porcelain)" ]; then
7+
echo 'Some files were improperly formatted. Please run build locally and check in all changes.'
8+
git status;
9+
exit 1;
10+
fi
11+

src/main/java/io/temporal/samples/payloadconverter/crypto/MyCustomer.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
/*
2+
* Copyright (c) 2020 Temporal Technologies, Inc. All Rights Reserved
3+
*
4+
* Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5+
*
6+
* Modifications copyright (C) 2017 Uber Technologies, Inc.
7+
*
8+
* Licensed under the Apache License, Version 2.0 (the "License"). You may not
9+
* use this file except in compliance with the License. A copy of the License is
10+
* located at
11+
*
12+
* http://aws.amazon.com/apache2.0
13+
*
14+
* or in the "license" file accompanying this file. This file is distributed on
15+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
16+
* express or implied. See the License for the specific language governing
17+
* permissions and limitations under the License.
18+
*/
19+
120
package io.temporal.samples.payloadconverter.crypto;
221

322
import com.codingrodent.jackson.crypto.Encrypt;

0 commit comments

Comments
 (0)