From 76f41fe4d675fea077303208e9c8e5f5d3b58b38 Mon Sep 17 00:00:00 2001 From: Murtadha Date: Thu, 11 Jul 2024 21:50:47 -0400 Subject: [PATCH] Reconfigure pipeline script --- .woodpecker.yml | 48 ++++++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 8bb3a14..601d00f 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,31 +1,35 @@ +pipeline: + build: + image: docker:dind + privileged: true + commands: + - docker build -t frontend:${CI_COMMIT_SHA:0:8} . + - docker tag frontend:${CI_COMMIT_SHA:0:8} frontend:latest + + deploy: + image: docker:dind + privileged: true + commands: + - docker stop frontend || true + - docker rm frontend || true + - docker run -d --name frontend -p 5173:5173 frontend:latest + +# clone: +# git: +# image: woodpeckerci/plugin-git +# settings: +# depth: 1 + # pipeline: # build_and_deploy: -# image: bash +# image: docker:dind +# privileged: true # commands: +# - sleep 5 # Give Docker daemon time to start # - docker build -t frontend:${CI_COMMIT_SHA:0:8} . # - docker tag frontend:${CI_COMMIT_SHA:0:8} frontend:latest # - docker stop frontend || true # - docker rm frontend || true -# - docker run -d --name frontend -p 5173:5173 frontend:latest - -# branches: master - -clone: - git: - image: woodpeckerci/plugin-git - settings: - depth: 1 - -pipeline: - build_and_deploy: - image: docker:dind - privileged: true - commands: - - sleep 5 # Give Docker daemon time to start - - docker build -t frontend:${CI_COMMIT_SHA:0:8} . - - docker tag frontend:${CI_COMMIT_SHA:0:8} frontend:latest - - docker stop frontend || true - - docker rm frontend || true - - docker run -d --name frontend -p 5137:5137 frontend:latest +# - docker run -d --name frontend -p 5137:5137 frontend:latest branches: master \ No newline at end of file