diff --git a/images/php/Dockerfile.cli b/images/php/Dockerfile.cli index e6ebdc86..e32ff184 100644 --- a/images/php/Dockerfile.cli +++ b/images/php/Dockerfile.cli @@ -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 diff --git a/images/php/db-build.sh b/images/php/db-build.sh index 36220571..bf87b6af 100644 --- a/images/php/db-build.sh +++ b/images/php/db-build.sh @@ -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"