Skip to content

Commit

Permalink
Dat 13175 (#138)
Browse files Browse the repository at this point in the history
* DAT-13175

* chore(release-drafter.yml): update Full Changelog link to include version prefix for better readability

feat(extension-attach-artifact-release.yml): set draft release title to include the artifact id and version for better clarity and organization

* fix(extension-attach-artifact-release.yml): update release title to use the version number from Maven

The release title was previously set to "Support for Liquibase ${{ github.event.repository.name }} Extension v${{ env.artifact_id }}". This commit updates the release title to use the version number obtained from Maven. The version number is retrieved using the command "mvn help:evaluate -Dexpression=project.version -q -DforceStdout". The new release title format is "v$version", where $version is the version number obtained from Maven.

* feat: add automated release workflow for OS extensions

This commit adds a new workflow file `os-extension-automated-release.yml` that automates the release process for OS extensions. The workflow is triggered by a workflow call and requires two inputs: `version` (the version to release) and `repositories` (a comma-separated list of repositories).

The workflow consists of several jobs:

1. `check-security-vulnerabilities`: This job checks for open Dependabot security alerts in the specified repositories. It loops through each repository, checks for open alerts, and sets a flag if any security vulnerabilities are found. If security vulnerabilities are found, the job prints an error message and exits with an error code.

2. `run-liquibase-dependabot`: This job installs the Dependabot CLI and runs Dependabot to check for and update dependencies in the Liquibase/Liquibase repository.

3. `release-draft-releases`: This job checks for draft releases in the specified repositories. If draft releases are found, it checks if they contain the specified version to release. If the version is found, it publishes the draft release as the latest release.

4. `create-and-close-nexus-stagging`: This job pauses the workflow for 60 seconds to allow time for Sonatype Nexus staging repositories to be ready. It then uses the Sonatype Nexus API to retrieve information about staging repositories and extracts the IDs of repositories containing the string "liquibase." For each repository, it checks if it is an extension by examining its relative path. If an extension is detected, the repository is closed using the Sonatype Nexus API.

The purpose of this workflow is to automate the release process for OS extensions, including checking for security vulnerabilities, updating dependencies, publishing draft releases, and closing Nexus staging repositories for extensions.

Note: The release step in the `create-and-close-nexus-stagging` job is currently commented out for safety.

* chore(os-extension-automated-release.yml): update description for repositories input parameter to clarify its purpose

* fix(os-extension-automated-release.yml): add support for archiving published_drafts.txt and closed_nexus_repos.txt files to preserve release information
feat(os-extension-automated-release.yml): add logic to store the name and version of published drafts in published_drafts.txt file
feat(os-extension-automated-release.yml): add logic to store the name and path of closed Nexus repositories in closed_nexus_repos.txt file

* fix(os-extension-automated-release.yml): remove verbose flag from curl command to reduce output noise

* fix(os-extension-automated-release.yml): change curl command to use silent mode (-s) to reduce output noise
feat(os-extension-automated-release.yml): retrieve relative path of closed repository and store it in a file for reference

* chore(os-extension-automated-release.yml): update dependabot command to run on multiple repositories

fix(.DS_Store): delete .DS_Store file

* chore(os-extension-automated-release.yml): update job name to accurately reflect the repositories being targeted by dependabot

* fix(os-extension-automated-release.yml): fix typo in comment
feat(os-extension-automated-release.yml): add update-pom job to update pom.xml with specified version

* chore(os-extension-automated-release.yml): update default value of repositories input to be a JSON array instead of a comma separated string to improve readability and maintainability

* fix(os-extension-automated-release.yml): remove unnecessary loop and fix variable references
feat(os-extension-automated-release.yml): add support for matrix strategy to run jobs for multiple repositories
refactor(os-extension-automated-release.yml): simplify code by removing unnecessary loop and fix variable references
refactor(os-extension-automated-release.yml): improve code readability by removing unnecessary loop and fix variable references
fix(os-extension-automated-release.yml): fix typo in comment
fix(os-extension-automated-release.yml): fix typo in comment and remove unnecessary loop
fix(os-extension-automated-release.yml): fix typo in comment and simplify code by removing unnecessary loop
fix(os-extension-automated-release.yml): fix typo in comment and improve code readability by removing unnecessary loop
fix(os-extension-automated-release.yml): fix typo in comment and improve code readability by removing unnecessary loop and fix variable references
fix(os-extension-automated-release.yml): fix typo in comment and improve code readability by removing unnecessary loop, fix variable references, and remove unnecessary steps

* fix(os-extension-automated-release.yml): rename step name from "Check Security Vulnerabilities" to "Security" for clarity
fix(os-extension-automated-release.yml): rename step name from "Dependabot" to "Update pom.xml" for clarity
fix(os-extension-automated-release.yml): rename step name from "Release Draft" to "Nexus" for clarity

* chore(os-extension-automated-release.yml): add steps to set up Git and checkout repository to improve workflow reliability
chore(os-extension-automated-release.yml): remove redundant git config commands from Update pom.xml step

* chore(os-extension-automated-release.yml): remove unnecessary step to clone repository
chore(os-extension-automated-release.yml): remove unused git clone command to improve workflow efficiency

* fix(os-extension-automated-release.yml): remove unnecessary 'cd' command to improve script efficiency

* chore(os-extension-automated-release.yml): update pom.xml with the specified version using sed command
fix(os-extension-automated-release.yml): set GH_TOKEN environment variable to the value of BOT_TOKEN secret for updating pom.xml

* fix(workflows): unset extraheader configuration for GitHub repository to fix authentication issue
fix(workflows): set up Git user email and name to use "liquibot" for automated releases

* fix(os-extension-automated-release.yml): fix indentation and remove unnecessary empty line
fix(os-extension-automated-release.yml): fix token variable indentation and remove unnecessary whitespace
fix(os-extension-automated-release.yml): set remote URL with token for authentication

* chore(os-extension-automated-release.yml): add a 2-minute sleep before checking for artifacts in draft releases to allow time for the release to be published

* chore(extension-attach-artifact-release.yml): remove unnecessary condition for running the job

* chore(os-extension-automated-release.yml): update liquibase.version and project version to ${{ inputs.version }} to reflect changes in the project

* chore(os-extension-automated-release.yml): increase sleep time to 180 seconds to allow more time for artifact to be published in draft releases
feat(os-extension-automated-release.yml): add maven settings for liquibase and liquibase-pro repositories to enable fetching dependencies from them

* chore(os-extension-automated-release.yml): reduce sleep time from 180 seconds to 120 seconds for checking artifact in draft releases to improve workflow efficiency

* add module docs

* chore(extension-release-published.yml): remove unnecessary 'needs' field in the 'maven-release' job
chore(extension-release-published.yml): add 'needs' field in the 'release' job to ensure it runs after the 'maven-release' job
  • Loading branch information
jandroav authored Dec 14, 2023
1 parent 3e9b4ea commit 5ce81dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/extension-release-published.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ on:

jobs:
maven-release:
needs: release
uses: liquibase/build-logic/.github/workflows/extension-release-prepare.yml@v0.5.9
secrets: inherit
with:
extraCommand: ${{ inputs.extraCommand }}

release:
runs-on: ubuntu-latest
needs: maven-release
steps:
- uses: actions/checkout@v4

Expand Down

0 comments on commit 5ce81dc

Please sign in to comment.