You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

106 lines
5.5 KiB

package env
import (
"os"
)
// List of CI env variables with an example value comment
var (
CI string // Example: drone
CI_BUILD_CREATED string // Example: 1639112012
CI_BUILD_EVENT string // Example: pull_request
CI_BUILD_FINISHED string // Example: 1639112085
CI_BUILD_LINK string // Example: https://git.jojodev.com/Canopy/website/pulls/1
CI_BUILD_NUMBER string // Example: 17
CI_BUILD_STARTED string // Example: 1639112014
CI_BUILD_STATUS string // Example: success
CI_COMMIT_AUTHOR string // Example: jolheiser
CI_COMMIT_AUTHOR_AVATAR string // Example: https://git.jojodev.com/user/avatar/jolheiser/-1
CI_COMMIT_AUTHOR_NAME string // Example: jolheiser
CI_COMMIT_BRANCH string // Example: main
CI_COMMIT_MESSAGE string // Example: Add netlify process
CI_COMMIT_REF string // Example: refs/pull/1/head
CI_COMMIT_REFSPEC string // Example: netlify:main
CI_COMMIT_SHA string // Example: 2abc3b37e83ac31ec8210b8504e64896a49f249c
CI_JOB_FINISHED string // Example: 1639112085
CI_JOB_NUMBER string // Example: 1
CI_JOB_STARTED string // Example: 1639112014
CI_JOB_STATUS string // Example: success
CI_PREV_BUILD_CREATED string // Example: 1639111573
CI_PREV_BUILD_EVENT string // Example: pull_request
CI_PREV_BUILD_FINISHED string // Example: 1639111668
CI_PREV_BUILD_LINK string // Example: https://git.jojodev.com/Canopy/website/pulls/1
CI_PREV_BUILD_NUMBER string // Example: 15
CI_PREV_BUILD_STARTED string // Example: 1639111575
CI_PREV_BUILD_STATUS string // Example: failure
CI_PREV_COMMIT_AUTHOR string // Example: jolheiser
CI_PREV_COMMIT_AUTHOR_AVATAR string // Example: https://git.jojodev.com/user/avatar/jolheiser/-1
CI_PREV_COMMIT_AUTHOR_NAME string // Example: jolheiser
CI_PREV_COMMIT_BRANCH string // Example: main
CI_PREV_COMMIT_MESSAGE string // Example: Add netlify process
CI_PREV_COMMIT_REF string // Example: refs/pull/1/head
CI_PREV_COMMIT_REFSPEC string // Example: netlify:main
CI_PREV_COMMIT_SHA string // Example: 5329dfdfef3f1388b1698aa5fe99a26edd15f7fa
CI_PULL_REQUEST string // Example: 1
CI_REMOTE_URL string // Example: https://git.jojodev.com/Canopy/website.git
CI_REPO string // Example: Canopy/website
CI_REPO_LINK string // Example: https://git.jojodev.com/Canopy/website
CI_REPO_NAME string // Example: Canopy/website
CI_REPO_REMOTE string // Example: https://git.jojodev.com/Canopy/website.git
CI_SYSTEM string // Example: woodpecker
CI_SYSTEM_ARCH string // Example: linux/amd64
CI_SYSTEM_HOST string // Example: ci.jojodev.com
CI_SYSTEM_LINK string // Example: https://ci.jojodev.com
CI_SYSTEM_NAME string // Example: woodpecker
CI_WORKSPACE string // Example: /woodpecker/src/git.jojodev.com/Canopy/website
)
func init() {
CI = os.Getenv("CI")
CI_BUILD_CREATED = os.Getenv("CI_BUILD_CREATED")
CI_BUILD_EVENT = os.Getenv("CI_BUILD_EVENT")
CI_BUILD_FINISHED = os.Getenv("CI_BUILD_FINISHED")
CI_BUILD_LINK = os.Getenv("CI_BUILD_LINK")
CI_BUILD_NUMBER = os.Getenv("CI_BUILD_NUMBER")
CI_BUILD_STARTED = os.Getenv("CI_BUILD_STARTED")
CI_BUILD_STATUS = os.Getenv("CI_BUILD_STATUS")
CI_COMMIT_AUTHOR = os.Getenv("CI_COMMIT_AUTHOR")
CI_COMMIT_AUTHOR_AVATAR = os.Getenv("CI_COMMIT_AUTHOR_AVATAR")
CI_COMMIT_AUTHOR_NAME = os.Getenv("CI_COMMIT_AUTHOR_NAME")
CI_COMMIT_BRANCH = os.Getenv("CI_COMMIT_BRANCH")
CI_COMMIT_MESSAGE = os.Getenv("CI_COMMIT_MESSAGE")
CI_COMMIT_REF = os.Getenv("CI_COMMIT_REF")
CI_COMMIT_REFSPEC = os.Getenv("CI_COMMIT_REFSPEC")
CI_COMMIT_SHA = os.Getenv("CI_COMMIT_SHA")
CI_JOB_FINISHED = os.Getenv("CI_JOB_FINISHED")
CI_JOB_NUMBER = os.Getenv("CI_JOB_NUMBER")
CI_JOB_STARTED = os.Getenv("CI_JOB_STARTED")
CI_JOB_STATUS = os.Getenv("CI_JOB_STATUS")
CI_PREV_BUILD_CREATED = os.Getenv("CI_PREV_BUILD_CREATED")
CI_PREV_BUILD_EVENT = os.Getenv("CI_PREV_BUILD_EVENT")
CI_PREV_BUILD_FINISHED = os.Getenv("CI_PREV_BUILD_FINISHED")
CI_PREV_BUILD_LINK = os.Getenv("CI_PREV_BUILD_LINK")
CI_PREV_BUILD_NUMBER = os.Getenv("CI_PREV_BUILD_NUMBER")
CI_PREV_BUILD_STARTED = os.Getenv("CI_PREV_BUILD_STARTED")
CI_PREV_BUILD_STATUS = os.Getenv("CI_PREV_BUILD_STATUS")
CI_PREV_COMMIT_AUTHOR = os.Getenv("CI_PREV_COMMIT_AUTHOR")
CI_PREV_COMMIT_AUTHOR_AVATAR = os.Getenv("CI_PREV_COMMIT_AUTHOR_AVATAR")
CI_PREV_COMMIT_AUTHOR_NAME = os.Getenv("CI_PREV_COMMIT_AUTHOR_NAME")
CI_PREV_COMMIT_BRANCH = os.Getenv("CI_PREV_COMMIT_BRANCH")
CI_PREV_COMMIT_MESSAGE = os.Getenv("CI_PREV_COMMIT_MESSAGE")
CI_PREV_COMMIT_REF = os.Getenv("CI_PREV_COMMIT_REF")
CI_PREV_COMMIT_REFSPEC = os.Getenv("CI_PREV_COMMIT_REFSPEC")
CI_PREV_COMMIT_SHA = os.Getenv("CI_PREV_COMMIT_SHA")
CI_PULL_REQUEST = os.Getenv("CI_PULL_REQUEST")
CI_REMOTE_URL = os.Getenv("CI_REMOTE_URL")
CI_REPO = os.Getenv("CI_REPO")
CI_REPO_LINK = os.Getenv("CI_REPO_LINK")
CI_REPO_NAME = os.Getenv("CI_REPO_NAME")
CI_REPO_REMOTE = os.Getenv("CI_REPO_REMOTE")
CI_SYSTEM = os.Getenv("CI_SYSTEM")
CI_SYSTEM_ARCH = os.Getenv("CI_SYSTEM_ARCH")
CI_SYSTEM_HOST = os.Getenv("CI_SYSTEM_HOST")
CI_SYSTEM_LINK = os.Getenv("CI_SYSTEM_LINK")
CI_SYSTEM_NAME = os.Getenv("CI_SYSTEM_NAME")
CI_WORKSPACE = os.Getenv("CI_WORKSPACE")
}