Skip to content

Instantly share code, notes, and snippets.

View kwonghung-YIP's full-sized avatar

Kwong-Hung YIP kwonghung-YIP

View GitHub Profile
@kwonghung-YIP
kwonghung-YIP / backup-docker-secrets.sh
Created October 15, 2019 03:26
Shell script for export all secrets defined in docker swarm
#!/bin/bash
service_name="backup-all-secrets"
secret_list=( `docker secret ls --format "{{ .Name }}"` )
cmd="docker service create \
--name $service_name \
--constraint node.hostname==`hostname` "
for secret in "${secret_list[@]}"
@kwonghung-YIP
kwonghung-YIP / helm-charts-repo-travis.yml
Created October 5, 2019 06:33
travis.yml for helm-charts-repo repository
language: minimal
if: branch = master
before_install:
- curl -L https://git.io/get_helm.sh | bash
- helm init --client-only
script:
- mkdir files-to-gh-pages
- echo $(pwd)