This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:\Users\vad\dev\gpt-2>docker build --tag gpt-2 -f Dockerfile.cpu . | |
Sending build context to Docker daemon 4.712MB | |
Step 1/7 : FROM tensorflow/tensorflow:1.12.0-py3 | |
---> 39bcb324db83 | |
Step 2/7 : ENV LANG=C.UTF-8 | |
---> Using cache | |
---> 6f94b464e517 | |
Step 3/7 : RUN mkdir /gpt-2 | |
---> Using cache | |
---> 9cb7e44243ba |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def isBuilding(job) { | |
for (comp in Jenkins.instance.computers) { | |
for (ex in comp.executors){ | |
if (ex.isBusy() && (ex.getCurrentExecutable().getParent().getOwnerTask().getName() == job.name)) { | |
return true | |
} | |
} | |
} | |
return false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
ansible_tool() { | |
ver=$1 | |
tag=$(echo ${ver} | awk -F . '{print $1$2}') | |
virtualenv ansible${tag} | |
source ansible${tag}/bin/activate | |
python -m pip install ansible==${ver} \ | |
lxml xmltodict python_ntlm docker pywinrm==0.2.2 pyzabbix requests-credssp jmespath \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export PATH=$PATH:/usr/local/bin | |
namespaces=(jenkins worker gitlab) | |
for ns in "${namespaces[@]}" | |
do | |
kubectl get pods -n "${ns}" --show-all --no-headers=true --field-selector=status.phase=Failed -o=custom-columns=NAME:.metadata.name | xargs -I {} -P 8 kubectl delete pod -n "${ns}" {} | |
kubectl get pods -n "${ns}" --show-all --no-headers=true --field-selector=status.phase=Succeeded -o=custom-columns=NAME:.metadata.name | xargs -I {} -P 8 kubectl delete pod -n "${ns}" {} | |
kubectl get pods -n "${ns}" --show-all --no-headers=true -o json | jq -r '.items[] | select([.status.containerStatuses[] | select(.state.terminated.reason == "Error")] | length == 1) | .metadata.name' | xargs -I {} -P 8 kubectl delete pod -n "${ns}" {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
yum install gcc openssl-devel bzip2-devel libffi-devel make -y | |
curl https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tgz | tar -xzpvf - | |
mkdir -p /opt/python3 | |
cd Python-3.7.2 | |
./configure --enable-optimizations --prefix=/opt/python3 | |
make altinstall | |
/opt/python3/bin/python3.7 --version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -ex | |
[[ -z $3 ]] && exit 1 | |
#user="worker" | |
#lb_url="https://k8s-master.example.com:6443" | |
#master_host="root@master1" | |
user=$1 | |
lb_url=$2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node('linux') { | |
def ver | |
stage ('Stage 1') { | |
withCredentials([usernamePassword(credentialsId: 'nexus_user_cred', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) { | |
def versions = getVersionId('http://nexus.example.com:8081/nexus/service/local', "${USERNAME}", "${PASSWORD}",'distrib', 'test1') | |
ver = input message: 'Get version', | |
parameters: [choice(choices: versions, description: '', name: 'versions')] | |
file_name = ver + '.zip' | |
getNexusFile(file_name, "${USERNAME}", "${PASSWORD}", 'http://nexus.example.com:8081/nexus/service/local', 'loans.car', ver, 'zip', 'test_elease', 'distrib', '') | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: localhost | |
gather_facts: false | |
connection: local | |
tasks: | |
- name: get update-center.json | |
get_url: | |
url: 'https://updates.jenkins.io/update-center.json' | |
dest: ./update-center.json | |
- name: strip update-center |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jenkins_plugins: | |
- name: ace-editor | |
version: '1.1' | |
- name: active-directory | |
version: '2.9' | |
- name: ali-jenkins-plugin | |
version: '2.2.57-1123.0' | |
- name: allure-jenkins-plugin | |
version: '2.27.0' | |
- name: analysis-core |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Compare plugins | |
hosts: jenkins[0] | |
gather_facts: false | |
#connection: local | |
tasks: | |
- name: Load active plugins list from Jenkins | |
jenkins_script: | |
script: | | |
import groovy.json.JsonOutput | |
def plugins = [] |