Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Engineering Digital Service
Metabase
Commits
7209c68f
Commit
7209c68f
authored
9 years ago
by
Tom Robinson
Browse files
Options
Downloads
Patches
Plain Diff
Remove deploy-metabase-deploy script (replaced with script in metabase-deploy repo
parent
ef423ff6
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/deploy-metabase-deploy
+0
-67
0 additions, 67 deletions
bin/deploy-metabase-deploy
with
0 additions
and
67 deletions
bin/deploy-metabase-deploy
deleted
100755 → 0
+
0
−
67
View file @
ef423ff6
#!/usr/bin/env bash
set
-eu
set
-o
pipefail
SRC_DIR
=
"
$PWD
"
DEPLOY_DIR
=
"
$PWD
/.metabase_deploy"
if
[
"$#"
-lt
2
]
;
then
echo
"USAGE: deploy-metabase-deploy metabase.jar VERSION_TAG [GIT REMOTE]"
exit
1
fi
METABASE_JAR
=
"
$1
"
DEPLOY_TAG
=
"
$2
"
if
[
"$#"
-gt
2
]
;
then
DEPLOY_REPO
=
"
$3
"
else
DEPLOY_REPO
=
"git@github.com:metabase/metabase-deploy.git"
fi
DEPLOY_REPO_SLUG
=
"
$(
echo
"
$DEPLOY_REPO
"
|
grep
-Eo
"[a-zA-Z0-9_-]+/[a-zA-Z0-9_-]+"
)
"
DEPLOY_TREE
=
"
$DEPLOY_REPO_SLUG
/tree/
$DEPLOY_TAG
"
# clone the metabase-deploy repo
git clone
"
$DEPLOY_REPO
"
"
$DEPLOY_DIR
"
# copy the jar
mkdir
-p
"
$DEPLOY_DIR
/target/uberjar"
cp
"
$METABASE_JAR
"
"
$DEPLOY_DIR
/target/uberjar/metabase-standalone.jar"
# copy the other required files
FILES
=
"Procfile app.json bin/start"
for
FILE
in
$FILES
;
do
mkdir
-p
"
$DEPLOY_DIR
/
$(
dirname
$FILE
)
"
cp
"
$FILE
"
"
$DEPLOY_DIR
/
$FILE
"
done
# change to the deploy directory
cd
"
$DEPLOY_DIR
"
# modify app.json to use null-buildpack since we're using a pre-compiled jar
node
<<
EOF
var fs = require("fs");
var app = JSON.parse(fs.readFileSync("app.json"));
app.buildpacks = [{ "url": "http://github.com/ryandotsmith/null-buildpack.git" }];
delete app.env.NPM_CONFIG_LOGLEVEL;
fs.writeFileSync("app.json", JSON.stringify(app, null, 2));
EOF
# generate a README
cat
>
README.md
<<
EOF
[](https://heroku.com/deploy?template=https://github.com/
$DEPLOY_TREE
)
EOF
# add, commit, tag, and push
git add
.
git commit
-m
"Deploy
$DEPLOY_TAG
"
git tag
"
$DEPLOY_TAG
"
git push
--tags
"
$DEPLOY_REPO
"
master
# change back
cd
"
$SRC_DIR
"
# pretend like this never happened
rm
-rf
"
$DEPLOY_DIR
"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment