Commit ec894db2 authored by priyaranjan.dr's avatar priyaranjan.dr

Update .gitlab-ci.yml

parent 168b71c5
Pipeline #12163 failed with stage
in 0 seconds
stages:
- build
- deploy
build:
stage: build
image: alpine
before_script:
- apk add zip
script:
- mkdir .public1
- touch public/index.html
- echo "<h1>New Deployment<h1>" >> public/index.html
artifacts:
paths:
- public.zip
deploy:
stage: deploy
image: alpine
before_script:
- apk add openssh-client
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
script:
- scp -o StrictH0stKeyChecking=no public.zip administrator@192.168.3.183:/home/administrator/pdrkl
- ssh -o StrictH0stKeyChecking=no public.zip administrator@192.168.3.183 "cd/home/administrator/pdrkl; touch foo.txt; unzip public.zip"
- sshpass -p "admin@123" ssh administrator@192.168.3.183
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment