From d8a9ece1b18e7b53b5a075623bc8db140e47fb85 Mon Sep 17 00:00:00 2001 From: JCNoguera <88061365+VmMad@users.noreply.github.com> Date: Mon, 22 Apr 2024 15:22:34 +0200 Subject: [PATCH] hotfix: nova broken ci (#1421) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * hotfix: nova broken ci * fix: revert dockerfiles to og state and update setup:dev script --------- Co-authored-by: Begoña Álvarez de la Cruz --- .github/workflows/nova-build-temp.yaml | 11 +++++++---- api/Dockerfile | 22 ++-------------------- client/Dockerfile | 12 ++---------- package.json | 3 ++- 4 files changed, 13 insertions(+), 35 deletions(-) diff --git a/.github/workflows/nova-build-temp.yaml b/.github/workflows/nova-build-temp.yaml index d4d3caff8..45c023289 100644 --- a/.github/workflows/nova-build-temp.yaml +++ b/.github/workflows/nova-build-temp.yaml @@ -10,13 +10,16 @@ jobs: name: Set Environment Variables runs-on: ubuntu-latest outputs: - version_tag: ${{ steps.env_vars.outputs.version_tag }} + version_tag: ${{ steps.set_version_tag.outputs.version_tag }} steps: - - name: Set up the version tag for docker images and deploy environment - id: env_vars + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up the version tag for docker images + id: set_version_tag run: | COMMIT_HASH=$(git rev-parse --short HEAD) - echo "VERSION_TAG=$COMMIT_HASH" >> $GITHUB_ENV + echo "VERSION_TAG=$COMMIT_HASH" >> $GITHUB_OUTPUT use-reusable-workflow: strategy: diff --git a/api/Dockerfile b/api/Dockerfile index 52838f84a..9d76f4658 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -1,31 +1,13 @@ FROM node:16.20.2-bullseye ## Include the build tools for any npm packages that rebuild -RUN apt-get update && apt-get install -y \ - build-essential \ - pkg-config \ - libssl-dev \ - libudev-dev \ - cmake \ - clang \ - curl \ - git \ - python3 \ - && rm -rf /var/lib/apt/lists/* +RUN apt install git curl python3 # Working DIR WORKDIR /usr/src/app # Copy everything from current Folder -# COPY . ./ - -# Copy iota-sdk-nova deps REMOVE THIS for prod -# Get Rust -RUN curl https://sh.rustup.rs -sSf | bash -s -- -y -ENV PATH="${PATH}:/root/.cargo/bin" - -COPY ./api ./ -COPY ./iota-sdk/ ../iota-sdk/ +COPY . ./ # Set the env variables ARG CONFIG_ID diff --git a/client/Dockerfile b/client/Dockerfile index 146215714..ab398864e 100644 --- a/client/Dockerfile +++ b/client/Dockerfile @@ -11,15 +11,7 @@ RUN apt-get update && apt-get install -y \ WORKDIR /usr/src/app # Copy everything from current Folder -# COPY . ./ - -# Copy iota-sdk-nova deps REMOVE THIS for prod -# Get Rust -RUN curl https://sh.rustup.rs -sSf | bash -s -- -y -ENV PATH="${PATH}:/root/.cargo/bin" - -COPY ./client ./ -COPY ./iota-sdk/ ../iota-sdk/ +COPY . ./ # A minimal NGINX configuration RUN echo 'server {\ @@ -40,4 +32,4 @@ RUN npm run build EXPOSE 80 # Serve the prod build -CMD ["nginx", "-g", "daemon off;"] +CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/package.json b/package.json index 449fda367..de8005ff5 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ "scripts": { "setup:client": "cd client && npm install && npm run postinstall", "setup:api": "cd api && npm install && npm run build-compile && npm run build-config", - "setup:dev": "npm run clear && npm run setup:sdk-nova-local && npm run prepare && npm run setup:client && npm run setup:api", + "setup:dev": "npm run clear && npm run prepare && npm run setup:client && npm run setup:api", + "setup:dev-build-sdk": "npm run clear && npm run setup:sdk-nova-local && npm run prepare && npm run setup:client && npm run setup:api", "clear": "rimraf api/node_modules api/dist client/node_modules client/build", "dev": "concurrently 'cd api && npm run start-dev' 'cd client && npm run start'", "prepare": "husky install",