Anyone tried running the node tools via a devconta...
# sdf
p
Anyone tried running the node tools via a devcontainer in VS Code and have a config to share? 🙂
m
I have a gitpod config that can probably be adapted
.gitpod.yml
Copy code
image:
  file: .gitpod.Dockerfile

vscode:
  extensions:
    - <https://github.com/michoelchaikin/suitecloud-vsix/releases/latest/download/oracle.suitecloud-vscode-extension.vsix>
    - sonarsource.sonarlint-vscode
    - egomobile.vscode-powertools
    - dbaeumer.vscode-eslint
    - esbenp.prettier-vscode
    - eamodio.gitlens
    - xyz.local-history
    - ionutvmi.path-autocomplete
    - streetsidesoftware.code-spell-checker

tasks:
  - name: Install NPM dependencies
    command: npm install

  - name: Set Up NetSuite Accounts
    command: python ./scripts/init_accounts.py
.gitpod.Dockerfile
Copy code
FROM gitpod/workspace-full

RUN npm install -g @oracle/suitecloud-cli

# SuiteCloud Extension for VS Code requires Java 11
RUN bash -c ". /home/gitpod/.sdkman/bin/sdkman-init.sh && sdk install java 11.0.11.j9-adpt"
scripts/init_accounts.py
Copy code
# Set up SuiteCloud authentication IDs for NetSuite environments
# The TBA need to be created in NetSuite, and set as enviroment variables in GitPod dashboard (<https://gitpod.io/variables>)
# You can have multiple enviroments named as per below
# NETSUITE_ACCOUNT_ID_#, NETSUITE_AUTH_ID_#, NETSUITE_TOKEN_ID_#, NETSUITE_TOKEN_ID_#
import os

for i in [x.split('_')[-1] for x in os.environ if x.startswith("NETSUITE_ACCOUNT_ID_")]:
    command = f"suitecloud account:savetoken --account $NETSUITE_ACCOUNT_ID_{i} --authid $NETSUITE_AUTH_ID_{i} --tokenid $NETSUITE_TOKEN_ID_{i} --tokensecret $NETSUITE_TOKEN_SECRET_{i}"
    os.system(command)
p
Thanks, I’ll have a look 🙏
b
Hi @michoel, did you have to tweak the JAVA_TOOL_OPTIONS of your workspace to get the suitecloud extension to work?
I'm trying to troubleshoot an error thrown from the plugin:
ahhh, nevermind. I just updated the dockerfile to use
npm install -g --supressSuiteCloudSDKLicensePrompt @oracle/suitecloud-cli