Skip to content

Commit

Permalink
removed old version mechanism from the workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
csaw-nhs committed Jun 7, 2024
1 parent ae29c3f commit 3aac866
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/cicd-2-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ jobs:
nodejs_version: ${{ steps.variables.outputs.nodejs_version }}
python_version: ${{ steps.variables.outputs.python_version }}
terraform_version: ${{ steps.variables.outputs.terraform_version }}
version: ${{ steps.variables.outputs.version }}
steps:
- name: "Checkout code"
uses: actions/checkout@v4
Expand All @@ -34,8 +33,6 @@ jobs:
echo "nodejs_version=$(grep "^nodejs" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
echo "python_version=$(grep "^nodejs" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
echo "terraform_version=$(grep "^terraform" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
# TODO: Get the version, but it may not be the .version file as this should come from the CI/CD Pull Request Workflow
echo "version=$(head -n 1 .version 2> /dev/null || echo unknown)" >> $GITHUB_OUTPUT
- name: "List variables"
run: |
export BUILD_DATETIME="${{ steps.variables.outputs.build_datetime }}"
Expand All @@ -44,14 +41,15 @@ jobs:
export NODEJS_VERSION="${{ steps.variables.outputs.nodejs_version }}"
export PYTHON_VERSION="${{ steps.variables.outputs.python_version }}"
export TERRAFORM_VERSION="${{ steps.variables.outputs.terraform_version }}"
export VERSION="${{ steps.variables.outputs.version }}"
make list-variables
publish:
name: "Publish packages"
runs-on: ubuntu-latest
needs: [metadata]
# if: github.event.pull_request.merged == true
timeout-minutes: 3
outputs:
version: ${{ steps.semantic.outputs.new_release_version }}
steps:
- name: "Checkout code"
uses: actions/checkout@v4
Expand All @@ -73,6 +71,8 @@ jobs:
echo ${{ steps.semantic.outputs.new_release_major_version }}
echo ${{ steps.semantic.outputs.new_release_minor_version }}
echo ${{ steps.semantic.outputs.new_release_patch_version }}
export VERSION="${{ steps.semantic.outputs.new_release_version }}"
make list-variables
success:
name: "Success notification"
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cicd-3-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
echo "python_version=$(grep "^nodejs" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
echo "terraform_version=$(grep "^terraform" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
# TODO: Get the version, but it may not be the .version file as this should come from the CI/CD Pull Request Workflow
echo "version=$(head -n 1 .version 2> /dev/null || echo unknown)" >> $GITHUB_OUTPUT
echo "version=${{ github.event.ref }}" >> $GITHUB_OUTPUT
echo "tag=${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT
- name: "List variables"
run: |
Expand Down
1 change: 0 additions & 1 deletion docs/adr/ADR-XXX_Agree_CICD_pipeline_structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ Requirements:
- Implement good CI/CD practices, such as:
- Setting the build time variables at the start of the process
- Storing the tooling versions like Terraform, Python and Node.js in the `./.tools-version` file
- Storing the software/project version in the `./VERSION` file
- Keeping the main workflow modular
- Ensuring a timeout is set for each job
- Listing environment variables
Expand Down

0 comments on commit 3aac866

Please sign in to comment.