» sudo systemctl daemon-reload
System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down
==============================================
Edit*
- Open
/etc/wsl.confwith any editor:
» sudo systemctl daemon-reload
System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down
==============================================
Edit*
/etc/wsl.conf with any editor:| #!/usr/bin/env bash | |
| set -Eeuo pipefail | |
| trap cleanup SIGINT SIGTERM ERR EXIT | |
| script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
| usage() { | |
| cat <<EOF | |
| Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |
| # The definition of color schemes. | |
| schemes: | |
| gruvbox_material_hard_dark: &gruvbox_material_hard_dark | |
| primary: | |
| background: '0x1d2021' | |
| foreground: '0xd4be98' | |
| normal: | |
| black: '0x32302f' | |
| red: '0xea6962' | |
| green: '0xa9b665' |
| // Requires https://plugins.jenkins.io/mask-passwords to run | |
| /** | |
| * Runs code with secret environment variables and hides the values. | |
| * | |
| * @param varAndPasswordList - A list of Maps with a 'var' and 'password' key. Example: `[[var: 'TOKEN', password: 'sekret']]` | |
| * @param Closure - The code to run in | |
| * @return {void} | |
| */ | |
| def withSecretEnv(List<Map> varAndPasswordList, Closure closure) { |
| // Delete old artifacts that fills up the disk on the master node. | |
| // Run this from the Jenkins console (Manage Jenkins, Manage Nodes, master, Script Console) | |
| def project = Jenkins.get().getItemByFullName('your-project-id') | |
| def jobs = project.getAllJobs() | |
| def total_size = 0 | |
| jobs.each{ job -> | |
| def builds = job.getBuilds() |
| ## Install necessary packages and latest virtualbox | |
| wget -q -O - http://download.virtualbox.org/virtualbox/debian/oracle_vbox_2016.asc | sudo apt-key add - | |
| sudo sh -c 'echo "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian bionic non-free contrib" >> /etc/apt/sources.list.d/virtualbox.org.list' | |
| sudo apt update | |
| sudo apt install virtualbox-5.2 qemu-utils genisoimage cloud-utils | |
| ## get kvm unloaded so virtualbox can load | |
| ## WARNING: not needed? | |
| #sudo modprobe -r kvm_amd kvm_intel | |
| #sudo service virtualbox stop |
| version: '2' | |
| services: | |
| zookeeper: | |
| image: "confluentinc/cp-zookeeper:4.1.0" | |
| hostname: zookeeper | |
| ports: | |
| - "2181:2181" | |
| environment: | |
| ZOOKEEPER_CLIENT_PORT: 2181 |
The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.
The correct way of creating a private frok by duplicating the repo is documented here.
For this assignment the commands are:
git clone --bare [email protected]:usi-systems/easytrace.git
| node { | |
| echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1' | |
| echo 'No quotes, pipeline command in single quotes' | |
| sh 'echo $BUILD_NUMBER' // 1 | |
| echo 'Double quotes are silently dropped' | |
| sh 'echo "$BUILD_NUMBER"' // 1 | |
| echo 'Even escaped with a single backslash they are dropped' | |
| sh 'echo \"$BUILD_NUMBER\"' // 1 | |
| echo 'Using two backslashes, the quotes are preserved' | |
| sh 'echo \\"$BUILD_NUMBER\\"' // "1" |