Merge pull request #27 from svc-design/ci-runner-alpine-ansible-lint

alpine-ansible-lint: entrypoint.sh update
This commit is contained in:
shenlan 2024-04-13 18:41:13 +08:00 committed by GitHub
commit 7cd3b11bb6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,10 +1,17 @@
#!/bin/sh
set -e
# check if there was a command passed
# required by Jenkins Docker plugin: https://github.com/docker-library/official-images#consistency
# https://issues.jenkins.io/browse/JENKINS-51307?focusedCommentId=341121&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel
set -e
echo "Starting entrypoint script..."
# Check if there was a command passed
if [ "$1" ]; then
# execute it
echo "Executing passed command: $@"
exec "$@"
else
echo "No command provided, running default application..."
# 在这里指定一个默认命令,如果通常没有特定的命令需要执行
exec /bin/bash
fi