0

I've been struggling a lot trying to complete this trailhead module. The first issue was while trying to log in with GitHub creds, which I solved using the GitHub-token flag.

Now, after I Kick-off Continuous Integration, it keeps failing over and over again.

The first exception was iv undefined, which is no longer happening, not sure how it got fixed. And this last exception has become a real blocker. I can't figure out how to work around this.

Job Log:

enter image description here

Config File:

os: linux
dist: xenial
language: ruby
rvm:
  - 2.0.0
cache: false
env:
  - URL=https://developer.salesforce.com/media/salesforce-cli/sfdx-linux-amd64.tar.xz
before_install:
  - openssl aes-256-cbc -K $encrypted_79bf14636734_key -iv $encrypted_79bf14636734_iv
    -in assets/certs/server.key.enc -out assets/certs/server.key -d
  - export SFDX_AUTOUPDATE_DISABLE=false
  - export SFDX_USE_GENERIC_UNIX_KEYCHAIN=true
  - export SFDX_DOMAIN_RETRY=300
  - export SFDX_DISABLE_APP_HUB=true
  - export SFDX_LOG_LEVEL=DEBUG
  - mkdir sfdx
  - wget -qO- $URL | tar xJ -C sfdx --strip-components 1
  - "./sfdx/install"
  - export PATH=./sfdx/$(pwd):$PATH
  - sfdx --version
  - sfdx plugins --core
  - sfdx force:auth:jwt:grant --clientid $CONSUMERKEY --jwtkeyfile assets/server.key
    --username $USERNAME --setdefaultdevhubusername -a HubOrg
script:
  - sfdx force:org:create -v HubOrg -s -f config/project-scratch-def.json -a ciorg --wait
    3
  - sfdx force:org:display -u ciorg
  - sfdx force:source:push -u ciorg
  - sfdx force:apex:test:run -u ciorg --wait 10
  - sfdx force:org:delete -u ciorg -p

I'm not sure what else to look at or do to make this work.

I'm trying to create a standard development pipeline, which is important to implement CI/CD.

Workstation settings:

  • Ruby version: 2.7.2
  • Travis version: 1.10.0
  • SFDX-cli version: 7.85.1

Already tested in Windows (local station) and AWS Ubuntu server, same results.

1

Finally, I was able to solve it.

The reasons why this was failing:

  1. Trailhead module information about login is out of date, travis login --org was not working- keep throwing "Not found" exception, so I solved it using travis login --org --github-token.
  2. When using travis encrypt-file path-to-secret-file/secret-file.txt path-to-secret-file/secret-file.txt.enc --add I wasn't providing the endpoint, in this case since I was logged to the Org end-point I needed to specify the same in the command by adding --org at the end.
  3. Since Travis-org is moving soon to Travis-com, and Travis-org only fetches public repositories, I needed to move this to Travis-com, so I logged out and logged in again but this time pointing to --com in both commands (login and encrypt-file).

Taking these 3 considerations I was able (finally) to make it work.

Is pretty bad not having this information accessible.

Only information that gave me an idea of what probably was happening was this banner.

enter image description here

Basically nothing.

For some reason login itself keeps failing, I was able to log in by creating a GitHub token for Travis following this document and using travis login --github-token

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.