Questions tagged [shell-script]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
36 views

How to process output from a “hello world” python script?

This example builds fine: root@mordor:~/gitrepo/path-to-kubernetes/src/python/helloworld# root@mordor:~/gitrepo/path-to-kubernetes/src/python/helloworld# ll total 16 drwxr-xr-x 2 root root 4096 Oct ...
1
vote
1answer
52 views

SSH connection to jenkins server

I have a absh script which connects and exexutes programs from my local to remote server and now this should be executed from jenkins build so for this jenkins is taking continous changes from git for ...
2
votes
1answer
18 views

Any site to host my little utility script? [closed]

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 ...
0
votes
0answers
80 views

How to edit xml files through Jenkins pipeline?

I've to update xml file as a part of pipeline. From following, I've to replace value from true to false <bean id="SecurityFilter" class="xxx"> <property name="...
1
vote
2answers
93 views

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: - "...
2
votes
1answer
40 views

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 ...
1
vote
1answer
40 views

create entry-point script to get all env variables starting with VUE_APP_ and take it's value

I would like to Dockerize my existing vuejs app for staging , production and I used multi staged approach to create my app container and I'm using Ubuntu 18.04 and this is my, Dockerfile # build stage ...
1
vote
2answers
30 views

Docker preserve images policy

Can I configure Docker in a such way that it will store only certain amount of tags for the given image e.g. docker images REPOSITORY TAG ...
1
vote
2answers
3k views

How to add shell script to jenkins freestyle job

I have the below shell script: du -sh /bbhome/shared/data/repositories/* |sort -h |tail -20 | while IFS= read -r line;do DIR=`echo $line | awk '{print$2}'` Rep=`cat $DIR/repository-...
1
vote
1answer
164 views

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 ...
2
votes
1answer
2k views

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 ...
1
vote
1answer
2k views

Add mapping ip and host into /etc/hosts with docker

I am using docker to scale my service. I know there's a command called --add--host for adding host into /etc/host However, I have a bunch of hosts need to be added. It's just too long to launch a ...
1
vote
1answer
8k views

Set environment variables then run script in Jenkins Scripted Pipeline

I am new to Jenkins, Groovy and pipelines. I have created a simple pipeline stage like so: //working build but not setting env variables node('build-01') { stage('Building') { echo "[*] ...
0
votes
2answers
61 views

Programmatically scrape the latest version of Tomcat for an installation script

Looking for some assistance or ideas on how to grab the latest version of a Tomcat release from their website or other website. I came across these Stack Overflow/Stack Exchange links that were ...
0
votes
2answers
55 views

replacing values in shell script using sed [closed]

My shell script looks like this: FAILED_REQUEST_DIRECTORY=/bla/bla2 \ java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=1234 \ -jar /xyz/abc-service-1.0-SNAPSHOT.jar \ --...
0
votes
3answers
65 views

How to avoid build scripts duplication

Let's say you've got several code repositories on GitHub. You want to build, test and deploy them. You picked a continuous integration service (e.g. Travis CI, AppVeyor or something else) and wrote ...
1
vote
4answers
763 views

shell script to pass values properties file in java

I have a properties file that looks like this: mysql.username=USERNAME mysql.pass=PASS I need to change USERNAME and PASS with variable values passed to shell script. I cannot use sed since that ...
1
vote
1answer
83 views

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 ...
-3
votes
2answers
764 views

How can CaaS, PaaS, and FaaS users know if the operating system of their server environment is of the newest release?

Please consider this chart a moment; it shows the different hosting models common today: From the chart I learn that CaaS, PaaS and FaaS are three hosting-models by which a user can't control the OS ...
1
vote
1answer
351 views

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 ...
3
votes
1answer
1k views

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?
0
votes
3answers
82 views

Is there a php (or composer) command to change upload_max_filesize && post_max_size from terminal?

Is there a php (or composer) terminal command to change the php.ini variables upload_max_filesize and post_max_size from terminal to some value directly from terminal, without sed or awk operations? ...
-3
votes
1answer
106 views

Set user in aws

I have a lot of instance in aws.I have build through terraform. I have made scripts of making user(e.g. user1 rather than ec2-user).But i am facing one issue.when i check .ssh/authorized_key. I have ...
0
votes
1answer
91 views

The right way to Ansiblically deploy environments directly from Github:

Can one deploy an environment for some Linux OS (say, Ubuntu) from a raw Github playbook in a way similar to this (I wonder if it's the correct syntax)? bash <(curl -s https://raw....
4
votes
3answers
2k views

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. ...
4
votes
1answer
2k views

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 ...
3
votes
1answer
142 views

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?...
2
votes
2answers
76 views

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 ...
-5
votes
1answer
96 views

Shell Scripting [closed]

I am trying to execute a PHP shell script on my friends mail server to show him the impact of such vulnerability. Vulnerable code but unfortunately it doesn't seem to be running. This is the script I ...
1
vote
1answer
457 views

Best learning resources for continuous integration tools like Jenkins [duplicate]

I am a .NET developer , I have decided to learn DevOps continuous integration tools. One of my folk asked me to learn below tools and language: Jenkins Shell Scripting Python I have found below ...
4
votes
0answers
552 views

Problems with integrating Python script in a Bash script Git pre-receive hook [closed]

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 ...
44
votes
5answers
11k views

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 ...