diff --git a/.github/actions/setup-project/action.yml b/.github/actions/setup-project/action.yml index 7399461b4..de142ed6c 100644 --- a/.github/actions/setup-project/action.yml +++ b/.github/actions/setup-project/action.yml @@ -9,10 +9,10 @@ runs: sudo apt-get update \ && sudo apt-get install -y --no-install-recommends \ libcurl4-openssl-dev - - name: Set up Python 3.12.7 + - name: Set up Python 3.12.9 uses: actions/setup-python@v4 with: - python-version: "3.12.7" + python-version: "3.12.9" - name: Install poetry shell: bash run: pip install poetry==2.1.3 diff --git a/.github/workflows/drift.yml b/.github/workflows/drift.yml index 62fa1b3c7..0366a4e16 100644 --- a/.github/workflows/drift.yml +++ b/.github/workflows/drift.yml @@ -24,14 +24,26 @@ jobs: terraform_wrapper: false - name: Check for drift - uses: dflook/terraform-check@v1 env: AWS_ACCESS_KEY_ID: ${{ secrets.TERRAFORM_STATE_ACCESS_KEY }} AWS_SECRET_ACCESS_KEY: ${{ secrets.TERRAFORM_STATE_SECRET_ACCESS_KEY }} TF_VAR_cf_user: ${{ secrets.CLOUDGOV_USERNAME }} TF_VAR_cf_password: ${{ secrets.CLOUDGOV_PASSWORD }} - with: - path: terraform/staging + run: | + cd terraform/staging + terraform init + terraform plan -detailed-exitcode + exit_code=$? + if [ $exit_code -eq 0 ]; then + echo "No changes detected. Intrastructure is up-to-date." + elif [ $exit_code -eq 2 ]; then + echo "Changes detected. Infrastructure drift found." + exit 1 + else + echo "Error running terraform plan." + exit $exit_code + fi + check_demo_drift: runs-on: ubuntu-latest @@ -52,14 +64,25 @@ jobs: terraform_wrapper: false - name: Check for drift - uses: dflook/terraform-check@v1 env: AWS_ACCESS_KEY_ID: ${{ secrets.TERRAFORM_STATE_ACCESS_KEY }} AWS_SECRET_ACCESS_KEY: ${{ secrets.TERRAFORM_STATE_SECRET_ACCESS_KEY }} TF_VAR_cf_user: ${{ secrets.CLOUDGOV_USERNAME }} TF_VAR_cf_password: ${{ secrets.CLOUDGOV_PASSWORD }} - with: - path: terraform/demo + run: | + cd terraform/demo + terraform init + terraform plan -detailed-exitcode + exit_code=$? + if [ $exit_code -eq 0 ]; then + echo "No changes detected. Intrastructure is up-to-date." + elif [ $exit_code -eq 2 ]; then + echo "Changes detected. Infrastructure drift found." + exit 1 + else + echo "Error running terraform plan." + exit $exit_code + fi check_prod_drift: runs-on: ubuntu-latest @@ -80,11 +103,22 @@ jobs: terraform_wrapper: false - name: Check for drift - uses: dflook/terraform-check@v1 env: AWS_ACCESS_KEY_ID: ${{ secrets.TERRAFORM_STATE_ACCESS_KEY }} AWS_SECRET_ACCESS_KEY: ${{ secrets.TERRAFORM_STATE_SECRET_ACCESS_KEY }} TF_VAR_cf_user: ${{ secrets.CLOUDGOV_USERNAME }} TF_VAR_cf_password: ${{ secrets.CLOUDGOV_PASSWORD }} - with: - path: terraform/production + run: | + cd terraform/production + terraform init + terraform plan -detailed-exitcode + exit_code=$? + if [ $exit_code -eq 0 ]; then + echo "No changes detected. Intrastructure is up-to-date." + elif [ $exit_code -eq 2 ]; then + echo "Changes detected. Infrastructure drift found." + exit 1 + else + echo "Error running terraform plan." + exit $exit_code + fi diff --git a/README.md b/README.md index f90b921fa..b15c6c858 100644 --- a/README.md +++ b/README.md @@ -243,12 +243,12 @@ git clone git@github.com:GSA/notifications-admin.git Now go into the project directory (`notifications-admin` by default), create a virtual environment, and set the local Python version to point to the virtual -environment (assumes version Python `3.12.7` is what is installed on your +environment (assumes version Python `3.12.9` is what is installed on your machine): ```sh cd notifications-admin -pyenv virtualenv 3.12.7 notify-admin +pyenv virtualenv 3.12.9 notify-admin pyenv local notify-admin ``` @@ -299,7 +299,7 @@ environment with the newer version of Python you just installed: ```sh cd notifications-admin -pyenv virtualenv 3.12.7 notify-admin +pyenv virtualenv 3.12.9 notify-admin pyenv local notify-admin ``` diff --git a/app/assets/javascripts/collapsibleCheckboxes.js b/app/assets/javascripts/collapsibleCheckboxes.js index 696d7e1c1..f3c43abb7 100644 --- a/app/assets/javascripts/collapsibleCheckboxes.js +++ b/app/assets/javascripts/collapsibleCheckboxes.js @@ -63,7 +63,7 @@ const buttonContent = this.buttonContent[buttonState](this.fieldLabel); const stickyClass = expanded ? ' js-stick-at-bottom-when-scrolling' : ''; - return $(`