-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
New image builds off public image but adds real data and report templates Closes: #246
- Loading branch information
1 parent
39963af
commit e0e9d57
Showing
2 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM ghcr.io/rmi-pacta/workflow.transition.monitor:main | ||
|
||
COPY pacta-data "/pacta-data" | ||
|
||
COPY "templates.transition.monitor" "/templates.transition.monitor" | ||
# | ||
# set permissions for PACTA repos that need local content | ||
RUN chmod -R a+rwX "/pacta-data" && \ | ||
chmod -R a+rwX "/templates.transition.monitor" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#! /bin/sh | ||
|
||
# This script uses hardcoded parameters to define the versions for pacta data | ||
# and templates.transition.monitor. make changes to this script and commit | ||
# prior to running, so that the SHA tag that is pushed to registry is capable | ||
# of tracking the inputs. | ||
if [ -z "$(git status --porcelain)" ]; then | ||
echo "Git status is clean. Proceeding." | ||
else | ||
echo "Commit changes to this script prior to running." | ||
exit 1 | ||
fi | ||
|
||
#requires being logged in to az | ||
az acr login --name transitionmonitordockerregistry | ||
|
||
pacta_data_share_url="https://pactadatadev.file.core.windows.net/workflow-data-preparation-outputs" | ||
pacta_data_share_path="2023Q4_20240218T231047Z" | ||
|
||
templates_remote="[email protected]:RMI-PACTA/templates.transition.monitor.git" | ||
templates_branch="main" | ||
|
||
registry="transitionmonitordockerregistry.azurecr.io" | ||
remote_image="rmi_pacta_2023q4_pa2024ch" | ||
remote_tag="$(git rev-parse HEAD)" | ||
|
||
dir_temp="$(mktemp -d)" | ||
echo "$dir_temp" | ||
|
||
docker_image="rmi_pacta_private" | ||
tag="latest" | ||
local_tag="$docker_image":"$tag" | ||
|
||
git clone -b "$templates_branch" "$templates_remote" --depth 1 "$dir_temp/templates.transition.monitor"|| exit 2 | ||
|
||
# exclude sqlite files from download | ||
az storage copy -s "$pacta_data_share_url"/"$pacta_data_share_path" -d "$dir_temp/pacta-data" --recursive --exclude-pattern "*.sqlite" | ||
|
||
docker build -f Dockerfile.private -t "$local_tag" "$dir_temp" | ||
|
||
new_tag="$registry"/"$remote_image":"$remote_tag" | ||
|
||
echo "Tagging $local_tag as $new_tag" | ||
docker tag "$local_tag" "$new_tag" | ||
|
||
docker push "$new_tag" | ||
|
||
remote_tag="latest" | ||
new_tag="$registry"/"$remote_image":"$remote_tag" | ||
echo "Tagging $local_tag as $new_tag" | ||
docker tag "$local_tag" "$new_tag" | ||
docker push "$new_tag" | ||
|
||
echo "Docker images uploaded to $registry" |