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
152ca0e5
Unverified
Commit
152ca0e5
authored
11 months ago
by
Uladzimir Havenchyk
Committed by
GitHub
11 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix formatting of pre-release.yml (#41497)
parent
39cf70c3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.github/workflows/pre-release.yml
+130
-130
130 additions, 130 deletions
.github/workflows/pre-release.yml
with
130 additions
and
130 deletions
.github/workflows/pre-release.yml
+
130
−
130
View file @
152ca0e5
...
...
@@ -5,11 +5,11 @@ on:
workflow_dispatch
:
inputs
:
version
:
description
:
'
Metabase
version
(e.g.
v0.46.3)
'
description
:
"
Metabase
version
(e.g.
v0.46.3)
"
type
:
string
required
:
true
commit
:
description
:
'
A
full-length
commit
SHA-1
hash
'
description
:
"
A
full-length
commit
SHA-1
hash
"
required
:
true
jobs
:
...
...
@@ -91,21 +91,21 @@ jobs:
edition
:
[
oss
,
ee
]
java-version
:
[
11
,
17
]
steps
:
-
name
:
Prepare JRE (Java Run-time Environment)
uses
:
actions/setup-java@v4
with
:
java-package
:
jre
java-version
:
${{ matrix.java-version }}
distribution
:
'
temurin
'
-
run
:
java -version
-
uses
:
actions/download-artifact@v4
name
:
Retrieve uberjar artifact
with
:
name
:
metabase-${{ matrix.edition }}-uberjar
-
name
:
Launch uberjar (and keep it running)
run
:
java -jar ./metabase.jar &
-
name
:
Wait for Metabase to start
run
:
while ! curl -s 'http://localhost:3000/api/health' | grep '{"status":"ok"}'; do sleep 1; done
-
name
:
Prepare JRE (Java Run-time Environment)
uses
:
actions/setup-java@v4
with
:
java-package
:
jre
java-version
:
${{ matrix.java-version }}
distribution
:
"
temurin
"
-
run
:
java -version
-
uses
:
actions/download-artifact@v4
name
:
Retrieve uberjar artifact
with
:
name
:
metabase-${{ matrix.edition }}-uberjar
-
name
:
Launch uberjar (and keep it running)
run
:
java -jar ./metabase.jar &
-
name
:
Wait for Metabase to start
run
:
while ! curl -s 'http://localhost:3000/api/health' | grep '{"status":"ok"}'; do sleep 1; done
run-sanity-check
:
runs-on
:
ubuntu-22.04
...
...
@@ -132,43 +132,43 @@ jobs:
username
:
${{ secrets.DOCKERHUB_USERNAME }}
password
:
${{ secrets.DOCKERHUB_TOKEN }}
steps
:
-
name
:
Check out the code
uses
:
actions/checkout@v4
with
:
ref
:
${{ needs.release-artifact.outputs.commit }}
-
name
:
Prepare front-end environment
uses
:
./.github/actions/prepare-frontend
-
name
:
Prepare JDK
11
uses
:
actions/setup-java@v4
with
:
java-version
:
11
distribution
:
"
temurin"
-
name
:
Prepare Cypress environment
uses
:
./.github/actions/prepare-cypress
-
name
:
Run Snowplow micro
uses
:
./.github/actions/run-snowplow-micro
-
uses
:
actions/download-artifact@v4
name
:
Retrieve uberjar artifact for ${{ matrix.edition }}
with
:
name
:
metabase-${{ matrix.edition }}-uberjar
-
name
:
Get the version info
run
:
|
jar xf metabase.jar version.properties
mv version.properties resources/
-
name
:
Run a few important Cypress tests as sanity check
run
:
|
mkdir -p ./target/uberjar && cp metabase.jar ./target/uberjar/metabase.jar
yarn test-cypress-run --folder onboarding
-
name
:
Check out the code
uses
:
actions/checkout@v4
with
:
ref
:
${{ needs.release-artifact.outputs.commit }}
-
name
:
Prepare front-end environment
uses
:
./.github/actions/prepare-frontend
-
name
:
Prepare JDK
11
uses
:
actions/setup-java@v4
with
:
java-version
:
11
distribution
:
"
temurin"
-
name
:
Prepare Cypress environment
uses
:
./.github/actions/prepare-cypress
-
name
:
Run Snowplow micro
uses
:
./.github/actions/run-snowplow-micro
-
uses
:
actions/download-artifact@v4
name
:
Retrieve uberjar artifact for ${{ matrix.edition }}
with
:
name
:
metabase-${{ matrix.edition }}-uberjar
-
name
:
Get the version info
run
:
|
jar xf metabase.jar version.properties
mv version.properties resources/
-
name
:
Run a few important Cypress tests as sanity check
run
:
|
mkdir -p ./target/uberjar && cp metabase.jar ./target/uberjar/metabase.jar
yarn test-cypress-run --folder onboarding
-
name
:
Upload Cypress Artifacts upon failure
uses
:
actions/upload-artifact@v4
if
:
failure()
with
:
name
:
cypress-failed-tests-recording
path
:
|
./cypress
./logs/test.log
if-no-files-found
:
ignore
-
name
:
Upload Cypress Artifacts upon failure
uses
:
actions/upload-artifact@v4
if
:
failure()
with
:
name
:
cypress-failed-tests-recording
path
:
|
./cypress
./logs/test.log
if-no-files-found
:
ignore
containerize
:
needs
:
[
release-artifact
,
run-sanity-check
]
...
...
@@ -185,71 +185,71 @@ jobs:
outputs
:
image_tag
:
${{ steps.target.outputs.image_tag }}
steps
:
-
name
:
Get the version
run
:
|
if [[ "${{ matrix.edition }}" == "ee" ]]; then
echo "VERSION=${{ needs.release-artifact.outputs.ee_version }}" >> $GITHUB_ENV
else
echo "VERSION=${{ needs.release-artifact.outputs.oss_version }}" >> $GITHUB_ENV
fi
-
name
:
Check out the code
uses
:
actions/checkout@v4
with
:
ref
:
${{ needs.release-artifact.outputs.commit }}
-
uses
:
actions/download-artifact@v4
name
:
Retrieve uberjar artifact
with
:
name
:
metabase-${{ matrix.edition }}-uberjar
-
name
:
Move the Uberjar to the context dir
run
:
mv metabase.jar bin/docker/.
-
name
:
Set up Docker Buildx
id
:
buildx
uses
:
docker/setup-buildx-action@v2
with
:
driver-opts
:
network=host
-
name
:
Build ${{ matrix.edition }} container
uses
:
docker/build-push-action@v3
with
:
context
:
bin/docker/.
platforms
:
linux/amd64
network
:
host
tags
:
localhost:5000/local-metabase:${{ env.VERSION }}
no-cache
:
true
push
:
true
-
name
:
Get the version
run
:
|
if [[ "${{ matrix.edition }}" == "ee" ]]; then
echo "VERSION=${{ needs.release-artifact.outputs.ee_version }}" >> $GITHUB_ENV
else
echo "VERSION=${{ needs.release-artifact.outputs.oss_version }}" >> $GITHUB_ENV
fi
-
name
:
Check out the code
uses
:
actions/checkout@v4
with
:
ref
:
${{ needs.release-artifact.outputs.commit }}
-
uses
:
actions/download-artifact@v4
name
:
Retrieve uberjar artifact
with
:
name
:
metabase-${{ matrix.edition }}-uberjar
-
name
:
Move the Uberjar to the context dir
run
:
mv metabase.jar bin/docker/.
-
name
:
Set up Docker Buildx
id
:
buildx
uses
:
docker/setup-buildx-action@v2
with
:
driver-opts
:
network=host
-
name
:
Build ${{ matrix.edition }} container
uses
:
docker/build-push-action@v3
with
:
context
:
bin/docker/.
platforms
:
linux/amd64
network
:
host
tags
:
localhost:5000/local-metabase:${{ env.VERSION }}
no-cache
:
true
push
:
true
-
name
:
Launch container
run
:
docker run --rm -dp 3000:3000 localhost:5000/local-metabase:${{ env.VERSION }}
timeout-minutes
:
5
-
name
:
Wait for Metabase to start
run
:
while ! curl -s 'http://localhost:3000/api/health' | grep '{"status":"ok"}'; do sleep 1; done
timeout-minutes
:
3
-
name
:
Launch container
run
:
docker run --rm -dp 3000:3000 localhost:5000/local-metabase:${{ env.VERSION }}
timeout-minutes
:
5
-
name
:
Wait for Metabase to start
run
:
while ! curl -s 'http://localhost:3000/api/health' | grep '{"status":"ok"}'; do sleep 1; done
timeout-minutes
:
3
-
name
:
Login to Docker Hub
uses
:
docker/login-action@v2
with
:
username
:
${{ secrets.DOCKERHUB_RELEASE_USERNAME }}
password
:
${{ secrets.DOCKERHUB_RELEASE_TOKEN }}
-
name
:
Retag and push container image to ${{ vars.DOCKERHUB_OWNER }} staging Docker Hub repo
id
:
target
run
:
|
# SHA-1 truncated to 7 digits should be enough
SHORT_HASH=${COMMIT:0:7}
-
name
:
Login to Docker Hub
uses
:
docker/login-action@v2
with
:
username
:
${{ secrets.DOCKERHUB_RELEASE_USERNAME }}
password
:
${{ secrets.DOCKERHUB_RELEASE_TOKEN }}
-
name
:
Retag and push container image to ${{ vars.DOCKERHUB_OWNER }} staging Docker Hub repo
id
:
target
run
:
|
# SHA-1 truncated to 7 digits should be enough
SHORT_HASH=${COMMIT:0:7}
IMAGE_TAG=$VERSION-$SHORT_HASH
CONTAINER_IMAGE=${{ vars.DOCKERHUB_OWNER }}/${{ vars.DOCKERHUB_STAGING_REPO }}:$IMAGE_TAG
IMAGE_TAG=$VERSION-$SHORT_HASH
CONTAINER_IMAGE=${{ vars.DOCKERHUB_OWNER }}/${{ vars.DOCKERHUB_STAGING_REPO }}:$IMAGE_TAG
echo "image_tag=$IMAGE_TAG" >> $GITHUB_OUTPUT
echo "image_tag=$IMAGE_TAG" >> $GITHUB_OUTPUT
echo "Retag local image for staging"
docker tag localhost:5000/local-metabase:$VERSION $CONTAINER_IMAGE
echo "Retag local image for staging"
docker tag localhost:5000/local-metabase:$VERSION $CONTAINER_IMAGE
echo "Pushing container image $CONTAINER_IMAGE ..."
docker push $CONTAINER_IMAGE
echo "Pushing container image $CONTAINER_IMAGE ..."
docker push $CONTAINER_IMAGE
echo "Finished!"
shell
:
bash
env
:
COMMIT
:
${{ needs.release-artifact.outputs.commit }}
echo "Finished!"
shell
:
bash
env
:
COMMIT
:
${{ needs.release-artifact.outputs.commit }}
verify-docker-pull
:
runs-on
:
ubuntu-22.04
...
...
@@ -261,22 +261,22 @@ jobs:
env
:
IMAGE_TAG
:
${{ needs.containerize.outputs.image_tag }}
steps
:
-
name
:
Login to Docker Hub
# authenticated, to avoid being rate-throttled
uses
:
docker/login-action@v2
with
:
username
:
${{ secrets.DOCKERHUB_RELEASE_USERNAME }}
password
:
${{ secrets.DOCKERHUB_RELEASE_TOKEN }}
-
name
:
Pull the container image
run
:
|
CONTAINER_IMAGE=${{ vars.DOCKERHUB_OWNER }}/${{ vars.DOCKERHUB_STAGING_REPO }}:$IMAGE_TAG
echo "Pulling container image $CONTAINER_IMAGE ..."
docker pull $CONTAINER_IMAGE
echo "Successful!"
-
name
:
Launch container
run
:
|
CONTAINER_IMAGE=${{ vars.DOCKERHUB_OWNER }}/${{ vars.DOCKERHUB_STAGING_REPO }}:$IMAGE_TAG
docker run --rm -dp 3000:3000 $CONTAINER_IMAGE
timeout-minutes
:
5
-
name
:
Wait for Metabase to start
run
:
while ! curl -s 'http://localhost:3000/api/health' | grep '{"status":"ok"}'; do sleep 1; done
timeout-minutes
:
3
-
name
:
Login to Docker Hub
# authenticated, to avoid being rate-throttled
uses
:
docker/login-action@v2
with
:
username
:
${{ secrets.DOCKERHUB_RELEASE_USERNAME }}
password
:
${{ secrets.DOCKERHUB_RELEASE_TOKEN }}
-
name
:
Pull the container image
run
:
|
CONTAINER_IMAGE=${{ vars.DOCKERHUB_OWNER }}/${{ vars.DOCKERHUB_STAGING_REPO }}:$IMAGE_TAG
echo "Pulling container image $CONTAINER_IMAGE ..."
docker pull $CONTAINER_IMAGE
echo "Successful!"
-
name
:
Launch container
run
:
|
CONTAINER_IMAGE=${{ vars.DOCKERHUB_OWNER }}/${{ vars.DOCKERHUB_STAGING_REPO }}:$IMAGE_TAG
docker run --rm -dp 3000:3000 $CONTAINER_IMAGE
timeout-minutes
:
5
-
name
:
Wait for Metabase to start
run
:
while ! curl -s 'http://localhost:3000/api/health' | grep '{"status":"ok"}'; do sleep 1; done
timeout-minutes
:
3
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