Authenticate CI with DevHub (#49)
* Authenticate CI DevHub using Travis repository settings * Authenticate CI DevHub using AppVeyor settings @W-4092809@ * Document how key should be stored
This commit is contained in:
Родитель
c7860d7aaa
Коммит
792c2976cc
|
@ -24,6 +24,11 @@ install:
|
|||
- SET PATH=%APPVEYOR_BUILD_FOLDER%\sfdx\bin;%PATH%
|
||||
- sfdx update
|
||||
- npm install -g codecov
|
||||
# the JWT key should be stored base 64 encoded in AppVeyor settings
|
||||
- ps: "[System.Text.Encoding]::ASCII.GetString([System.Convert]::FromBase64String($env:SFDX_CI_DEVHUB_JWTKEY)) | Out-File -Encoding \"ASCII\" devhub.key"
|
||||
- sfdx force:auth:jwt:grant --clientid %SFDX_CI_DEVHUB_CLIENTID% --username %SFDX_CI_DEVHUB_USERNAME% --jwtkeyfile devhub.key --setdefaultdevhubusername --setalias devhub
|
||||
- del devhub.key
|
||||
|
||||
|
||||
build_script:
|
||||
- npm run compile
|
||||
|
|
|
@ -75,3 +75,6 @@ jspm_packages/
|
|||
|
||||
# Eclipse
|
||||
.project
|
||||
|
||||
# no keys
|
||||
*.key
|
||||
|
|
|
@ -49,6 +49,12 @@ before_install:
|
|||
sudo installer -pkg sfdx-osx.pkg -target /
|
||||
sfdx update
|
||||
fi
|
||||
- |
|
||||
# the key should be stored in Travis Repository Setting, wrapped in quotes and newlines replaced with \n
|
||||
echo -e $SFDX_CI_DEVHUB_JWTKEY > devhub.key
|
||||
sfdx force:auth:jwt:grant --clientid $SFDX_CI_DEVHUB_CLIENTID --username $SFDX_CI_DEVHUB_USERNAME --jwtkeyfile devhub.key --setdefaultdevhubusername --setalias devhub
|
||||
rm devhub.key
|
||||
|
||||
|
||||
install:
|
||||
- npm install
|
||||
|
|
Загрузка…
Ссылка в новой задаче