Created
October 13, 2017 19:09
-
-
Save maoueh/791e2f1bbc501abfdaeb47cfb7680f37 to your computer and use it in GitHub Desktop.
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
docker_test: | |
steps: | |
- git::https://github.com/samsao/bitrise-step-macos-install-docker.git@feature/auto-export: | |
title: Install Docker | |
- script@1.1.3: | |
title: Build image | |
inputs: | |
- content: |- | |
#!/bin/bash | |
set -ex | |
docker-machine env default | |
echo "" | |
echo "Extracting variables" | |
docker-machine env default | while read -r line; do | |
[[ "$line" == "\#*" ]] && continue | |
# Prints line, using a regex, extract either key or value then assign to variable | |
key=`echo "$line" | sed 's/export \(.*\)="\(.*\)"/\1/'` | |
value=`echo "$line" | sed 's/export \(.*\)="\(.*\)"/\2/'` | |
echo "Exporting '$key'='$value' to envman" | |
done | |
mkdir -p ~/app | |
eval $(docker-machine env default) | |
cat << EOF > ~/app/Dockerfile | |
FROM node:8.1-slim | |
RUN npm install -g yarn@latest | |
EOF | |
docker build -f ~/app/Dockerfile -t gcr.io/yuzu-175518/something:0.0.1-beta.1 ~/app | |
docker login -u _json_key -p "$DOCKER_GCR_AUTH_JSON_KEY" https://gcr.io | |
docker push gcr.io/yuzu-175518/something:0.0.1-beta.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment