Can we use many language on Github Action Configuration - node.js

I want to create CI on Github Action for QA Automation. But there is multiple language are use to install dependecies. Can i use NodeJS and Golang at the same file?
I read the documentation of Github Action, but there is configuration for each language not both. Any reference or idea i can use?

In short, you write a manifest file (in YAML) and tell GitHub Actions build agent(s) to execute the commands you wanted in an automatic way. See, there is nothing there bind to a single programming language.
You see per language samples/tutorials, simply because that's how new users/developers to get started with a CI/CD system, and it is easy to write up the necessary steps if focusing on the ecosystem of a single programming language.
The underlying GitHub Actions build machines (if managed by GitHub), however, have almost everything pre-installed, so of course you can use Node.js and Golang tools in the same manifest and you don't need any specific reference.
Open the image pages and learn what tools are preinstalled if you like.
Try it out by combining multiple manifests into the single one, and you will see how it works out.

Related

ODM Command Line Build For Classic Rule Projects

I am using ODM 8.10 and want to automate building rule app files. The code is currently configured in the old Classic Rule Project, and we are trying to avoid migrating to Decision Services at this time. I have found build jars for Decision Services but nothing so far for Classic Rule Projects. There must be a way to do this as the rule app jar files are created in the eclipse IDE when you deploy/export a ruleApp. I am trying to find out the jar files the IDE uses and the commands it calls to execute the rule app builds.
Re: "There must be a way to do this"
But you will not necessarily have access to it. The ODM product developers have experience, source code, documentation, and other tools that you do not have access to.
Having said that, there is an build/deploy API that you may be able to access via ANT. I haven't used it since switching to Decision Services when that became feasible in ODM 8.7. Standard practice before that time was to automate deployments via Ant and a "headless" version of Eclipse. If the latest online docs don't describe it, you might try the older docs.
WARNING: Classic Rule Projects are a dead end! Not only will all your effort building them in a non-standard way be wasted, I believe that it will likely be more trouble than just migrating to Decision Services (which is not usually that difficult).

Cucumber: is it possible to read .feature files from a remote location?

I know about specifying a local path to feature files (eg #CucumberOptions(features = "<feature_path>") in Java), but is it possible to read feature files from a remote location, ie from Github?
Motivation: I have several API client libraries in different languages that need to adhere to the same set of core specs. I'm using Cucumber feature files as a language-agnostic base for the specs, then writing step definitions for each library. Seems silly to duplicate the feature files for each project, but so far I haven't been able to find out how to read them from a remote location.
For example, setting #CucumberOptions(features = "https://github.com/<repo_path>/features") produces the following error:
Tests in error:
initializationError(com.<package_name>.feature.RunCukesTest):
Not a file or directory: /<local_path>/https://github.com/<repo_path>/features
Note I used Java as an example but I'd love to hear the answer for any of Java/PHP/Ruby/Javascript.
Quite new to Cucumber so please forgive me if this is an obtuse question.
As far as I know, you can't specify a remote location to read feature files from. I imagine a remote location being something you find through a network and not the file system.
You can speciy the path to the feature files and thus use the same feature files for many cases. But that requires you to always keep the code in locations relative to each other. One way of to do this is to use a a so called mono repo. That is one repository for all your implementations. Mono repos are used by some teams with sucess. The Cucumber team is moving in that direction to make it easier to keep common things in synch. All Gherkin implementations, independant of the implementation language, lives in a mono repo.
Why not use Linux FuseFS for such task? curlftpfs, for example

Script Create Package for Windows Store apps

I am maintaining a set of eleven Windows Store apps. I would like to automate the "Create Package" task, which I am currently doing through the wizard in Visual Studio, in order to produce test packages (signed with my test certificate).
Is there a way to script this task? I was thinking probably using MSBuild or PowerShell, my goal is to have a single script to run that would generate all my app packages and copy them all to a given target directory.
I found some documentation about using the wizard on MSDN, but nothing about scripting the task.
Any ideas?! Thanks.
MSBuild will create app packages for you, in the AppPackages folder. You can also do it manually using MakeAppx, but I've found it to be a bit more cumbersome.
Some things to note: There is a build target called Publish you should use (/t:Publish) when making the actual packages. You should look into the different command-line switches, such as DebugSymbols.
You'll likely want to use the 32-bit MSBuild, as I've had issues with the 64-bit and things like the Multilingual App Toolkit. Also in regards to the MApp Toolkit, make sure you do a full rebuild before building your app package. If an entry is not in a given language and is in another, the entry for the secondary language will be used, so you can end up with multiple languages all popping up on the same page.
Hope this helps and happy coding!

Sandboxed plugins for Node.js

I'm a complete Node noob, so I apologize if this question has an obvious answer.
I'm looking to create a web app that will run plugins from untrusted sources (i.e. community submissions). So I need to lock down those plugins into a sandbox where only certain access is allowed (can't write to disk, etc.). Ideally, the plugin would only be able to use certain approved node packages and APIs.
Is this possible in Node? If so, can you point me toward a package or documentation that will get me started?
Here is a small list of projects that can help you:
https://github.com/gf3/sandbox
https://github.com/hflw/node-sandbox
https://github.com/bcoe/sandcastle
https://github.com/wearefractal/boxy
I suggest the first one (sandbox) since it's more mature.
I would also contribute to the list with my library: https://github.com/asvd/jailed. In addition to the sandboxing of the untrusted code (in a restricted subprocess), it gives an opportunity to export any set of functions inside the sandbox thus defining a custom API for the sandboxed code.

Deploy repository code to multiple machines at once

My question is: How do you guys deploy the same code from whatever [D]VCS you use on multiple machines? Do you have an automated deployment system and if so what's that? Is it built in-house? Are there out there any tools that can do this automatically? I am asking because I am pretty bored updating up to 20 machines every time I make some modifications.
P.S.: Probably this belongs on ServerFault, but I am asking here because I am thinking at writing my own custom-made deployment system.
Roll your own rpm/deb/whatever for your package, set up your own repo, and have your machines pull on a regular basis. Its really not that hard to do and its already built-in to your system, is well tested, and loaded with features. You could use something like Func if you needed to push instead.
Depending on your situation deploying straight from the versioning system might not always be the best idea. You can only so much by just updating files, and mixing deployment and development probably will make the development use of the versioning system less free.
I see two alternatives that might be interesting.
Deploy from your continuous integration server. (add a task that runs after every successful build, copies over files and executes some remote commands, I'm using this to deploy to a testserver and would find it to tricky to upgrade production in such a way)
Deploy using an existing package manager. You can set up your own apt (or equivalent) repository and package the updates using apt. Have your continuous build system build apt packages but let an admin decide if the should be pushed to the update server. I think this is the only safe solution for production machines.
We use Capistrano for deployment & Puppet for maintaining the servers and avoiding the inevitable 'configuration drift' when many developers/engineers tinker with the package lists and configuration files.
Both of these programs are written in Ruby, but we use them for our PHP codebase stored in a git repository.
I use a combination of deb packages with puppet to deploy code and configure a bunch of machines.
In most projects i have been involved with the final stage has always been an scripted rsync deployment to live. so the multiple targets are built into this process.

Resources