Skip to content

Commit

Permalink
Completed db build script
Browse files Browse the repository at this point in the history
  • Loading branch information
nicksantamaria committed Nov 22, 2023
1 parent 9f5c290 commit a6c74e1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 2 additions & 0 deletions images/php/Dockerfile.cli
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ RUN apk add --no-cache tzdata \
# mtk for dev db snapshots
COPY --from=mtk /usr/local/bin/mtk /usr/local/bin

# aws cli for pushing db snapshots to s3.
RUN apk add --no-cache aws-cli

ONBUILD ARG MTK_CONFIG=/bay/mtk/drupal.conf
ONBUILD ARG BAY_DISABLE_FUNCTIONS=phpinfo,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,system,exec,shell_exec,passthru,phpinfo,show_source,highlight_file,popen,fopen_with_path,dbmopen,dbase_open,filepro,filepro_rowcount,filepro_retrieve,posix_mkfifo
Expand Down
9 changes: 3 additions & 6 deletions images/php/db-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,15 @@ if [[ "${BASH_SOURCE[0]}" = "$0" ]]; then
info "triggering github actions db image workflow"
ESTUARY_URL="${ESTUARY_URL:-http://estuary.sdp-services:8080/v1/actions/trigger-db}"
ESTUARY_TOKEN_PATH="${ESTUARY_TOKEN_PATH:-/run/secrets/kubernetes.io/serviceaccount/token}"
BRANCH="${LAGOON_GIT_BRANCH:-develop}"
curl --location --request POST "${ESTUARY_URL}" \
--header "Authorization: Bearer $(cat "${ESTUARY_TOKEN_PATH}")" \
--header "Content-Type: application/json" \
--data-raw '{
"owner": "dpc-sdp",
"repo": "reference-sdp-vic-gov-au",
"workflow": "e2e.yaml",
"workflow": "db-trigger.yml",
"ref": "'"$BRANCH"'",
"be_url": "'"$BE_URL"'",
"fe_url": "'"$FE_URL"'",
"project": "'"$LAGOON_PROJECT"'",
"s3_uri": "'"$LAGOON_PROJECT"'"
"s3_uri": "'"$S3_OBJECT_PATH"'"
}' || fatal "failed to trigger db build action"

info "db snapshot trigger complete - please see the Actions tab on the github project for build logs"
Expand Down

0 comments on commit a6c74e1

Please sign in to comment.