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

DAT-15646




 Reusable Debian Package Creation Workflow Migration #51

Merged
merged 18 commits into from
Aug 11, 2023

Conversation

jandroav
Copy link
Contributor

https://datical.atlassian.net/browse/DAT-15646

feat(deb-packaging.yml): add new workflow for creating and uploading deb packages

  • The new deb-packaging.yml workflow is added to the .github/workflows directory.
  • The workflow is triggered by a repository_dispatch event with the liquibase-release type, or manually through the GitHub Actions workflow dispatch.
  • The workflow accepts inputs for groupId, artifactId, and version from the user. These inputs are used to configure the Maven build.
  • The workflow runs on an Ubuntu 22.04 runner.
  • The necessary setup steps are performed, including checking out the repository, setting up Java 17, setting up Maven 3.9.2, and configuring AWS credentials.
  • The workflow downloads the release artifact specified by the artifactId and version inputs from the GitHub release page.
  • The Maven build is executed with the provided groupId, artifactId, and version inputs, skipping tests.
  • The deb-s3 gem is installed to enable uploading the deb package.
  • The deb package is uploaded to the repo.liquibase.com S3 bucket, preserving versions and signing with the specified GPG secret key.

feat(README.md): update table of reusable workflows

  • The deb-packaging.yml workflow is added to the table of reusable workflows in the README.md file.

feat(pom.xml): add universal pom for deb packaging

  • The pom.xml file is added to the repository.
  • The pom.xml file contains the necessary configuration for deb packaging.
  • It includes properties for the Maven Antrun Plugin and the jdeb plugin.
  • The Maven Antrun Plugin is configured to unpack the tar.gz artifact.
  • The jdeb plugin is configured to create the deb package with the specified control directory and data set.
  • A profile is added for remote repositories, which includes the Liquibase and Liquibase Pro repositories for CI environments.

jandroav added 2 commits August 10, 2023 13:52
…deb packages

- The new `deb-packaging.yml` workflow is added to the `.github/workflows` directory.
- The workflow is triggered by a `repository_dispatch` event with the `liquibase-release` type, or manually through the GitHub Actions workflow dispatch.
- The workflow accepts inputs for `groupId`, `artifactId`, and `version` from the user. These inputs are used to configure the Maven build.
- The workflow runs on an Ubuntu 22.04 runner.
- The necessary setup steps are performed, including checking out the repository, setting up Java 17, setting up Maven 3.9.2, and configuring AWS credentials.
- The workflow downloads the release artifact specified by the `artifactId` and `version` inputs from the GitHub release page.
- The Maven build is executed with the provided `groupId`, `artifactId`, and `version` inputs, skipping tests.
- The `deb-s3` gem is installed to enable uploading the deb package.
- The deb package is uploaded to the `repo.liquibase.com` S3 bucket, preserving versions and signing with the specified GPG secret key.

feat(README.md): update table of reusable workflows

- The `deb-packaging.yml` workflow is added to the table of reusable workflows in the README.md file.

feat(pom.xml): add universal pom for deb packaging

- The `pom.xml` file is added to the repository.
- The pom.xml file contains the necessary configuration for deb packaging.
- It includes properties for the Maven Antrun Plugin and the jdeb plugin.
- The Maven Antrun Plugin is configured to unpack the tar.gz artifact.
- The jdeb plugin is configured to create the deb package with the specified control directory and data set.
- A profile is added for remote repositories, which includes the Liquibase and Liquibase Pro repositories for CI environments.
…iguration

The liquibase-pro repository was removed from the project configuration as it is no longer needed. This repository was previously used to fetch dependencies for the Liquibase Pro version, but it is no longer required for the current project setup.
@jandroav jandroav marked this pull request as draft August 10, 2023 11:55
… file for deb packaging

feat(deb-pom.xml): add pom.xml file for deb packaging with necessary plugins and configurations
@jandroav jandroav marked this pull request as ready for review August 10, 2023 14:16
jandroav added 15 commits August 11, 2023 08:45
…ckages

feat(package-deb.yml): add workflow for creating and uploading deb packages
feat(control): add control file for Liquibase Debian Installer
feat(postinst): add post-installation script for setting LIQUIBASE_HOME and PATH
feat(liquibase-env.sh): add environment script for setting LIQUIBASE_HOME and PATH
chore(package-deb.yml): rename workflow to "DEB packaging" for clarity
chore(package-deb.yml): update path to package-deb-pom.xml in the workflow
…ries

chore(package-deb.yml): remove unused maven-settings-xml-action step for configuring remote repositories
…ns from the pom.xml file

chore(package-deb-pom.xml): clean up formatting and indentation in the pom.xml file
…ommand to build the deb package without downloading dependencies from remote repositories

fix(package-deb.yml): specify the local repository path using the -Dmaven.repo.local flag to ensure the deb package is built using the correct dependencies
…ommand

The -o flag is not needed in the mvn package command as it is not providing any additional functionality. Removing it to simplify the command.
…om mvn package command

fix(package-deb.yml): remove installation of deb-s3 gem as it is not needed
…ebugging purposes

chore(package-deb.yml): install deb-s3 gem as part of the workflow setup
…ian package

- Add `package-deb-pom.xml` file to define the Maven build configuration for creating a Debian package
- Update `.github/workflows/package-deb.yml` to download the necessary control files and build the Debian package using Maven
- Modify the Maven command in the workflow to include the `clean` goal before packaging the application

This change allows the application to be packaged as a Debian package, making it easier to distribute and install on Debian-based systems.
…tting reusable Maven files

fix(package-deb.yml): update file paths to use absolute paths for consistency and to avoid potential issues with relative paths
fix(package-deb.yml): update file path in the download step to use absolute path for consistency and to avoid potential issues with relative paths
…n steps in the workflow

docs(README.md): add explanation of inputs for package-deb.yml workflow
@jandroav jandroav merged commit 1e9a378 into main Aug 11, 2023
@jandroav jandroav deleted the DAT-15646 branch August 11, 2023 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant