Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Nomad
Commits
ea5229e2
Unverified
Commit
ea5229e2
authored
5 years ago
by
Drew Bailey
Browse files
Options
Download
Email Patches
Plain Diff
refact to remove conditional nesting
parent
974b74d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.circleci/config/jobs/website-docker-image.yml
+7
-7
.circleci/config/jobs/website-docker-image.yml
with
7 additions
and
7 deletions
+7
-7
.circleci/config/jobs/website-docker-image.yml
+
7
-
7
View file @
ea5229e2
...
...
@@ -11,16 +11,16 @@ steps:
# of a previous version, for example if packge-lock.json is reverted, we need to manually push the new
# image to the "latest" tag
# Ignore job if running an enterprise build
if ! [ "$NOMAD_ENT_BUILD" = "true" ]; then
IMAGE_TAG=$(cat website/Dockerfile website/package-lock.json | sha256sum | awk '{print $1;}')
echo "Using $IMAGE_TAG"
if ! curl https://hub.docker.com/v2/repositories/hashicorp/nomad-website/tags/$IMAGE_TAG -fsL > /dev/null; then
IMAGE_TAG=$(cat website/Dockerfile website/package-lock.json | sha256sum | awk '{print $1;}')
echo "Using $IMAGE_TAG"
if [ "$CIRCLE_REPOSITORY_URL" != "git@github.com:hashicorp/nomad" ]; then
echo "Not Nomad OSS Repo, not building website docker image"
elif curl https://hub.docker.com/v2/repositories/hashicorp/nomad-website/tags/$IMAGE_TAG -fsL > /dev/null; then
echo "Dependencies have not changed, not building a new website docker image."
else
cd website/
docker build -t hashicorp/nomad-website:$IMAGE_TAG .
docker tag hashicorp/nomad-website:$IMAGE_TAG hashicorp/nomad-website:latest
docker login -u $WEBSITE_DOCKER_USER -p $WEBSITE_DOCKER_PASS
docker push hashicorp/nomad-website
else
echo "Dependencies have not changed, not building a new website docker image."
fi
fi
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment