Skip to content

Instantly share code, notes, and snippets.

View dduportal's full-sized avatar

Damien Duportal dduportal

View GitHub Profile
// Allow the Unix user 'dummy' to access Docker and return its UID
def dockerUserInit() {
sh '''
addgroup docker
usermod -aG docker dummy
chmod 666 /var/run/docker.sock
'''
sh(returnStdout: true, script: 'id -u dummy').trim()
}
command:
default_java:
exec: java --version
exit-status: 0
stdout:
- "11.0.20.1+1"
java8:
exec: C:\tools\jdk-8\bin\java.exe -version
exit-status: 0
stderr:
[2022-07-23T09:22:10.632Z] 2022-07-23T09:22:10Z: ==> azure-arm.ubuntu: Querying the machine's properties ...
[2022-07-23T09:22:10.632Z] 2022-07-23T09:22:10Z: ==> azure-arm.ubuntu: -> ResourceGroupName : 'pkr-Resource-Group-f9gh8uo14x'
[2022-07-23T09:22:10.632Z] 2022-07-23T09:22:10Z: ==> azure-arm.ubuntu: -> ComputeName : 'pkrvmf9gh8uo14x'
[2022-07-23T09:22:10.632Z] 2022-07-23T09:22:10Z: ==> azure-arm.ubuntu: -> Managed OS Disk : '/subscriptions/****/resourceGroups/pkr-Resource-Group-f9gh8uo14x/providers/Microsoft.Compute/disks/pkrosf9gh8uo14x'
[2022-07-23T09:22:10.632Z] 2022-07-23T09:22:10Z: ==> azure-arm.ubuntu: Querying the machine's additional disks properties ...
[2022-07-23T09:22:10.632Z] 2022-07-23T09:22:10Z: ==> azure-arm.ubuntu: -> ResourceGroupName : 'pkr-Resource-Group-f9gh8uo14x'
[2022-07-23T09:22:10.632Z] 2022-07-23T09:22:10Z: ==> azure-arm.ubuntu: -> ComputeName : 'pkrvmf9gh8uo14x'
[2022-07-23T09:22:10.632Z] 2022-07-23T09:22:10Z: ==> azure-arm.ubuntu: Powering off machine ...
[
<p>
Execute <a href="https://www.updatecli.io/updatecli" target="_blank">updatecli</a> on the repository.
<p>
The following arguments are available for this function:
<ul>
<li>String action: (Optional - Default: "diff") Updatecli action (e.g. subcommand) to execute.</li>
<li>String config: (Optional - Default: "./updatecli/updatecli.d") path to the file or directory with the updatecli configuration (flag "--config").</li>
<li>String values: (Optional - Default: "./updatecli/values.yaml") path to the file with the updatecli values (flag "--values").</li>
#!/bin/bash
# This script updates all the installed plugins of a Jenkins docker container,
# restart the instance and outputs the resulting list of updated plugins (aka. "plugins.txt")
#
set -eu -o pipefail
JENKINS_URL=https://"${JENKINS_HOST}"
JENKINS_TEST_CREDZ="admin:${ADMIN_TOKEN}"
JENKINS_CONTAINER_NAME="${PROJECT_ID:-default}_jenkins_1"
@dduportal
dduportal / .env
Last active February 3, 2021 15:05
# No double quotes around the rule!
SERVICES_JENKINS_DIR=./
TRAEFIK_ROUTER_RULE_FOR_JENKINS=Host(`localhost`) || Host(`127.0.0.1`) || Host(`172.17.0.1`)
EXTERNAL_HTTP_PORT=80
EXTERNAL_HTTPS_PORT=443
EXTERNAL_JNLP_PORT=50000
JENKINS_MAX_MEMORY=4096M
JENKINS_MAX_CPUS=1.8
JENKINS_INTERNAL_HTTP_PORT=8080
JENKINS_INTERNAL_JNLP_PORT=50000
BATS_HELPERS_DIR ?= $(CURDIR)/helpers
export BATS_HELPERS_DIR
BATS_BIN ?= $(CURDIR)/bats/bin/bats
tests:
$(BATS_BIN) $(CURDIR)/example.bats
#cloud-config
package_update: true
manage-resolv-conf: true
resolv_conf:
nameservers:
- '9.9.9.9'
packages:
version: '3'
services:
reverse-proxy:
image: traefik:v2.0
command:
- --providers.docker
- --entryPoints.web.address=:80
- --entryPoints.websecure.address=:443
- --api.dashboard=true