In my build configuration I have say MY.VAR variable defined on Variables tab. In VSTS all build variables are automatically available as environment variables accessible in task steps which is pretty nice. The problem is VSTS converts dot characters to underscores so MY.VAR becomes MY_VAR in environments variables. Which is just stupid as I can have any number of dots in my environment variables:
set MY.VAR=my-numeric-value
How to make VSTS to not convert dots to underscores? Any escaping trick? Or, how can I set MY.VAR environment variable so that it's available to every task in my build?
I tried ${env:MY.VAR} = "my-numeric-value" powershell command which works just fine but the variable is not persisted to the subsequent tasks.
There is no way to change that behavior.
You can use VSTS Task Logging Commands to set the variable value so that the value will be available in subsequent tasks.
Related
Is it possible to define and start a user prompt by starting a SAS EG program, a code? and if yes what's the syntax?
I suppose you refer to prompting for input from a data step or from macro code. That does not work in Enterprice Guide (EG), but there is another sollution.
Each EG project has a set of user defined prompts, which are actually just a global macro variable with specifications on the type of data it can contain, a default value etc.
Each step (program, transformation) can have prompts from the project associated to it. When you start that step, you will be prompted for values. In your code, you can then use these macro variables.
To start working with it: right click a step to which you want to associate a prompt and select properties. Activate the prompt tab and click the [Prompt Manager] button. (There is another way to open the prompt manager, but no-one ever uses it.)
In the prompt manager, you can define the prompts. Bear in mind they will be shared among the steps to which you associate them, so chose macro variable names and wordings that make sense throughout your project.
Once the prompts are defined, you can associate them with your step and use the macro variables where you need them.
Success
I am using gauge-js for running puppeteer scripts and I am trying to pass in custom argument from command lines.
while I am running my gauge run spec command to run the test cases I want to pass in any custom argument like gauge run spec --username=test and read that value inside my implementation files.
You cannot pass custom arguments to Gauge. However, you can use environment variables to pass any additional information you need in your implementation files.
For example, you can run gauge as
(on mac/*nix)
username=test gauge run spec
or
(on windows)
set username=test
gauge run specs
and use the environment variable in your implementation file using process.env.username.
You can additionally set the variable in the .property files in the env folder. These get picked up as environment variables as well.
Currently I am attempting to set an environment variable from my S2I assemble file like so
export VARIABLE=some_dynamic_value
When I actually run the container built by my builder, the environment variable does not exist. Is there a way for the builder to set environment variables dynamically?
Yes, it is. You can put it in the .s2i/environment file. Like described here:
https://access.redhat.com/documentation/en-us/openshift_online/3/html/using_images/source-to-image-s2i#dot-net-core-configuration
Running some random code I found on the internet a few weeks ago has changed the pagesize and linesize defaults of my SAS output window. I don't remember what code it was though unfortunately. The current default pagesize is 15, which is generally way too small.
Does anyone know how to change the default?
I can change this using "options pagesize=80" or something but that only lasts for the current session. I can also change it in the GUI from Tools>Options>Output>Display but any changes won't save to my next session.
Any tips would be much appreciated! This is kind of excruciating. Thanks!
Your editor preferences are stored in a SAS catalog. Only 1 SAS session can open/write to this catalog at a single time. You can find out the location of the catalog that your SAS session is using by running this code:
proc options;run;
... And then search for SASUSER in the log.
If you launch SAS and it tries to use a SASUSER catalog that is already in use by another session, it will give you the message:
WARNING: Unable to copy SASUSER registry to WORK registry. Because of this,
WARNING: you will not see registry customizations during this session.
Are you seeing this message when you launch SAS? If so, it means that you have another instance of SAS open on your machine that has that catalog open. You have 2 options:
Close all instances of sas.exe on your machine (via task manager, be sure to check process names, not just the applications tab) then try making the change again.
Setup another shortcut to launch sas.exe. On this shortcut, specify a different SASUSER location like so:
sas.exe -SASUSER "d:\sas\profile2.cfg"
Also, I'm assuming you have the option to 'Save settings on exit' checked. Or if this isn't the case you can save your current settings by typing the command save into the command bar.
EDIT :
Some additional places to check that may override any profile settings:
Your sasv9.cfg file. Again, run proc options;run; and search for sasv9.cfg. It will give you the location of this file. If the file simply contains a list of other filenames, be sure to open up those 'included' files and check those.
Your autoexec file. If your SAS environment is specifying an autoexec file to load at launch, make sure it's not adjusting them there. Also if it is using an autoexec file, make sure you have all the loggin options turned on as the first thing that happens when SAS loads: option mprint notes source source2;.
Try right-clicking on SAS and choose 'Launch as Admininstrator'. If your profile is in a read-only location due to priveleges, perhaps your settings aren't being saved.
Look in your windows event log to see if SAS is loggin any errors there.
According to the SAS for Windows documentation, pagesize is controlled in part by the default printer. 15 is the minimum value, so it's possible that there is something wrong with your default printer and/or SAS is doing something odd (such as not finding one). If 'some random code' changed your default printer, you could simply try changing it back (see your SYSPRINT option).
I believe you can override this in your sasv9.cfg, commonly located in a path like C:\Program Files\SAS\SAS Foundation\9.4\nls\en\sasv9.cfg (varying based on what language version of SAS you use and your version, plus installation details), by simply adding -pagesize=80 or whatever you wish the default to be. You also can add options pagesize=80; to your autoexec.sas (or a new autoexec.sas if you don't have one already); see this paper or the documentation for more details on that.
echo $DJANGO_SETTINGS_MODULE doesn't return anything, even though from reading the tutorial my understanding is that this environment variable should have been set. Thanks.
The tutorial doesn't say that. It says that when you run manage.py, it takes care of setting that variable within the project's process. It doesn't export it to the base shell - what would be the point?