order
This commit is contained in:
parent
4ed8c776d4
commit
724f28d17f
1 changed files with 8 additions and 8 deletions
16
cd.sh
16
cd.sh
|
@ -46,24 +46,24 @@ cd_set_environment () {
|
||||||
# ci / github
|
# ci / github
|
||||||
if [ "${GITHUB_ACTIONS}" ] ; then
|
if [ "${GITHUB_ACTIONS}" ] ; then
|
||||||
CD_SERVER_URL="${GITHUB_SERVER_URL}"
|
CD_SERVER_URL="${GITHUB_SERVER_URL}"
|
||||||
CD_PROJECT_BRANCH="${GITHUB_REF_NAME}"
|
|
||||||
CD_PROJECT_NAME="$(basename "${GITHUB_REPOSITORY}")"
|
|
||||||
CD_PROJECTS_GROUP="$(dirname "${GITHUB_REPOSITORY}")"
|
CD_PROJECTS_GROUP="$(dirname "${GITHUB_REPOSITORY}")"
|
||||||
|
CD_PROJECT_NAME="$(basename "${GITHUB_REPOSITORY}")"
|
||||||
|
CD_PROJECT_BRANCH="${GITHUB_REF_NAME}"
|
||||||
# ci / gitlab
|
# ci / gitlab
|
||||||
elif [ "${GITLAB_CI}" ] ; then
|
elif [ "${GITLAB_CI}" ] ; then
|
||||||
CD_SERVER_URL="${CI_SERVER_URL}"
|
CD_SERVER_URL="${CI_SERVER_URL}"
|
||||||
CD_PROJECT_BRANCH="${CI_COMMIT_BRANCH}"
|
|
||||||
CD_PROJECT_NAME="$(basename "${CI_PROJECT_PATH}")"
|
|
||||||
CD_PROJECTS_GROUP="$(dirname "${CI_PROJECT_PATH}")"
|
CD_PROJECTS_GROUP="$(dirname "${CI_PROJECT_PATH}")"
|
||||||
|
CD_PROJECT_NAME="$(basename "${CI_PROJECT_PATH}")"
|
||||||
|
CD_PROJECT_BRANCH="${CI_COMMIT_BRANCH}"
|
||||||
# ci / none
|
# ci / none
|
||||||
else
|
else
|
||||||
cd_error_ci "ø"
|
cd_error_ci "ø"
|
||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
[ "${CD_SERVER_URL}" ] || cd_error_ci "CD_SERVER_URL"
|
[ "${CD_SERVER_URL}" ] || cd_error_ci "CD_SERVER_URL"
|
||||||
[ "${CD_PROJECT_BRANCH}" ] || cd_error_ci "CD_PROJECT_BRANCH"
|
|
||||||
[ "${CD_PROJECT_NAME}" ] || cd_error_ci "CD_PROJECT_NAME"
|
|
||||||
[ "${CD_PROJECTS_GROUP}" ] || cd_error_ci "CD_PROJECTS_GROUP"
|
[ "${CD_PROJECTS_GROUP}" ] || cd_error_ci "CD_PROJECTS_GROUP"
|
||||||
|
[ "${CD_PROJECT_NAME}" ] || cd_error_ci "CD_PROJECT_NAME"
|
||||||
|
[ "${CD_PROJECT_BRANCH}" ] || cd_error_ci "CD_PROJECT_BRANCH"
|
||||||
#
|
#
|
||||||
CD_PROJECTS_URL="${CD_SERVER_URL}/${CD_PROJECTS_GROUP}"
|
CD_PROJECTS_URL="${CD_SERVER_URL}/${CD_PROJECTS_GROUP}"
|
||||||
CD_PROJECT_URL="${CD_PROJECTS_URL}/${CD_PROJECT_NAME}"
|
CD_PROJECT_URL="${CD_PROJECTS_URL}/${CD_PROJECT_NAME}"
|
||||||
|
@ -78,9 +78,9 @@ CD_PYTHON_COMMAND=${CD_PYTHON_COMMAND}
|
||||||
CD_PYTHON_PACKAGES=${CD_PYTHON_PACKAGES}
|
CD_PYTHON_PACKAGES=${CD_PYTHON_PACKAGES}
|
||||||
#
|
#
|
||||||
CD_SERVER_URL=${CD_SERVER_URL}
|
CD_SERVER_URL=${CD_SERVER_URL}
|
||||||
CD_PROJECT_BRANCH=${CD_PROJECT_BRANCH}
|
|
||||||
CD_PROJECT_NAME=${CD_PROJECT_NAME}
|
|
||||||
CD_PROJECTS_GROUP=${CD_PROJECTS_GROUP}
|
CD_PROJECTS_GROUP=${CD_PROJECTS_GROUP}
|
||||||
|
CD_PROJECT_NAME=${CD_PROJECT_NAME}
|
||||||
|
CD_PROJECT_BRANCH=${CD_PROJECT_BRANCH}
|
||||||
#
|
#
|
||||||
CD_PROJECTS_URL=${CD_PROJECTS_URL}
|
CD_PROJECTS_URL=${CD_PROJECTS_URL}
|
||||||
CD_PROJECT_URL=${CD_PROJECT_URL}
|
CD_PROJECT_URL=${CD_PROJECT_URL}
|
||||||
|
|
Loading…
Reference in a new issue