-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merged generating swagger into one script
- Loading branch information
1 parent
c90457d
commit feca96b
Showing
6 changed files
with
15 additions
and
258 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
.cilibs/setup_swagger_codegen.sh → .cilibs/setup_swagger.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.