diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..6976e25 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,34 @@ +kind: pipeline +type: ssh +name: humas-fe-build + +server: + host: + from_secret: ssh_host + user: + from_secret: ssh_user + ssh_key: + from_secret: ssh_key + +steps: + - name: prepare repo + when: + branch: + - prod + commands: + - rm -rf /opt/build/web-humas-fe + - mkdir -p /opt/build/web-humas-fe + - cd /opt/build + - git clone http://38.47.180.165:3000/humas/web-humas-fe.git + - cd /opt/build/web-humas-fe + - git checkout $DRONE_BRANCH + + - name: build image + when: + branch: + - prod + commands: + - docker login 38.47.180.165:3000 -u administrator -p HarborDockerImageRep0 + - cd /opt/build/web-humas-fe + - docker build -t 38.47.180.165:3000/humas/web-humas-fe:$DRONE_BRANCH . + - docker push 38.47.180.165:3000/humas/web-humas-fe:$DRONE_BRANCH