From 73c273cb8ac8c731a4bbb81fc3f2ee589e558a97 Mon Sep 17 00:00:00 2001 From: The17thDoctor <40616434+The17thDoctor@users.noreply.github.com> Date: Mon, 10 Mar 2025 07:15:49 +0100 Subject: [PATCH] MaJ pipeline --- .idea/.gitignore | 5 ---- .idea/inspectionProfiles/Project_Default.xml | 6 ----- .idea/modules.xml | 8 ------ .idea/portfolio.iml | 12 --------- .idea/vcs.xml | 6 ----- dockerfile | 27 ++++++++++++++++++++ pipeline.yml | 20 ++++++++++----- 7 files changed, 40 insertions(+), 44 deletions(-) delete mode 100644 .idea/.gitignore delete mode 100644 .idea/inspectionProfiles/Project_Default.xml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/portfolio.iml delete mode 100644 .idea/vcs.xml create mode 100644 dockerfile diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index b58b603..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Editor-based HTTP Client requests -/httpRequests/ diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index 03d9549..0000000 --- a/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 7dec97e..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/portfolio.iml b/.idea/portfolio.iml deleted file mode 100644 index 24643cc..0000000 --- a/.idea/portfolio.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1dd..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/dockerfile b/dockerfile new file mode 100644 index 0000000..f2c4e80 --- /dev/null +++ b/dockerfile @@ -0,0 +1,27 @@ +FROM node:latest AS build + +WORKDIR /build + +# Copy source files +COPY src src +COPY public public +COPY package.json package.json +COPY package-lock.json package-lock.json + +# Install dependencies & build +RUN npm install +RUN npm run build + +# Final image +FROM node:latest AS final +WORKDIR /app + +EXPOSE 3000 + +# Install serve for serving +RUN npm install -g serve + +# Copy build +COPY --from=build /build/build/ /app/ + +ENTRYPOINT [ "serve", "-s", "/app" ] \ No newline at end of file diff --git a/pipeline.yml b/pipeline.yml index 03098f5..7530eee 100644 --- a/pipeline.yml +++ b/pipeline.yml @@ -2,11 +2,17 @@ kind: pipeline type: exec name: default -platform: - os: linux - arch: amd64 - steps: -- name: greeting - commands: - - echo hello world \ No newline at end of file +- name: Build + image: plugins/docker + settings: + dockerfile: dockerfile + repo: portfolio + tags: + - latest + +trigger: + branch: + - master + event: + - push \ No newline at end of file