From 5790d1e1c299ef3e9a033aa45486cb5482fb445a Mon Sep 17 00:00:00 2001 From: hsc Date: Mon, 7 Apr 2025 17:49:30 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=B7=BB=E5=8A=A0=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=97=A0=E5=85=B3=E6=96=87=E4=BB=B6=E7=9A=84=20.gitignore=20?= =?UTF-8?q?=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 忽略 Maven 构建目录 /target - 忽略 IntelliJ IDEA 项目配置文件 /.idea- 忽略未定义日志路径文件 /log.path_IS_UNDEFINED- 忽略临时文件目录 /tmp --- .drone.yml | 5 ++--- hello.sh | 13 ++++++++++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index af529d8..4556b7d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -6,6 +6,5 @@ steps: - name: run-hello-script image: docker.1ms.run/alpine:latest # 必须指定基础镜像(如alpine/bash) commands: - - echo "hello world" - - echo "hello world" - - echo "hello wor123123123ld" + - chmod +x ./hello.sh + - ./hello.sh diff --git a/hello.sh b/hello.sh index 69541bb..9903b0c 100644 --- a/hello.sh +++ b/hello.sh @@ -1,4 +1,15 @@ +# 定义变量 NAME="芒星DevOps指挥脚本" VERSION="alpine" -echo "Welcome To NAME :${NAME}" \ No newline at end of file +# 输出欢迎信息 +echo "Welcome To ${NAME} : Version ${VERSION}" + +# 其他功能示例 +# 检查当前目录 +CURRENT_DIR=$(pwd) +echo "当前目录是: ${CURRENT_DIR}" + +# 列出当前目录下的文件 +echo "当前目录下的文件有:" +ls -l \ No newline at end of file