Questions tagged [shell-script]
38 questions
57
votes
5 answers
How is Ansible different from simply running a provisioning bash shell in Vagrant?
A team of IT sysadmins that have exprience using shell scripting to solve their problems, are contemplating to start using Ansible instead.
Are there substantial differences and good reasons to start using Ansible vs. to continue writing shell…
Evgeny Zislis
- 9,023
- 5
- 39
- 72
5
votes
1 answer
Jenkins Exception that is caused by stdout redirection using windows cmd
I'm trying to execute an exec file from a jenkins server, using windows cmd. This is what is run from jenkins Windows batch window:
C:\MyApp\MyApp.exe
When run regularly from command line, the app prints to the console reporting its progress.
When I…
Noam Ohana
- 221
- 3
- 8
5
votes
2 answers
docker-compose multiple services in a loop
Trying to optimize definition of multiple services with docker-compose.yml
Here is the original, "dumb" variant of the docker-compose.yml:
version: '3'
services:
s1:
build: .
ports:
- "5001:9000"
volumes:
- ../www1:/var/www
…
Alexander Shcheblikin
- 181
- 1
- 5
4
votes
3 answers
Jenkins - sending email after build with the build version as a subject
I would like to send an email at the end of my build to inform success or failure. I'm using the email ext-plugin for Jenkins. I want the version number of the build to be the subject of the email.
The problem is that the version is something that…
Noam Ohana
- 221
- 3
- 8
4
votes
0 answers
Problems with integrating Python script in a Bash script Git pre-receive hook
We have a pre-receive hook script in a bash shell script that enforces commits with messages having the right ticket number in a pre-defined format. We also have a separate python script that can be called in the pre-receive hook bash script to call…
sage
- 179
- 3
3
votes
1 answer
Prevent ${PIPELINESTATUS[0]} from being evaluated in Jenkinsfile
Below is a script I am running in the deploy of a docker container. The docker ps -a | grep $APP_CONTAINER_NAME command is returning non-zero when the container was not correctly built/tested, hence the || true.
How can I prevent Jenkins from…
jdcskillet
- 45
- 7
3
votes
1 answer
npm not found but installed from the shell script file in Dockerfile
I have a following Dockerfile:
FROM ubuntu:18.04
RUN mkdir app && cd app
WORKDIR app/
RUN apt-get update && apt-get install -y \
software-properties-common \
curl \
sudo \
&& curl -O…
Leon Ma
- 33
- 1
- 1
- 4
3
votes
1 answer
Run scripts which are stored in GitLab from Jenkins
I have configured Jenkins Build Jobs and Deployment Jobs from using Jenkins shell. But I put all the commands in Shell to execute. Can I store those commands in GitLab and execute from jenkins?
Janith
- 173
- 2
- 7
3
votes
1 answer
Cassandra DB: store binary file record via shell
While the dev team works on a REST service to manage binary data in Cassandra, ops would like to store local blobs directly from shell.
Is it actually possible via CQL/bash without a Cassandra driver? I could find so far only an example for Ruby.
Ta Mu
- 6,792
- 5
- 43
- 83
2
votes
1 answer
Bash Tokenization Errors on Jenkins JNLP Slave
Why might the below bash commands give me an error on a Jenkins JNLP slave in Kubernetes cluster? Each work on a local machine.
Error: Syntax error: redirection unexpected
IFS='/' read -r -a branch <<< "${1}"
Error: Syntax error: "(" unexpected…
Brandon Clark
- 131
- 5
2
votes
2 answers
How to read array and loop server selection and deployment
I have configured jenkins parameter deployment job using active choices parameterize plugin. In my dev server section have two servers called, 192.168.94.139, 192.168.94.140
I want to read this array input and deploy to both servers. As an example…
Janith
- 173
- 2
- 7
2
votes
2 answers
Automatic production deployment for a Node.js app on RHEL 7?
I am looking for some way to have a maximally simple(no Jenkins or anything like that) automatic production deployment for a Node.js application on a RHEL 7 system. The caveat is:
At the organization where I work, we have a very restricted IT…
Megakoresh
- 139
- 5
2
votes
1 answer
Suggestions for a good run command review console
Is there a good web console or tool that would help enable us to review Shell Scripts?
Usually when maintaining a system, we would run scripts that are managed, or we could run scripts that run only once. However, these scripts must go through a…
JeffJen
- 21
- 1
2
votes
1 answer
Any site to host my little utility script?
I have a small node js script running in my aws ec2. It is just one file. If I hit the server with a query param, it will do some utility job (like hashing) and return the result in html.
Since its a small script I wondered if there is any site that…
Mani Bharathy
- 21
- 1
2
votes
1 answer
How can I monitor docker volume usage?
I'm planning to automate docker activities using python. However, I couldn't find any efficient command for monitoring docker volume. So now I wish to use shell commands for that and later it can be converted using subprocess in python.
My…
Aaditya R Krishnan
- 121
- 1