Skip to content

Commit

Permalink
merged generating swagger into one script
Browse files Browse the repository at this point in the history
  • Loading branch information
rparadowski committed Jul 15, 2020
1 parent c90457d commit feca96b
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 258 deletions.
6 changes: 0 additions & 6 deletions .cilibs/generate_gateapi_go_code.sh

This file was deleted.

8 changes: 1 addition & 7 deletions .cilibs/generate_swagger.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,5 @@ GATE_API_BRANCH=$1

.cilibs/prepare_extra_directories.sh

.cilibs/setup_swagger_codegen.sh

.cilibs/get_gate_code.sh $GATE_API_BRANCH

.cilibs/generate_swagger_json.sh

.cilibs/generate_gateapi_go_code.sh
.cilibs/setup_swagger.sh $GATE_API_BRANCH

7 changes: 0 additions & 7 deletions .cilibs/generate_swagger_json.sh

This file was deleted.

7 changes: 0 additions & 7 deletions .cilibs/get_gate_code.sh

This file was deleted.

14 changes: 14 additions & 0 deletions .cilibs/setup_swagger_codegen.sh → .cilibs/setup_swagger.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
#!/bin/bash -e

GATE_API_BRANCH=$1

echo "Setup swagger-codegen"
SWAGGER_VERSION=$(cat gateapi/.swagger-codegen/VERSION)
wget https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/${SWAGGER_VERSION}/swagger-codegen-cli-${SWAGGER_VERSION}.jar -O swagger-codegen-cli.jar
wget https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/${SWAGGER_VERSION}/swagger-codegen-cli-${SWAGGER_VERSION}.jar.sha1 -O swagger-codegen-cli.jar.sha1
echo ' swagger-codegen-cli.jar' >> swagger-codegen-cli.jar.sha1
sha1sum -c swagger-codegen-cli.jar.sha1
mv swagger-codegen-cli.jar /floodgate/bin/

echo "Get gate code"
git clone https://github.com/spinnaker/gate.git -b ${GATE_API_BRANCH} /floodgate/gate

echo "Generate swagger.json"
cd /floodgate/gate
./gradlew clean
./gradlew gate-web:test --tests *GenerateSwagger* --max-workers 2
cat gate-web/swagger.json | json_pp > ./gate-swagger.json

echo "Generate gateapi go code"
java -jar /floodgate/bin/swagger-codegen-cli.jar generate -l go -i /floodgate/gate/gate-swagger.json -o /floodgate/gateapi
231 changes: 0 additions & 231 deletions .circleci/config.yml

This file was deleted.

0 comments on commit feca96b

Please sign in to comment.