Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds phases folder and build commands required for latest version of … #3

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .copilot/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
repository: orp
builder:
name: paketobuildpacks/builder-jammy-full
version: 0.3.339
name: paketobuildpacks/builder-jammy-base
version: 0.4.240
packages:
- libpq-dev
- libsqlite3-dev
Empty file modified .copilot/image_build_run.sh
100644 → 100755
Empty file.
6 changes: 6 additions & 0 deletions .copilot/phases/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

# Exit early if something goes wrong
set -e

# Add commands below to run as part of the build phase
6 changes: 6 additions & 0 deletions .copilot/phases/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

# Exit early if something goes wrong
set -e

# Add commands below to run as part of the install phase
6 changes: 6 additions & 0 deletions .copilot/phases/post_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

# Exit early if something goes wrong
set -e

# Add commands below to run as part of the post_build phase
23 changes: 23 additions & 0 deletions .copilot/phases/pre_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash

# Exit early if something goes wrong
set -e

if [ -f "./.gitmodules" ]; then
echo ".gitmodules file exists. Modifying URLs..."
account_id=$(echo $CODESTAR_CONNECTION_ARN | cut -d':' -f5)
connection_id=$(echo $CODESTAR_CONNECTION_ARN | cut -d'/' -f2)
git_clone_base_url="https://codestar-connections.eu-west-2.amazonaws.com/git-http/$account_id/eu-west-2/$connection_id/uktrade"

git config --global credential.helper '!aws codecommit credential-helper $@'
git config --global credential.UseHttpPath true

sed -i "s|url = [email protected]:uktrade/\(.*\).git|url = $git_clone_base_url/\1.git|g" ./.gitmodules

git submodule update --init --remote --recursive

else
echo ".gitmodules file does not exist. No URLs to update."
fi

# Add commands below to run as part of the pre_build phase
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ ENV/
env.bak/
venv.bak/

# direnv
.envrc

# mkdocs documentation
/site

Expand Down