danmurphy
05/13/2022, 3:47 PMbdw429s
05/13/2022, 3:51 PMbdw429s
05/13/2022, 3:51 PMdanmurphy
05/13/2022, 3:53 PMbdw429s
05/13/2022, 3:53 PMbdw429s
05/13/2022, 3:54 PMbdw429s
05/13/2022, 3:55 PMbdw429s
05/13/2022, 3:56 PMbdw429s
05/13/2022, 3:57 PMbdw429s
05/13/2022, 3:57 PMdanmurphy
05/13/2022, 3:58 PMinstall <git://site.com/user/repo.git#v1.2.3>
doesn’t provide? (just reading about it in the git section of the CommandBox docs)bdw429s
05/13/2022, 4:00 PMdanmurphy
05/13/2022, 4:01 PMbdw429s
05/13/2022, 4:01 PMinstall "coldbox@4.x || <= 6.2.*"
and it's super smart about finding the package whose version is the best fit, and updating that package in the future when new versions come outbdw429s
05/13/2022, 4:02 PMbdw429s
05/13/2022, 4:02 PMoutdated
and
update
commands are far more useful with proper packages from forgeBoxbdw429s
05/13/2022, 4:02 PMdanmurphy
05/13/2022, 4:03 PMbdw429s
05/13/2022, 4:03 PMforgebox login
and then we know who you are. ForgeBox is also getting org support as well have org-level packages and user-level packages. Then there's collaborators. public/private packages, etc. It's all built into our permission scheme so you can install whatever you have permissions tobdw429s
05/13/2022, 4:04 PMbdw429s
05/13/2022, 4:05 PMbump --minor
(which uses a package script to run the pubilish
command) -- and a couple seconds later, my new package version is live on ForgeBoxbdw429s
05/13/2022, 4:05 PMbdw429s
05/13/2022, 4:06 PMdanmurphy
05/13/2022, 4:07 PMbdw429s
05/13/2022, 4:08 PMall of your Forgebox packages are pointing to public github reposNot at all. Where did you get that idea?
bdw429s
05/13/2022, 4:08 PMMy point being, we want to keep our codebase in our private github repo.Sure, go ahead, lol. Nothing stopping you. We have lots of clients doing this.
danmurphy
05/13/2022, 4:08 PMbdw429s
05/13/2022, 4:08 PMbdw429s
05/13/2022, 4:10 PMfoo
in CommandBox, we look at the package metadata and then defer to the proper endpoint to get the actual codebdw429s
05/13/2022, 4:12 PMinstall <git://gitub.com>...
or you can install a package from forgebox
install forgebox:mypackage
which may POINT to a Git repo if it wishes. In that case, the CLI defers back to the same Git endpoint anyway to finish resolving the packagedanmurphy
05/13/2022, 4:12 PMbdw429s
05/13/2022, 4:12 PMbdw429s
05/13/2022, 4:14 PMinstall file:\\\\myservershare/sharename/folder/file.zip
or
install <https://local-intranet-server.dev/folder/file.zip>
and both of those would only work obviously on your computer where you have access to those resources\bdw429s
05/13/2022, 4:14 PMbdw429s
05/13/2022, 4:15 PMbdw429s
05/13/2022, 4:16 PMSo it sounds like you’ll have the same Github private key / access token finagling if you have a private ForgeBox package pointing to a private github repo as you probably would with a private github package/repo. Does that sound right?Yes, but that would be largely pointless. The goal of using private Git repos is usually because people are trying to avoid private forgebox packages! If you have a private forgebox package, you would be better served just using S3 storage at that point and it makes no difference where the actual repo is.
bdw429s
05/13/2022, 4:16 PMbdw429s
05/13/2022, 4:18 PMmkdir my-package --cd
touch coolStuff.cfm
package init
publish
and that's itbdw429s
05/13/2022, 4:18 PMbox.json
, and coolStuff.cfm
) would be zipped up and whisked away to a private S3 bucket and the package published to ForgeBox.iobdw429s
05/13/2022, 4:19 PMbdw429s
05/13/2022, 4:19 PMbdw429s
05/13/2022, 4:21 PMbdw429s
05/13/2022, 4:22 PMdanmurphy
05/13/2022, 4:22 PMbdw429s
05/13/2022, 4:23 PMbdw429s
05/13/2022, 4:23 PMdanmurphy
05/13/2022, 4:23 PMbdw429s
05/13/2022, 4:23 PMbdw429s
05/13/2022, 4:24 PMpublish
command will yell at you since it assumes you forgot something.bdw429s
05/13/2022, 4:24 PMdanmurphy
05/13/2022, 4:25 PMbdw429s
05/13/2022, 4:25 PMbump
command will increases your version number and tag your git repo too which is super handy.bdw429s
05/13/2022, 4:25 PMdanmurphy
05/13/2022, 4:28 PMbox install
within our Dockerfile, would we need to have some env variables or something with the ForgeBox credentials or something? (trying to see if this is addressed in the docs already…)bdw429s
05/13/2022, 4:28 PMbdw429s
05/13/2022, 4:29 PMbdw429s
05/13/2022, 4:29 PMbox forgebox login user pass
box install
bdw429s
05/13/2022, 4:29 PMbox config set endpoints.forgebox.APIToken="xxxxx"
box install
bdw429s
05/13/2022, 4:30 PMconfig set
entirely and just set this env var and be done
ENV box_config_endpoints_forgebox_apiToken=XXXXX
CommandBox will just pick up that config setting by convention and use it when it runsbdw429s
05/13/2022, 4:30 PMdanmurphy
05/13/2022, 4:32 PMbdw429s
05/13/2022, 4:32 PMbdw429s
05/13/2022, 4:33 PMbdw429s
05/13/2022, 4:33 PMdanmurphy
05/13/2022, 4:34 PMbdw429s
05/13/2022, 4:49 PMbrad
and its download location pointed to <http://github.com/privateorg/privatePackage|github.com/privateorg/privatePackage>
then
• everyone would be able to see the package on forgebox.io and via the CLI
• Everyone but you would get an error when they tried to install it
• Everyone would still be able to see where it was trying to install from
So it wouldn't be obfuscating anything, but it may make people question your sanity.danmurphy
05/13/2022, 4:58 PMOk, I’m repeating to make sure I’m hearing you. I think I had some assumptions wrong. So I might work on my private package (that is in a private github repo, which sounds like it doesn’t really matter). I get to the point where I commit stuff for a version 1.5, for example. I can commit everything and push it to github just like I would with any other codebase in github. Then I can “publish” a 1.5 version in commandbox to a private forgebox package, which really just zips up artifacts on my local machine and sends it up to ForgeBox. Am I right so far?I guess I need to just play around some more. With this question ☝️ , it sounded like commandbox/forgebox didn’t actually talk to github at all when it installed a package if you are using forgebox storage. It just had the zipped up artifacts it needed in Forgebox (regardless of whether the forgebox package is private or public).
bdw429s
05/13/2022, 5:02 PMbdw429s
05/13/2022, 5:03 PMbdw429s
05/13/2022, 5:04 PMyou can have a public forgebox package point to a private github package
bdw429s
05/13/2022, 5:05 PMbdw429s
05/13/2022, 5:05 PMbdw429s
05/13/2022, 5:05 PMdanmurphy
05/13/2022, 5:35 PMdanmurphy
05/13/2022, 5:38 PMbdw429s
05/13/2022, 5:47 PMI thought ForgeBox was really always having to communicate with GitHub.Oh goodness, no 🙂 Back in the early days, about half the packages cloned git repos just for convenience and the rest pointed to zip files we would manually place up on our own S2 buckets in our build
bdw429s
05/13/2022, 5:48 PMdanmurphy
05/13/2022, 5:49 PMbdw429s
05/13/2022, 5:49 PMdanmurphy
05/13/2022, 5:50 PMbdw429s
05/13/2022, 5:50 PMdanmurphy
05/13/2022, 5:51 PMdanmurphy
05/13/2022, 5:52 PM/giphy
integration. 😄bdw429s
05/13/2022, 5:52 PMbdw429s
05/13/2022, 5:53 PMbdw429s
05/13/2022, 5:53 PMbdw429s
05/13/2022, 5:53 PMbox.json
in that repo has no location
key which means it's using the default value of forgeboxStorage
bdw429s
05/13/2022, 5:55 PMCommandBox> bump --patch
which
• increments the version
• tags the repo
• zips up the code on my hard drive and uploads it to S3
• runs this package script https://github.com/bdw429s/commandbox-fusionreactor/blob/master/box.json#L20
• That package script publishes the package to forgebox
• then it runs this package script https://github.com/bdw429s/commandbox-fusionreactor/blob/master/box.json#L21
• which pushes my commits and tags for mebdw429s
05/13/2022, 5:55 PMdanmurphy
05/13/2022, 9:37 PMbump --minor
command is giving me…
Can't copy file [/Users/dan.murphy/code/scs-private-test/models/ModelUtility.cfc] to [/Users/dan.murphy/.CommandBox/temp/5BFBC4AD96745C2D16435F94B8D3D493/models/ModelUtility.cfc]
No such file or directory
My file definitely exists, I can click on it in the error and open it. It looksl ike /Users/dan.murphy/.CommandBox/temp/5BFBC4AD96745C2D16435F94B8D3D493/
exists even. But the /models
folder does not at that directory. Thoughts?danmurphy
05/13/2022, 9:39 PMdanmurphy
05/13/2022, 10:01 PM5BFB…
directory completely, it is back to giving me that original error about No such file or directory
. Hmm.bdw429s
05/14/2022, 3:48 AMbdw429s
05/14/2022, 9:14 PMbdw429s
05/15/2022, 1:16 AMbdw429s
05/15/2022, 1:18 AMmodels
folder is not there, that's a clue, but I'm not sure how it would happen.
• Are other folders being created? All folders are created from the shortest to the longest in that order so subdirs are all created last.
• No files are copied until all the folders are created.bdw429s
05/15/2022, 1:19 AMignore
settings in your box.json
?danmurphy
05/15/2022, 1:21 AMbdw429s
05/15/2022, 1:22 AMbdw429s
05/15/2022, 1:22 AMcreateUUID()
, but Eric who did this part used a hash of the pathbdw429s
05/15/2022, 1:22 AMbdw429s
05/15/2022, 1:22 AMbdw429s
05/15/2022, 1:23 AMvar tmpPath = tempDir & hash( arguments.path );
if ( directoryExists( tmpPath ) ) {
directoryDelete( tmpPath, true );
}
bdw429s
05/15/2022, 1:23 AMbdw429s
05/15/2022, 1:23 AMbdw429s
05/15/2022, 1:24 AMmodels
folder out of the list of things to copy but keeping files inside the folder.bdw429s
05/15/2022, 1:24 AMbdw429s
05/15/2022, 1:24 AMpublish
command uses your box.json ignores as well as your .gitignore
filedanmurphy
05/15/2022, 1:24 AMdanmurphy
05/15/2022, 1:25 AMbdw429s
05/15/2022, 1:25 AMbdw429s
05/15/2022, 1:26 AMcfml/system/endpoings/forgebox.cfc
bdw429s
05/15/2022, 1:26 AMwirebox.getInstance( 'globber' )
.inDirectory( arguments.path )
.setExcludePattern( ignorePatterns )
.loose()
.copyTo( tmpPath );
bdw429s
05/15/2022, 1:28 AMsystemoutput(
wirebox.getInstance( 'globber' )
.inDirectory( arguments.path )
.setExcludePattern( ignorePatterns )
.loose()
.asArray(),
1)
will tell us what it's trying to copydanmurphy
05/16/2022, 6:05 PMevaluateComponent("globber.models.Globber","b471c4dc34de00d4e57a0f33d69079b8",{},{"baseDir":"/Users/dan.murphy/code/scs-private-test/","LOOSE":true,"format":"array","sort":"type, name","MATCHQUERYARRAY":[],"EXCLUDEPATTERN":[".*.swp","._*",".DS_Store",".git/",".hg/",".svn/",".lock-wscript",".wafpickle-*","config.gypi","## General Ignores + IDE",".DS_Store","settings.xml","WEB-INF",".env",".vscode/*","*.code-workspace","*.sublime-workspace","## logs + tests","logs/**","/testbox","/tests/results/**","/tests/resources/app/coldbox","## npm","**/node_modules/*","npm-debug.log","yarn-error.log","yarn.lock","#### Ignored Dependencies","coldbox/*","testbox/*","modules/*","/includes/js","/includes/css","/includes/fonts","/includes/build","**/apidocs/**","**/.*","/test/","/tests/"],"NOTEXCLUDEPATTERN":[],"pathPatternMatcher":evaluateComponent("globber.models.PathPatternMatcher","1200e3ab33d203f37482b555cceb904a",{},{}),"PATTERN":[]})
bdw429s
05/16/2022, 6:06 PMbdw429s
05/16/2022, 6:06 PMbdw429s
05/16/2022, 6:06 PMbdw429s
05/16/2022, 6:07 PMdanmurphy
05/16/2022, 6:08 PMbdw429s
05/16/2022, 6:08 PMbdw429s
05/16/2022, 6:09 PM.matches()
method to the end of the DSLbdw429s
05/16/2022, 6:09 PMbdw429s
05/16/2022, 6:11 PMdanmurphy
05/16/2022, 6:11 PMdanmurphy
05/16/2022, 6:11 PMbdw429s
05/16/2022, 6:12 PMbdw429s
05/16/2022, 6:12 PMpublish --force
bdw429s
05/16/2022, 6:12 PM--force
makes it re-zip the code even though the version hasn't changeddanmurphy
05/16/2022, 6:13 PMdanmurphy
05/16/2022, 6:14 PMbdw429s
05/16/2022, 6:14 PMdanmurphy
05/16/2022, 6:14 PMbdw429s
05/16/2022, 6:14 PMdanmurphy
05/16/2022, 6:15 PMdanmurphy
05/16/2022, 6:15 PMbdw429s
05/16/2022, 6:15 PMbdw429s
05/16/2022, 6:16 PMdanmurphy
05/16/2022, 6:17 PMdanmurphy
05/16/2022, 6:18 PMpublish --force
and it worked again.danmurphy
05/16/2022, 6:18 PMbdw429s
05/16/2022, 6:19 PMdanmurphy
05/16/2022, 6:20 PMsystemoutput(
wirebox.getInstance( 'globber' )
.inDirectory( arguments.path )
.setExcludePattern( ignorePatterns )
.loose()
.asArray()
.matches(),
1)
bdw429s
05/16/2022, 6:20 PMbdw429s
05/16/2022, 6:20 PMdanmurphy
05/16/2022, 6:21 PM