Skip to content

Commit

Permalink
build(general): replaced jdk by docker openapitool
Browse files Browse the repository at this point in the history
Signed-off-by: jordigiam <jordi.giron.amezcua@accenture.com>
  • Loading branch information
jordigiam authored and jordigiam committed May 25, 2021
1 parent a4cb63b commit b4be654
Show file tree
Hide file tree
Showing 17 changed files with 13 additions and 33 deletions.
6 changes: 0 additions & 6 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@ RUN apt-get update \
RUN apt-get update \
&& apt-get install software-properties-common -y

# Install openJDK 8
RUN apt-get update \
&& apt-add-repository 'deb http://security.debian.org/debian-security stretch/updates main' \
&& apt-get update \
&& apt-get install openjdk-8-jdk -y

# Install pip3
RUN apt-get update \
&& apt-get install python3-pip -y
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,6 @@ jobs:
# - name: Set up Docker Buildx (ARM64 docker images once we are ready)
# uses: docker/setup-buildx-action@v1.0.3

- name: Set up JDK 8 (OpenAPI generator needs it)
uses: actions/setup-java@v1.4.3
with:
java-version: '8.0.275' # The JDK version to make available on the path.
java-package: jdk # (jre, jdk, or jdk+fx) - defaults to jdk
architecture: x64 # (x64 or x86) - defaults to x64

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2.1.2
with:
Expand Down
1 change: 0 additions & 1 deletion BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ The `npm run watch` script in action:
* WSL1 or WSL2 or any virtual machine running Ubuntu LTS
* Git
* NodeJS 12 or newer LTS (we recommend using nvm if available for your OS)
* OpenJDK 11
* Docker Engine
* Docker Compose

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dist/*"
],
"scripts": {
"generate-sdk": "openapi-generator generate --input-spec src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/",
"generate-sdk": "docker run --rm -v \"${PWD}:/local\" openapitools/openapi-generator-cli:v5.0.0-beta2 generate -i ./local/src/main/json/openapi.json -g typescript-axios -o ./local/src/main/typescript/generated/openapi/typescript-axios --reserved-words-mappings protected=protected",
"tsc": "tsc --project ./tsconfig.json",
"pretsc": "npm run generate-sdk",
"watch": "npm-watch",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dist/*"
],
"scripts": {
"generate-sdk": "openapi-generator generate --input-spec src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/",
"generate-sdk": "docker run --rm -v \"${PWD}:/local\" openapitools/openapi-generator-cli:v5.0.0-beta2 generate -i ./local/src/main/json/openapi.json -g typescript-axios -o ./local/src/main/typescript/generated/openapi/typescript-axios/",
"tsc": "tsc --project ./tsconfig.json",
"pretsc": "npm run generate-sdk",
"watch": "npm-watch",
Expand Down
3 changes: 0 additions & 3 deletions examples/carbon-accounting/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ FROM node:12.20.1-alpine3.12 as builder

RUN apk update

# Need JDK for the openapi-generator that is part of the build process
RUN apk add --no-cache openjdk8

# Need git because some of our npm depedencies might be coming
# straight from github instead of being an npm package on npmjs.com.
RUN apk add --no-cache git
Expand Down
3 changes: 0 additions & 3 deletions examples/supply-chain-app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ FROM node:12.20.1-alpine3.12 as builder

RUN apk update

# Need JDK for the openapi-generator that is part of the build process
RUN apk add --no-cache openjdk8

# Need git because some of our npm depedencies might be coming
# straight from github instead of being an npm package on npmjs.com.
RUN apk add --no-cache git
Expand Down
2 changes: 1 addition & 1 deletion packages/cactus-cmd-api-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"module": "dist/lib/main/typescript/index.js",
"types": "dist/types/main/typescript/index.d.ts",
"scripts": {
"generate-sdk": "openapi-generator generate --input-spec src/main/json/openapi.json -g typescript-axios -o src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected",
"generate-sdk": "docker run --rm -v \"${PWD}:/local\" openapitools/openapi-generator-cli:v5.0.0-beta2 generate -i ./local/src/main/json/openapi.json -g typescript-axios -o ./local/src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected",
"pretsc": "npm run generate-sdk",
"tsc": "tsc --project ./tsconfig.json",
"watch": "npm-watch",
Expand Down
2 changes: 1 addition & 1 deletion packages/cactus-core-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dist/*"
],
"scripts": {
"generate-sdk": "openapi-generator generate --input-spec src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected",
"generate-sdk": "docker run --rm -v \"${PWD}:/local\" openapitools/openapi-generator-cli:v5.0.0-beta2 generate -i ./local/src/main/json/openapi.json -g typescript-axios -o ./local/src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected",
"pretsc": "npm run generate-sdk",
"tsc": "tsc --project ./tsconfig.json",
"watch": "npm-watch",
Expand Down
2 changes: 1 addition & 1 deletion packages/cactus-plugin-consortium-manual/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dist/*"
],
"scripts": {
"generate-sdk": "openapi-generator generate --input-spec src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected",
"generate-sdk": "docker run --rm -v \"${PWD}/../../:/local\" openapitools/openapi-generator-cli:v5.0.0-beta2 generate -i ./local/packages/cactus-plugin-consortium-manual/src/main/json/openapi.json -g typescript-axios -o ./local/packages/cactus-plugin-consortium-manual/src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected",
"tsc": "tsc --project ./tsconfig.json",
"pretsc": "npm run generate-sdk",
"watch": "npm-watch",
Expand Down
2 changes: 1 addition & 1 deletion packages/cactus-plugin-keychain-memory/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dist/*"
],
"scripts": {
"generate-sdk": "openapi-generator generate --input-spec src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected",
"generate-sdk": "docker run --rm -v \"${PWD}:/local\" openapitools/openapi-generator-cli:v5.0.0-beta2 generate -i ./local/src/main/json/openapi.json -g typescript-axios -o ./local/src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected",
"pretsc": "npm run generate-sdk",
"tsc": "tsc --project ./tsconfig.json",
"watch": "npm-watch",
Expand Down
2 changes: 1 addition & 1 deletion packages/cactus-plugin-keychain-vault/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dist/*"
],
"scripts": {
"generate-sdk": "openapi-generator generate --input-spec src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/",
"generate-sdk": "docker run --rm -v \"${PWD}/../../:/local\" openapitools/openapi-generator-cli:v5.0.0-beta2 generate -i ./local/packages/cactus-plugin-keychain-vault/src/main/json/openapi.json -g typescript-axios -o ./local/packages/cactus-plugin-keychain-vault/src/main/typescript/generated/openapi/typescript-axios/",
"tsc": "tsc --project ./tsconfig.json",
"watch": "npm-watch",
"pretsc": "npm run generate-sdk",
Expand Down
2 changes: 1 addition & 1 deletion packages/cactus-plugin-ledger-connector-besu/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dist/*"
],
"scripts": {
"generate-sdk": "openapi-generator generate --input-spec src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected",
"generate-sdk": "docker run --rm -v \"${PWD}:/local\" openapitools/openapi-generator-cli:v5.0.0-beta2 generate -i ./local/src/main/json/openapi.json -g typescript-axios -o ./local/src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected",
"pretsc": "npm run generate-sdk",
"tsc": "tsc --project ./tsconfig.json",
"watch": "npm-watch",
Expand Down
4 changes: 2 additions & 2 deletions packages/cactus-plugin-ledger-connector-corda/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"dist/*"
],
"scripts": {
"generate-sdk": "openapi-generator generate --input-spec src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/",
"generate-server": "openapi-generator generate --input-spec src/main/json/openapi.json -g kotlin-spring -o ./src/main-server/kotlin/gen/kotlin-spring/ -c ./src/main-server/openapi-generator-config.yaml",
"generate-sdk": "docker run --rm -v \"${PWD}:/local\" openapitools/openapi-generator-cli:v5.0.0-beta2 generate -i ./local/src/main/json/openapi.json -g typescript-axios -o ./local/src/main/typescript/generated/openapi/typescript-axios/",
"generate-server": "docker run --rm -v \"${PWD}:/local\" openapitools/openapi-generator-cli:v5.0.0-beta2 generate -i ./local/src/main/json/openapi.json -g kotlin-spring -o ./local/src/main-server/kotlin/gen/kotlin-spring/ -c ./local/src/main-server/openapi-generator-config.yaml",
"pretsc": "npm-run-all generate-sdk generate-server",
"tsc": "tsc --project ./tsconfig.json",
"watch": "npm-watch",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dist/*"
],
"scripts": {
"generate-sdk": "openapi-generator generate --input-spec src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected",
"generate-sdk": "docker run --rm -v \"${PWD}:/local\" openapitools/openapi-generator-cli:v5.0.0-beta2 generate -i ./local/src/main/json/openapi.json -g typescript-axios -o ./local/src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected",
"pretsc": "npm run generate-sdk",
"tsc": "tsc --project ./tsconfig.json",
"watch": "npm-watch",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dist/*"
],
"scripts": {
"generate-sdk": "openapi-generator generate --input-spec src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected",
"generate-sdk": "docker run --rm -v \"${PWD}:/local\" openapitools/openapi-generator-cli:v5.0.0-beta2 generate -i ./local/src/main/json/openapi.json -g typescript-axios -o ./local/src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected",
"pretsc": "npm run generate-sdk",
"tsc": "tsc --project ./tsconfig.json",
"watch": "npm-watch",
Expand Down
2 changes: 1 addition & 1 deletion packages/cactus-plugin-ledger-connector-xdai/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dist/*"
],
"scripts": {
"generate-sdk": "openapi-generator generate --input-spec src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected",
"generate-sdk": "docker run --rm -v \"${PWD}:/local\" openapitools/openapi-generator-cli:v5.0.0-beta2 generate -i ./local/src/main/json/openapi.json -g typescript-axios -o ./local/src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected",
"pretsc": "npm run generate-sdk",
"tsc": "tsc --project ./tsconfig.json",
"watch": "npm-watch",
Expand Down

0 comments on commit b4be654

Please sign in to comment.