sudo apt-get install openjdk-8-jdk
# don't worry, you can apt-get multiple java versions
sudo apt-get install openjdk-11-jdk
#sudo apt-get install openjdk-... <tab complete to see all available versions>
This file contains 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
# install gc | |
brew install jemalloc | |
# check for openssl installation location | |
brew list openssl | |
# install ruby | |
ruby-install ruby 2.6.4 -- --with-jemalloc --with-openssl-dir=/usr/local/Cellar/openssl/1.0.2s | |
# check for jemalloc |
This file contains 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 | |
brew tap AdoptOpenJDK/openjdk | |
# can install adoptopenjdk8 or adoptopenjdk11 | |
brew cask install adoptopenjdk8 | |
# list all installed | |
# /usr/libexec/java_home -V | |
# switch java version, use 1.8, or 11 |
This file contains 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 | |
# install | |
brew cask install graalvm/tap/graalvm-ce-java11 | |
# update | |
# brew cask upgrade graalvm/tap/graalvm-ce-java11 | |
# update JAVA_HOME | |
export JAVA_HOME=/Library/Java/JavaVirtualMachines/graalvm-ce-java11-20.1.0/Contents/Home |
This file contains 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
import xml.etree.ElementTree as ET | |
import re | |
def find_reports_dir(pom_file): | |
""" Return the report directory specified in the pom """ | |
# extract and set namespace | |
root = ET.parse(pom_file).getroot() | |
m = re.findall(r'{(.*?)}', root.tag) | |
namespace = m[0] if m else '' | |
ns = {'maven': namespace} |
This file contains 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
"""StepImplementer for the upload-container-image step using curl. | |
TODO: doc me | |
Mandatory Inputs: | |
1. | |
# entire file path of where the signature is | |
#includes temporary directory where signature is located | |
'container-image-signature-file-path' |
- Valid image in some registry, say something like
docker.io:/jonnyman9/hello-node:latest
- Valid signature being served by some signature server, say something like
https://sigserver.com
- You have access to the public PGP key used to sign the image, say something like
pubring.gpg
There really only is 1 important file we need, the machine-config.yaml
that forces the host to verify the image against some signature when pulling it in. This one file however is made up of 3 smaller components:
This file contains 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
kind: "BuildConfig" | |
apiVersion: "build.openshift.io/v1" | |
metadata: | |
name: "nodejs-sample-pipeline" | |
spec: | |
strategy: | |
jenkinsPipelineStrategy: | |
jenkinsfile: |- | |
// path of the template to use | |
def templatePath = 'nodejs-mongodb-example' |
There are a few env variables you need to set first. Also assuming you have oc
installed and you are logged in as a cluster admin. This has been tested on OCP v4.5.36 and StackRox v3.0.58.0.
export YOUR_STACKROX_USERNAME=test@example.com
export YOUR_STACKROX_PASSWORD=whateverYourPasswordIs
export STACKROX_PASSWORD=Pa22word # used to log into your deployed stackrox instance. user is `admin` and password is this
This file contains 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 | |
# Taken from: https://superuser.com/questions/153245/how-can-i-open-google-chrome-via-command-line-with-a-url-in-incognito-mode | |
url() { | |
url=$([[ $1 =~ ^[a-zA-Z]{1,}: ]] && printf '%s\n' "$1" || printf '%s\n' "http://$1") | |
open -a 'Google Chrome' "$url" | |
} |