We are using cake script as part of our build process. Please let me know how can I use JFrog cli command in cake script.
https://www.jfrog.com/confluence/display/CLI/JFrog+CLI
jf rt u
You can use any of the Command (https://cakebuild.net/dsl/command/) or StartProcess (https://cakebuild.net/dsl/process/) aliases.
Command aliases make use of Tool resolution provided by Cake.
For example:
Command(
new []{ "jf", "jf.exe"},
"rt u"
);
See also this blog post for more examples: https://cakebuild.net/blog/2022/10/cake-v2.3.0-released#command-aliases
If the tool is not available on the machine Cake provides some ways to install tools. See Installing Tools for details.
Related
I have started to use version control in RStudio using GitLab, but now I wish to use GitHub instead. So, I need to move all of my repositories from GitLab to GitHub, as specified e.g. here.
But, for some time, I was using both GitHub and GitLab simulteneously, and developing single project on both repos individually! Quite stupid, but it happens..
Shortly, now I need know, which repo (GitHub or GitLab) is my R studio using? I am looking for some code that will print out the http of the repository in use?
something like repo.print and will return the http associated: https://gitlab.com/xx/yy/z or https://github.com/xx/yy/z.
git config --get remote.origin.url in Terminal or
shell("git config --get remote.origin.url")
in R console / script.
The Julia Pkg documentation tells how to initiate an environment ($ activate $ENV-NAME), but it probably lacks the handy command to switch to the already created special environment. Also, I'm having trouble finding a command that shows all already created environments on the list, hence, if I have forgotten the names of the environments previously created, I need to do a manual search through the Julia-related folders...
So far, the verbatim help command in Julia REPL provides a poor description and so does the related Pkg-documentation webpage.
Another possible general answer to this predicament is to start using the Playground.jl module, which was recommended here on Medium:
However, the direct download attempt with Pkg repeatedly fails since the Pkg isn't able to find the package in the suggested GH project.
Thanks beforehand for any recommendations.
In package manager prompt just type activate # and press tab-key. The REPLs autocomplete will show you the possible environments.
If you are on a Mac or Linux
you can run this shell command to find all the "enviroment"
bash-3.2$ pwd
/Users/ssiew/juliascript
bash-3.2$ find . -name Project.toml
./Luxordir/Project.toml
./symata/Project.toml
I followed the Software Collections Quick Start and I now have Python 3.5 installed. How can I make it always enabled in my ~/.bashrc, so that I do not have to enable it manually with scl enable rh-python35 bash?
Use the scl_source feature.
Create a new file in /etc/profile.d/ to enable your collection automatically on start up:
$ cat /etc/profile.d/enablepython35.sh
#!/bin/bash
source scl_source enable python35
See How can I make a Red Hat Software Collection persist after a reboot/logout? for background and details.
This answer would be helpful to those who have limited auth access on the server.
I had a similar problem for python3.5 in HostGator's shared hosting. Python3.5 had to be enabled every single damn time after login. Here are my 10 steps for the resolution:
Enable the python through scl script python_enable_3.5 or scl enable rh-python35 bash.
Verify that it's enabled by executing python3.5 --version. This should give you your python version.
Execute which python3.5 to get its path. In my case, it was /opt/rh/rh-python35/root/usr/bin/python3.5. You can use this path to get the version again (just to verify that this path is working for you.)
Awesome, now please exit out of the current shell of scl.
Now, lets get the version again through this complete python3.5 path /opt/rh/rh-python35/root/usr/bin/python3.5 --version.
It won't give you the version but an error. In my case, it was
/opt/rh/rh-python35/root/usr/bin/python3.5: error while loading shared libraries: libpython3.5m.so.rh-python35-1.0: cannot open shared object file: No such file or directory
As mentioned in Tamas' answer, we gotta find that so file. locate doesn't work in shared hosting and you can't install that too.
Use the following command to find where that file is located:
find /opt/rh/rh-python35 -name "libpython3.5m.so.rh-python35-1.0"
Above command would print the complete path (second line) of the file once located. In my case, output was
find: `/opt/rh/rh-python35/root/root': Permission denied
/opt/rh/rh-python35/root/usr/lib64/libpython3.5m.so.rh-python35-1.0
Here is the complete command for the python3.5 to work in such shared hosting which would give the version,
LD_LIBRARY_PATH=/opt/rh/rh-python35/root/usr/lib64 /opt/rh/rh-python35/root/usr/bin/python3.5 --version
Finally, for shorthand, append the following alias in your ~/.bashrc
alias python351='LD_LIBRARY_PATH=/opt/rh/rh-python35/root/usr/lib64 /opt/rh/rh-python35/root/usr/bin/python3.5'
For verification, reload the .bashrc by source ~/.bashrc and execute python351 --version.
Well, there you go, now whenever you login again, you have got python351 to welcome you.
This is not just limited to python3.5, but can be helpful in case of other scl installed softwares.
I am trying to follow this tutorial, in order to install the Nix package manager in my home directory instead of /nix.
I am doing the PRoot installation (see 2. in tutorial). At the end, the
tutorial proposes to be smart in Building native packages section, to be
able to run packages without PRoot:
To run packages natively (without PRoot) they have to be build from source because all paths to the nix store are hard-coded. It is simple, really:
mkdir $HOME/nix
nix-channel --update
env NIX_STORE_DIR=$HOME/nix nix-env -i nix
And now your Nix store gets built up using the new paths. The built binaries can be run directly from there.
I did that, but I don't see how it frees me from PRoot. If I don't do the /nix mounting point with PRoot, nothing works (no nix-env executable,
I can't install new packages).
Should this NIX_STORE_DIR environment variable be put in my .bashrc ?
It seems I always need to run PRoot because ~/.nix-profile points to
a /nix/... directory:
.nix-profile -> /nix/var/nix/profiles/default
There are more steps in the tutorial (5., 6.) - should I follow them ? It seems they apply only in case of using the manual installation (step 4.),
although it is not explicit.
Any help would be appreciated :)
For anyone stumbling on this old question: there is no currently supported way to install Nix without root. The above wiki was moved to https://nixos.wiki/wiki/Nix_Installation_Guide . It may well be out of date. PRoot could work, but even then, rebuilding the whole store at a different path is not a good idea, not the least because the binary caches won't help and you'll need to build everything.
I suggest trying Nix in a virtual machine or cloud server.
Future people from Google, it's still unsupported but does work. Script here that installs a couple dependencies, builds a temporary Nix, and uses that to install a proper version in your directory of choice.
I have a problem with the installation of Apache sparkR. To install this type of program you have to use the command prompt and "run" (for me) sparkR as requested here:
http://www.r-bloggers.com/installing-and-starting-sparkr-locally-on-windows-os-and-rstudio/
However, by running the following command line I found a path issue. (I checked registry problems and purposely make a short path without long words). :
PS C:\Users\Maxime> cd ..
PS C:\Users> cd ..
PS C:\> cd .\Apache\
PS C:\Apache> cd .\spark\
PS C:\Apache\spark> .\bin\sparkR
Le chemin d’accès spécifié est introuvable. // Translate: The specified path was not found.
PS C:\Apache\spark>
What should I do to work? (i would like to stay on windows)
Thank you very much !
the r-bloggers article that you quote installs Spark in a different folder to the one that you are in. It uses the directory c:\Apache\Spark-1.4.1 , whereas you are in c:\Apache\spark.
It seems that you are unfamiliar with using the command prompt to locate an installation. If you don't know your way around the command line then you will struggle with Spark. It requires a lot of configuration so you really need to be comfortable with paths, directories etc. You can try a tutorial like this one
If you are trying to learn Spark, you can avoid the trouble of maintaining an installation by signing up for a (free) hosted Spark account here:Databricks.com community edition. You also get a lot of help and training materials with that account.