For anyone curious about how to leverage container...
# sdf
b
For anyone curious about how to leverage containers to save time and headaches, here is a post describing a basic setup I've been using for the last year plus: https://medium.com/tolaeon/using-containers-for-your-netsuite-dev-workflow-b8869f75794b?source=friends_link&sk=29024b2f281c503b7178dab7406f5f02
👍 3
❤️ 1
s
thanks for the article. I noted it and will give it a try. Still have a lot to learn about containers.
👍 1
m
Thanks for sharing. Recently I've been playing with gitpod for NetSuite dev and am loving the concept of dev environment as code
👍 1
b
Yes, I've already done the same using Eclipse Che until gitpod became generally available. I need to build the latest version of the vscode plugin for use on gitpod. I've got a few resources I can share soon.
m
I logged an issue on the suitecloud repo requesting them to publish the extension on openvsx. Meanwhile I built it myself from source and am hosting it here https://github.com/michoelchaikin/suitecloud-vsix/releases/tag/v1.0.3
🙌 1
👏 1
For setting up the authids I have a hacky python script
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|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)
b
Nice. Whatever works! Is that called from a pre-build?
m
It's called from a task in the .gitpod.yml. I'm not sure if that's a prebuild or run everytime a workspace is started
b
Actually thatd be a start task not a prebuild
Shweet 😁
m
.gitpod.yml
Copy code
image:
  file: .gitpod.Dockerfile

vscode:
  extensions:
    - <https://github.com/michoelchaikin/suitecloud-vsix/releases/latest/download/oracle.suitecloud-vscode-extension.vsix>
    - <https://github.com/michoelchaikin/suitecloud-vsix/releases/latest/download/egomobile.vscode-powertools-0.66.0.vsix>
    - sonarsource.sonarlint-vscode
    - 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"
b
There it is. What else do you need right?
Throw up a blog post dude!
s
This might help me I'm trying to deploy only via GitHub actions
d
+1 on the blog post request @michoel
s
+1
l
Love your work @michoel & @Brendan Boyd! Thank you for sharing this!
💯 1