diff --git a/draught_web/.dockerignore b/.dockerignore similarity index 76% rename from draught_web/.dockerignore rename to .dockerignore index 77d1a3e..605132b 100644 --- a/draught_web/.dockerignore +++ b/.dockerignore @@ -1,7 +1,7 @@ .github .jenkins .git -pkg +draught_web/pkg target **/dist **/node_modules \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 42392c6..bae0289 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -83,7 +83,5 @@ jobs: - name: Build & Push Container uses: docker/build-push-action@v2 with: - file: ./draught_web/Dockerfile - context: ./draught_web push: true tags: sarsoo/draught:latest \ No newline at end of file diff --git a/.jenkins/jenkinsfile b/.jenkins/jenkinsfile index 6a0d6b7..f71c3a8 100644 --- a/.jenkins/jenkinsfile +++ b/.jenkins/jenkinsfile @@ -6,12 +6,9 @@ pipeline { when { branch 'master' } steps { script { - dir('draught_web') + docker.withRegistry('https://registry.sarsoo.xyz', 'git-registry-creds') { - docker.withRegistry('https://registry.sarsoo.xyz', 'git-registry-creds') - { - docker.build("sarsoo/draught:latest").push() - } + docker.build("sarsoo/draught:latest").push() } } } diff --git a/draught_web/Dockerfile b/Dockerfile similarity index 94% rename from draught_web/Dockerfile rename to Dockerfile index 5fbd7d5..00a548f 100644 --- a/draught_web/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM rust:1.71 AS rust-build RUN curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh -COPY .. /draught +COPY . /draught WORKDIR /draught/draught_web RUN wasm-pack build --release @@ -12,7 +12,7 @@ RUN cargo doc --no-deps --document-private-items FROM node:20-alpine AS js-build -COPY .. /draught +COPY . /draught WORKDIR /draught/draught_web COPY --from=rust-build /draught/draught_web/pkg /draught/draught_web/pkg