Skip to content

Instantly share code, notes, and snippets.

View andmos's full-sized avatar

Andreas Mosti andmos

View GitHub Profile
Run redhat-actions/s2i-build@v2
with:
path_context: target/
builder_image: registry.access.redhat.com/fuse7/fuse-java-openshift:1.2
image: ip-avgivelser
tags: 2.0.0-140 0329232
log_level: 1
env:
APP_NAME: ip-avgivelser
JAR_NAME: ip-avgivelser-2.0.0.jar
Run redhat-actions/s2i-build@v2
with:
path_context: target/
builder_image: registry.access.redhat.com/fuse7/fuse-java-openshift:1.2
image: ip-avgivelser
tags: 2.0.0-145 c46659f
log_level: 1
env:
APP_NAME: ip-avgivelser
JAR_NAME: ip-avgivelser-2.0.0.jar
Run redhat-actions/push-to-registry@main
with:
image: domstolene/ip-avgivelser
tags: 2.0.0-134 7e59f9c
registry: ghcr.io
username: domstolene
password: ***
tls-verify: true
env:
APP_NAME: ip-avgivelser

To use kustomize with OpenShift:

git clone https://github.com/adnovum/kustomize-openshift
tree
├── base
│   ├── kustomization.yaml
│   ├── readinglist-deployment.yaml
│   └── readinglist-svc.yaml
└── overlays
    └── prod
2020-05-11 15:54:37,326 7740 [INFO ] - Chocolatey v0.10.15
2020-05-11 15:54:37,334 7740 [DEBUG] - Chocolatey is running on Windows v 10.0.18363.0
2020-05-11 15:54:37,334 7740 [DEBUG] - Attempting to delete file "C:/ProgramData/chocolatey/choco.exe.old".
2020-05-11 15:54:37,334 7740 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\choco.exe.old".
2020-05-11 15:54:37,345 7740 [DEBUG] - Command line: "C:\ProgramData\chocolatey\choco.exe" install wget --verbose -y
2020-05-11 15:54:37,345 7740 [DEBUG] - Received arguments: install wget --verbose -y
2020-05-11 15:54:37,377 7740 [DEBUG] - RemovePendingPackagesTask is now ready and waiting for PreRunMessage.
2020-05-11 15:54:37,392 7740 [DEBUG] - Sending message 'PreRunMessage' out if there are subscribers...
2020-05-11 15:54:37,392 7740 [DEBUG] - [Pending] Removing all pending packages that should not be considered installed...
2020-05-11 15:54:37,446 7740 [DEBUG] - Performing validation checks.
version: '3'
services:
myservice:
image: andmos/myservice
expose:
- "80"
build: .
env_file:
- development.env
nginx:
events {}
http {
server {
listen 5000 ssl;
server_name localhost;
ssl_certificate /usr/share/certs/localhost+2.pem;
ssl_certificate_key /usr/share/certs/localhost+2-key.pem;
ssl_protocols TLSv1.2;
$ mkcert -install
Created a new local CA at "/Users/andreasmosti/Library/Application Support/mkcert" 💥
The local CA is now installed in the system trust store! ⚡️
The local CA is now installed in the Firefox trust store (requires browser restart)! 🦊
$ mkcert localhost 127.0.0.1
Using the local CA at "/Users/andreasmosti/Library/Application Support/mkcert" ✨
Created a new certificate valid for the following names 📜
- "localhost"
function jsonToEnvironment {
if [ -f $1 ]; then
for s in $(jq -r "to_entries|map(\"\(.key)=\(.value|tostring)\")|.[]" $1)
do
export $s
done
fi
}
### Usage:
#!/bin/bash
hostname="{{ ansible_host }}"
serverUrl="{{ octopusHost }}"
apiKey="{{ octopusAPIKey }}"
localIp="{{ ansible_default_ipv4.address }}"
environment="{{ octopusEnvironment }}"
accountId="{{ octopusSSHAccount }}"
fingerprint=$(ssh-keygen -E md5 -lf /etc/ssh/ssh_host_rsa_key.pub | cut -d' ' -f2 | cut -d: -f2- | awk ' { print $1}') #MD5
machineName="{{ ansible_hostname }}"