Skip to content

Commit

Permalink
Merge pull request #131 from bluesliverx/main
Browse files Browse the repository at this point in the history
Simplify env var name to just ARCH
  • Loading branch information
bluesliverx authored Mar 27, 2024
2 parents c70dc84 + 8c09af0 commit c83b1dc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,8 @@ Buildrunner injects special environment variables and volume mounts into every
run container. The following environment variables are set and available in
every run container:

:``BUILDRUNNER_ARCHITECTURE``: the architecture of the current device (x86_64, aarch64, etc), equivalent to ``platform.machine()``
:``BUILDRUNNER_PLATFORM``: (Deprecated, will be removed in favor of ``BUILDRUNNER_ARCHITECTURE``) the platform of the current device (x86_64, aarch64, etc), equivalent to ``platform.machine()``
:``BUILDRUNNER_ARCH``: the architecture of the current device (x86_64, aarch64, etc), equivalent to ``platform.machine()``
:``BUILDRUNNER_PLATFORM``: (Deprecated, will be removed in favor of ``BUILDRUNNER_ARCH``) the platform of the current device (x86_64, aarch64, etc), equivalent to ``platform.machine()``
:``BUILDRUNNER_BUILD_NUMBER``: the build number
:``BUILDRUNNER_BUILD_ID``: a unique id identifying the build (includes vcs and build number
information), e.g. "main-1791.Ia09cc5.M0-1661374484"
Expand Down
2 changes: 1 addition & 1 deletion buildrunner/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def _get_config_context(
"""

context = {
"BUILDRUNNER_ARCHITECTURE": str(platform.machine()),
"BUILDRUNNER_ARCH": str(platform.machine()),
"BUILDRUNNER_BUILD_NUMBER": str(build_number),
"BUILDRUNNER_BUILD_ID": str(build_id),
"BUILDRUNNER_BUILD_DOCKER_TAG": str(self.default_tag),
Expand Down
2 changes: 1 addition & 1 deletion tests/test-files/test-general.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,5 +150,5 @@ steps:
test-architecture:
run:
image: {{ DOCKER_REGISTRY }}/centos:8
cmd: 'if [ -z "{{ BUILDRUNNER_ARCHITECTURE }}" ]; then exit 1; else echo "Architecture is {{ BUILDRUNNER_ARCHITECTURE }}"; fi'
cmd: 'if [ -z "{{ BUILDRUNNER_ARCH }}" ]; then exit 1; else echo "Architecture is {{ BUILDRUNNER_ARCH }}"; fi'

0 comments on commit c83b1dc

Please sign in to comment.