Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nshmp-haz
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
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
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ghsc
National Seismic Hazard Model Project
nshmp-haz
Commits
d99cba74
Commit
d99cba74
authored
3 years ago
by
Clayton, Brandon Scott
Browse files
Options
Downloads
Patches
Plain Diff
remove script
parent
eb37ba43
No related branches found
No related tags found
1 merge request
!522
Updates
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/gitlab-ci/docker-build.sh
+0
-44
0 additions, 44 deletions
scripts/gitlab-ci/docker-build.sh
with
0 additions
and
44 deletions
scripts/gitlab-ci/docker-build.sh
deleted
100755 → 0
+
0
−
44
View file @
eb37ba43
#!/bin/bash
#
# Script to build Docker image and push to internal registry.
##
BUILD_ARGS
=
""
;
for
arg
in
${
DOCKER_BUILD_ARGS
}
;
do
BUILD_ARGS
=
"
${
BUILD_ARGS
}
--build-arg
${
arg
}
"
;
done
# Build Docker image
# shellcheck disable=SC2086
docker build
\
${
BUILD_ARGS
}
\
--pull
\
--tag
"
${
CODE_REGISTRY_IMAGE
}
/
${
IMAGE_NAME
}
:
${
CI_COMMIT_REF_SLUG
}
"
\
--file
"
${
DOCKERFILE
}
"
\
.
;
# Push image to internal registry
docker push
"
${
CODE_REGISTRY_IMAGE
}
/
${
IMAGE_NAME
}
:
${
CI_COMMIT_REF_SLUG
}
"
;
# Push latest tag
if
[[
${
CI_COMMIT_REF_SLUG
}
==
"master"
||
${
CI_COMMIT_REF_SLUG
}
==
"production"
||
-n
"
${
CI_COMMIT_TAG
}
"
]]
;
then
docker tag
\
"
${
CODE_REGISTRY_IMAGE
}
/
${
IMAGE_NAME
}
:
${
CI_COMMIT_REF_SLUG
}
"
\
"
${
CODE_REGISTRY_IMAGE
}
/
${
IMAGE_NAME
}
:latest"
;
docker push
"
${
CODE_REGISTRY_IMAGE
}
/
${
IMAGE_NAME
}
:latest"
;
fi
# Push specific tag
if
[[
-n
"
${
CI_COMMIT_TAG
}
"
]]
;
then
docker tag
\
"
${
CODE_REGISTRY_IMAGE
}
/
${
IMAGE_NAME
}
:latest"
\
"
${
CODE_REGISTRY_IMAGE
}
/
${
IMAGE_NAME
}
:
${
CI_COMMIT_TAG
}
"
;
docker push
"
${
CODE_REGISTRY_IMAGE
}
/
${
IMAGE_NAME
}
:
${
CI_COMMIT_TAG
}
"
;
fi
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