Hello!
I am developing a firmware for Nordic MCU and I want to set up a pipeline in my repository for building a firmware.
I successfully did similar thing on GitHub with the help of their action and a docker image from Nordic. However, I am struggling to do the same in Bitbucket.
Here is the part of my bitbucket-pipelines.yml:
image:
name: ghcr.io/nrfconnect/sdk-nrf-toolchain:v3.2.4
# This uses the entrypoint to forcefully write the license acceptance into the
# bash startup file BEFORE Bitbucket's runner ever logs in, breaking the catch-22.
entrypoint:
- /bin/sh
- -c
- "echo 'export ACCEPT_JLINK_LICENSE=1' | cat - /root/.bashrc > /tmp/rc && mv /tmp/rc /root/.bashrc && tail -f /dev/null"
pipelines:
branches:
feature/ci:
- step:
name: Build nRF54L15 Firmware
# NCS builds are memory-intensive; 2x allocation prevents out-of-memory crashes
size: 2x
script:
...
The problem is, that inside the container it interactively asks for Jlink license agreement. The environmental variable ACCEPT_JLINK_LICENSE=1 should do the trick and bypass it. However, whatever I have tried, the pipeline still cannot go beyond it. Here are the pipeline logs:
+ umask 000
+ export GIT_LFS_SKIP_SMUDGE=1
+ retry 6 git clone --branch='feature/ci' --depth 50 https://x-token-auth:$REPOSITORY_OAUTH_ACCESS_TOKEN@bitbucket.org/$BITBUCKET_REPO_FULL_NAME.git $BUILD_DIR
Cloning into '/opt/atlassian/pipelines/agent/build'...
+ git reset --hard 4b934c375a4a5bfa0f49fb13285bf0f7c1267d9f
HEAD is now at 4b934c3 CI: Add another fix to try to override jlink licence agreement
+ git config user.name bitbucket-pipelines
+ git config user.email commits-noreply@bitbucket.org
+ git config push.default current
+ git config http.${BITBUCKET_GIT_HTTP_ORIGIN}.proxy http://localhost:29418/
+ git remote set-url origin http://bitbucket.org/$BITBUCKET_REPO_FULL_NAME
+ git reflog expire --expire=all --all
+ echo ".bitbucket/pipelines/generated" >> .git/info/exclude
+ chmod 777 $BUILD_DIR
Default variables:
BITBUCKET_BRANCH
BITBUCKET_BUILD_NUMBER
BITBUCKET_CLONE_DIR
BITBUCKET_COMMIT
BITBUCKET_GIT_HTTP_ORIGIN
BITBUCKET_GIT_SSH_ORIGIN
BITBUCKET_PACKAGES_TOKEN
BITBUCKET_PACKAGES_USERNAME
BITBUCKET_PIPELINES_VARIABLES_PATH
BITBUCKET_PIPELINE_UUID
BITBUCKET_PROJECT_KEY
BITBUCKET_PROJECT_UUID
BITBUCKET_REPO_FULL_NAME
BITBUCKET_REPO_IS_PRIVATE
BITBUCKET_REPO_OWNER
BITBUCKET_REPO_OWNER_UUID
BITBUCKET_REPO_SLUG
BITBUCKET_REPO_UUID
BITBUCKET_SSH_KEY_FILE
BITBUCKET_STEP_OIDC_TOKEN
BITBUCKET_STEP_RUN_NUMBER
BITBUCKET_STEP_TRIGGERER_UUID
BITBUCKET_STEP_UUID
BITBUCKET_TEST_METADATA_FILE_PATH
BITBUCKET_WORKSPACE
CI
DOCKER_HOST
Repository variables:
ACCEPT_JLINK_LICENSE
ATLASSIAN_ACCOUNT_EMAIL
ATLASSIAN_API_TOKEN
Images used:
build : ghcr.io/nrfconnect/sdk-nrf-toolchain@sha256:397bac78a3e3825ce30443d4cd28c377ea6e5a28910200820967b648d95f88bb
docker : docker-public.packages.atlassian.com/sox/atlassian/bitbucket-pipelines-docker-daemon@sha256:6b9b4a11c1fb311cfff394be811dda4bf4268793a2d43e9b5f6eedff3ae31c42
Runtime:
cloud:
version: 2
arch: x86
To install JLink you have to accept following license
By accessing and using Software and Materials provided by SEGGER as free download, you acknowledge and agree to the following Terms of Use. If you do not agree to these Terms, do not download or use any Software or Material.
1) You agree that you will not use the Software or Material for any purpose that is unlawful or illegal.
2) You agree to use the Software only in accordance with the license regulations included in the Software.
3) You acknowledge that the Software and Material is provided by SEGGER on "as is" basis without any express or implied warranty of any kind.
4) You confirm that you are not a person, entity or organization designated by the European Community as a terrorist, terror organization or entity pursuant to the applicable European Council Regulations.
5) You confirm that you are not located in a prohibited or embargoed country and confirm that you will not ship, distribute, transfer and/or export our Software or Material to any prohibited or embargoed country as mentioned in any such European Union law or regulation.
Further information with regard to the listed persons, entities and organizations can be obtained from the official EU website. If there is any doubt if you are on this list it is strongly recommended to review such lists or get in touch with SEGGER prior download of any Software or Material.
Copyright (c) SEGGER Microcontroller GmbH
Invalid input. Please use y/n
Invalid input. Please use y/n
Invalid input. Please use y/n
Invalid input. Please use y/n
Invalid input. Please use y/n
Invalid input. Please use y/n
Invalid input. Please use y/n I have tried setting the variable in the repository variable, but it didn't help.
How can I bypass it without creating a custom docker image?