From 8889d6a4a66527d5ae63686630d4130367bfa99a Mon Sep 17 00:00:00 2001 From: Hauwa Muhammad Date: Fri, 23 Feb 2024 11:20:37 +0000 Subject: [PATCH 1/3] Added bundle_and_release.yml to push redirect removed raat-redirect added raat-redirect --- .github/workflows/bundle_and_release.yml | 28 ++++++++++++++++++++++++ raat-redirect/buildpack.yml | 3 +++ raat-redirect/index.html | 15 +++++++++++++ raat-redirect/manifest.yml | 8 +++++++ raat-redirect/nginx.conf | 18 +++++++++++++++ 5 files changed, 72 insertions(+) create mode 100644 .github/workflows/bundle_and_release.yml create mode 100644 raat-redirect/buildpack.yml create mode 100644 raat-redirect/index.html create mode 100644 raat-redirect/manifest.yml create mode 100644 raat-redirect/nginx.conf diff --git a/.github/workflows/bundle_and_release.yml b/.github/workflows/bundle_and_release.yml new file mode 100644 index 0000000..15096a7 --- /dev/null +++ b/.github/workflows/bundle_and_release.yml @@ -0,0 +1,28 @@ +name: release-re-request-an-aws-account + +on: + push: + branches: [ main ] + + workflow_dispatch: +jobs: + build-release: + runs-on: ubuntu-latest + environment: production + steps: + - uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 + - name: add-cloudfoundry-repository + run: | + wget -q -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo apt-key add - + echo "deb https://packages.cloudfoundry.org/debian stable main" | sudo tee /etc/apt/sources.list.d/cloudfoundry-cli.list + + + - name: deploy-redirect + env: + CF_USERNAME: ${{ secrets.CF_EMAIL }} + CF_PASSWORD: ${{ secrets.CF_PASSWORD }} + run: | + cf api https://api.cloud.service.gov.uk + cf auth + cf target -o gds-tech-ops -s re-aws-account-management + cf push -f ./raat-redirect/manifest.yml --strategy rolling diff --git a/raat-redirect/buildpack.yml b/raat-redirect/buildpack.yml new file mode 100644 index 0000000..6e36696 --- /dev/null +++ b/raat-redirect/buildpack.yml @@ -0,0 +1,3 @@ +--- +nginx: + version: mainline \ No newline at end of file diff --git a/raat-redirect/index.html b/raat-redirect/index.html new file mode 100644 index 0000000..5738cb4 --- /dev/null +++ b/raat-redirect/index.html @@ -0,0 +1,15 @@ + + + + + + This site has moved + + + + +
+

This site has moved to https://request-an-aws-account.gds-reliability.engineering

+
+ + \ No newline at end of file diff --git a/raat-redirect/manifest.yml b/raat-redirect/manifest.yml new file mode 100644 index 0000000..b95f178 --- /dev/null +++ b/raat-redirect/manifest.yml @@ -0,0 +1,8 @@ +--- +applications: +- name: gds-request-an-aws-account-redirect + memory: 128M + instances: 1 + path: . + + \ No newline at end of file diff --git a/raat-redirect/nginx.conf b/raat-redirect/nginx.conf new file mode 100644 index 0000000..64d3896 --- /dev/null +++ b/raat-redirect/nginx.conf @@ -0,0 +1,18 @@ +worker_processes 1; +daemon off; + +error_log stderr; + +events { + worker_connections 1024; +} + +http { + server { + listen {{port}}; + server_name localhost; + + # Redirect all traffic to the new URL + return 301 https://request-an-aws-account.gds-reliability.engineering$request_uri; + } +} From dc7e454cd0cd0bff66e19304b7f991c385bd2085 Mon Sep 17 00:00:00 2001 From: Hauwa Muhammad Date: Fri, 23 Feb 2024 13:27:01 +0000 Subject: [PATCH 2/3] Added raat-redirect to dockerignore file --- .dockerignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.dockerignore b/.dockerignore index 9426340..4a0352b 100644 --- a/.dockerignore +++ b/.dockerignore @@ -13,6 +13,7 @@ vendor/* #ignore these files/directories +raat-redirect .DS_Store .git .github @@ -26,4 +27,4 @@ README.md .env.example manifest.yml test -Dockerfile \ No newline at end of file +Dockerfile From 34402a090a95b319b0f45ae05e5f90e27b52b8c2 Mon Sep 17 00:00:00 2001 From: Corin Wilkins <1826895+CorinWilkins@users.noreply.github.com> Date: Fri, 23 Feb 2024 13:30:07 +0000 Subject: [PATCH 3/3] Renames redirect deployer workflow. --- .../{bundle_and_release.yml => deploy-redirect-to-paas.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{bundle_and_release.yml => deploy-redirect-to-paas.yml} (95%) diff --git a/.github/workflows/bundle_and_release.yml b/.github/workflows/deploy-redirect-to-paas.yml similarity index 95% rename from .github/workflows/bundle_and_release.yml rename to .github/workflows/deploy-redirect-to-paas.yml index 15096a7..4c3235e 100644 --- a/.github/workflows/bundle_and_release.yml +++ b/.github/workflows/deploy-redirect-to-paas.yml @@ -1,4 +1,4 @@ -name: release-re-request-an-aws-account +name: deploy-redirect-to-paas on: push: