- This is
- an ordered
- list
git branch -m master main | |
git push -u origin main | |
# https://github.com/<org>/<repo>/settings/branches | |
# update default branch | |
git branch -D master | |
git push origin --delete master |
#!/usr/bin/env bash | |
# export DO_TOKEN=foo | |
# export K8S_CLUSTER_ID=bar | |
if [[ -z "$DO_TOKEN" ]] || [[ -z "$K8S_CLUSTER_ID" ]]; then | |
echo "DO_TOKEN and K8S_CLUSTER_ID must be set" 1>&2 | |
exit 1 | |
fi | |
echo "Updating DigitalOcean K8s config file..." |
############################## Installation Instructions ############################## | |
# | |
# 1. brew update && brew install jq yq | |
# 2. Click iTerm2 > Install Shell Integration | |
# 3. Put `iterm2_print_user_vars` function in .bashrc or equivalent | |
# 4. Edit your iTerm2 profile(s) to have something like `\(user.kctx)\n\(user.kns)\n` in the "Badge" field | |
# | |
# Note: The important part of the badge is the user variables. Outside of those you can | |
# customize with plaintext, line returns, etc. | |
# |
[03:35 PM]~/Desktop ➭ docker run hello-world | |
Hello from Docker! | |
This message shows that your installation appears to be working correctly. | |
To generate this message, Docker took the following steps: | |
1. The Docker client contacted the Docker daemon. | |
2. The Docker daemon pulled the "hello-world" image from the Docker Hub. | |
3. The Docker daemon created a new container from that image which runs the | |
executable that produces the output you are currently reading. |
{ | |
"editor.fontSize": 14, | |
"explorer.openEditors.visible": 0, | |
"editor.minimap.enabled": false, | |
"editor.rulers": [120], | |
"files.autoSave": "onFocusChange", | |
"files.exclude": { | |
"**/.git": true, | |
"**/.DS_Store": true, | |
"**/tmp": true, |
func spinner(message string) { | |
// go func() { | |
for { | |
for _, r := range `-\|/` { | |
fmt.Printf("\r%s%s %c%s", message, "\x1b[92m", r, "\x1b[39m") | |
time.Sleep(time.Millisecond * 100) | |
} | |
} | |
// }() | |
} |
# Here's that framework we talked about! | |
# It's perfect for ephemeral build servers. | |
# Why install Serverspec everywhere? | |
# Use a container to test your container(s)! | |
$ docker run --rm --name integration-test \ | |
➭ -v /var/run/docker.sock:/var/run/docker.sock \ | |
➭ -v $(pwd):/test \ | |
➭ -w /test \ | |
➭ jadametz/serverspec \ |
~/.../docker-serverspec ➭ git diff Dockerfile | |
@@ -6,3 +6,6 @@ RUN apk add --update --no-cache build-base | |
COPY Gemfile Gemfile.lock ./ | |
RUN bundle install | |
+ENTRYPOINT ["rspec"] | |
+CMD ["-h"] | |
+ | |
~/.../docker-serverspec ➭ bundle exec rspec |
~/.../docker-serverspec ➭ git diff spec/Dockerfile_spec.rb | |
@@ -39,4 +39,12 @@ describe "Dockerfile" do | |
it { should be_installed.by('gem') } | |
end | |
end | |
+ | |
+ it "should execute rspec" do | |
+ expect(@image.json["Config"]["Entrypoint"][0]).to eq("rspec") | |
+ end | |
+ |