Commit 082c7c6c authored by Wen Wei Li's avatar Wen Wei Li

complete whole CI/CD process

parent eae50cd9
Pipeline #4838 canceled with stage
...@@ -3,6 +3,20 @@ kind: pipeline ...@@ -3,6 +3,20 @@ kind: pipeline
type: docker type: docker
name: deploy name: deploy
steps: steps:
# build images
- name: build-and-publish-image
image: plugins/docker
settings:
registry: 192.168.17.110
repo: 192.168.17.110/study_group/ric-app-hw
dockerfile: Dockerfile
tags: 1.0.6
username:
from_secret: harbor_username
password:
from_secret: harbor_password
insecure : true
storage_driver: vfs
# scan # scan
- name: sast_scan - name: sast_scan
image: prlab/sast_scan image: prlab/sast_scan
...@@ -43,6 +57,25 @@ steps: ...@@ -43,6 +57,25 @@ steps:
source: /home/reports/ source: /home/reports/
depends_on: ["sast_scan", "code-analysis", "dependency-check-py"] depends_on: ["sast_scan", "code-analysis", "dependency-check-py"]
# deploy
- name: ssh_to_deploy
image: ghcr.io/appleboy/drone-ssh
settings:
host:
- 192.168.0.22
username:
from_secret: ssh_username
password:
from_secret: ssh_password
port: 22
command_timeout: 30s
script:
- cd /root/drone/
- if [ ! -d ${DRONE_REPO_NAME} ];then git clone ${DRONE_REPO_LINK}; fi
- cd /root/xAppSec
- ./xAppSec -c /root/drone/${DRONE_REPO_NAME}/init/config-file.json /root/drone/${DRONE_REPO_NAME}/init/schema.json &> /root/drone/log
depends_on: ["scp"]
volumes: volumes:
- name: cache - name: cache
......
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