Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[feat]: default environment variables #311

Closed
12 tasks
jkuri opened this issue Dec 12, 2017 · 1 comment
Closed
12 tasks

[feat]: default environment variables #311

jkuri opened this issue Dec 12, 2017 · 1 comment

Comments

@jkuri
Copy link
Contributor

jkuri commented Dec 12, 2017

Default environment variables needs to available in build jobs so users can write scripts upon that predefined variables.
List of variables that needs to be available (I borrowed that from Travis):

  • ABSTRUSE_BRANCH

    • for push builds, or builds not triggered by a pull request, this is the name of the branch.
    • for builds triggered by a pull request this is the name of the branch targeted by the pull request.
    • for builds triggered by a tag, this is the same as the name of the tag (ABSTRUSE_TAG)
  • ABSTRUSE_BUILD_DIR

    • The absolute path to the directory where the repository being built has been copied on the worker.
  • ABSTRUSE_BUILD_ID

    • The id of the current build that Abstruse CI uses internally.
  • ABSTRUSE_JOB_ID

    • The if of the current job that Abstruse CI uses internally.
  • ABSTRUSE_COMMIT

    • The commit that the current build is testing.
  • ABSTRUSE_EVENT_TYPE

    • Indicates how the build was triggered. One of push or pull_request
  • ABSTRUSE_PULL_REQUEST

    • The pull request number if the current job is a pull request, “false” if it’s not a pull request.
  • ABSTRUSE_PULL_REQUEST_BRANCH

    • if the current job is a pull request, the name of the branch from which the PR originated.
    • if the current job is a push build, this variable is empty ("")
  • ABSTRUSE_TAG

    • If the current build is for a git tag, this variable is set to the tag’s name.
  • ABSTRUSE_PULL_REQUEST_SHA

    • if the current job is a pull request, the commit SHA of the HEAD commit of the PR.
    • if the current job is a push build, this variable is empty ("")
  • ABSTRUSE_SECURE_ENV_VARS

    • Set to true if there are any encrypted environment variables.
    • Set to false if no encrypted environment variables are available.
  • ABSTRUSE_TEST_RESULT

    • is set to 0 if the build is successful and 1-255 if the build is broken.
    • this variable is available only since test command is executed
@jkuri jkuri added this to the 2.0 milestone Dec 12, 2017
@jkuri jkuri assigned Izak88 and jkuri and unassigned Izak88 Dec 12, 2017
@jkuri jkuri closed this as completed in 8502bcb Dec 16, 2017
@kshshe
Copy link

kshshe commented Feb 9, 2021

It seems this issue can be reopened.
Since version 2.0 there are no default env variables, but it may still be needed

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants