Skip to content

Commit

Permalink
DAT-16080 DevOps :: Extension Nightly Builds Failing (#100)
Browse files Browse the repository at this point in the history
* chore(workflows): update Maven version to 3.9.5 in OS extension test, package-deb, pro-extension-test, and sonar-test-scan workflows

The Maven version used in the workflows was updated from 3.9.2 to 3.9.5. This update ensures that the latest version of Maven is used for building and packaging the project. The new version may include bug fixes, performance improvements, and new features, providing a more reliable and efficient build process.

* chore(os-extension-test.yml): add maven settings for liquibase repositories and servers

The maven-settings-xml-action is added to the workflow to configure the repositories and servers for liquibase dependencies. This allows the workflow to look for dependencies in the liquibase and liquibase-pro repositories hosted on GitHub Maven Package Registry. The repositories are enabled for both releases and snapshots, with the update policy set to always. The servers are configured with the necessary credentials for authentication. This change ensures that the workflow can successfully resolve and download the liquibase dependencies when building the project.

* chore(os-extension-test.yml): remove redundant maven-settings-xml-action step

The maven-settings-xml-action step was removed as it was redundant and not necessary for the workflow.

* chore(os-extension-test.yml): remove unnecessary artifact download step

The artifact download step was removed as it is no longer needed for the test job.

* feat(workflows): add step to download artifacts from previous build to be used in subsequent steps

The previous build artifacts are downloaded using the `actions/download-artifact@v3` action. The downloaded artifacts are stored in the `./target` directory. This step is added to ensure that the artifacts from the previous build are available for use in subsequent steps.

* fix(pro-extension-test.yml): fix build and package step to use the correct liquibase version
feat(pro-extension-test.yml): add support for building and packaging the latest liquibase version when running nightly build

* fix(workflows): update liquibase build and package steps in os-extension-test.yml
feat(workflows): add setup for Vault token in pro-extension-test.yml

The changes in `os-extension-test.yml` include:
- Renaming the step "Set latest liquibase version" to "Build and Package latest liquibase version"
- Updating the command in the "Build and Package latest liquibase version" step to include dependency resolution and packaging with the `master-SNAPSHOT` version of Liquibase
- Adding a new step "Build and Package" for non-nightly builds, which includes dependency resolution and packaging with the `master-SNAPSHOT` version of Liquibase

The changes in `pro-extension-test.yml` include:
- Adding a new step "Setup Vault token" to set up the Vault token for accessing Vault resources
- Configuring the Vault token setup step with the necessary environment variables and secrets

These changes improve the build and package process for Liquibase and add support for setting up the Vault token for accessing Vault resources in the Pro extension test workflow.

* chore(pro-extension-test.yml): remove setup Vault token step

The setup Vault token step was removed from the workflow as it is no longer needed for the test process.

* chore(create-release.yml): update sonar-push.yml version to v0.5.1 for better compatibility and bug fixes
chore(extension-attach-artifact-release.yml): update get_draft_release.sh, sign_artifact.sh, and upload_asset.sh versions to v0.5.1 for better compatibility and bug fixes
chore(extension-release-prepare.yml): update extension-release-rollback.yml version to v0.5.1 for better compatibility and bug fixes
chore(extension-release-published.yml): update extension-release-prepare.yml version to v0.5.1 for better compatibility and bug fixes
chore(os-extension-test.yml): update sonar-pull-request.yml version to v0.5.1 for better compatibility and bug fixes
chore(package-deb.yml): update package-deb-pom.xml and control files versions to v0.5.1 for better compatibility and bug fixes
chore(pom-release-published.yml): update extension-release-prepare.yml version to v0.5.1 for better compatibility and bug fixes
chore(pro-extension-test.yml): update sonar-pull-request.yml version to v0.5.1 for better compatibility and bug fixes
  • Loading branch information
jandroav authored Oct 19, 2023
1 parent f3f12e1 commit f66d068
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
sonar:
uses: liquibase/build-logic/.github/workflows/[email protected].0
uses: liquibase/build-logic/.github/workflows/[email protected].1
secrets: inherit

create-release:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/extension-attach-artifact-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ jobs:

- name: Get Reusable Script Files
run: |
curl -o $PWD/.github/get_draft_release.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.5.0/.github/get_draft_release.sh
curl -o $PWD/.github/sign_artifact.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.5.0/.github/sign_artifact.sh
curl -o $PWD/.github/upload_asset.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.5.0/.github/upload_asset.sh
curl -o $PWD/.github/get_draft_release.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.5.1/.github/get_draft_release.sh
curl -o $PWD/.github/sign_artifact.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.5.1/.github/sign_artifact.sh
curl -o $PWD/.github/upload_asset.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.5.1/.github/upload_asset.sh
chmod +x $PWD/.github/get_draft_release.sh
chmod +x $PWD/.github/sign_artifact.sh
chmod +x $PWD/.github/upload_asset.sh
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
- name: Get upload_zip.sh Script File
if: inputs.zip == 'true'
run: |
curl -o $PWD/.github/upload_zip.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.5.0/.github/upload_zip.sh
curl -o $PWD/.github/upload_zip.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.5.1/.github/upload_zip.sh
chmod +x $PWD/.github/upload_zip.sh
- name: Attach Zip File to Draft Release
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/extension-release-prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ jobs:
release-rollback:
needs: prepare-release
if: ${{ always() && contains(needs.*.result, 'failure') }}
uses: liquibase/build-logic/.github/workflows/[email protected].0
uses: liquibase/build-logic/.github/workflows/[email protected].1
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/extension-release-published.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ jobs:
maven-release:
needs: release
uses: liquibase/build-logic/.github/workflows/[email protected].0
uses: liquibase/build-logic/.github/workflows/[email protected].1
secrets: inherit
23 changes: 20 additions & 3 deletions .github/workflows/os-extension-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ on:
default: false
type: boolean

env:
MAVEN_VERSION: '3.9.5'

jobs:
build:
name: Build & Package
Expand All @@ -33,9 +36,18 @@ jobs:
distribution: 'temurin'
cache: 'maven'

- name: Set latest liquibase version
- name: Set up Maven
uses: stCarolas/[email protected]
with:
maven-version: ${{ env.MAVEN_VERSION }}

- name: Build and Package latest liquibase version
if: ${{ inputs.nightly }}
run: mvn versions:set-property -Dproperty=liquibase.version -DnewVersion=master-SNAPSHOT
run: mvn -B dependency:go-offline clean package -DskipTests=true -Dliquibase.version=master-SNAPSHOT

- name: Build and Package
if: ${{ !inputs.nightly }}
run: mvn -B dependency:go-offline clean package -DskipTests=true -Dliquibase.version=master-SNAPSHOT

- name: Build and Package
run: mvn -B dependency:go-offline clean package -DskipTests=true
Expand Down Expand Up @@ -78,6 +90,11 @@ jobs:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: 'maven'

- name: Set up Maven
uses: stCarolas/[email protected]
with:
maven-version: ${{ env.MAVEN_VERSION }}

- uses: actions/download-artifact@v3
with:
Expand All @@ -98,5 +115,5 @@ jobs:
sonar-pr:
needs: [ unit-test ]
uses: liquibase/build-logic/.github/workflows/[email protected].0
uses: liquibase/build-logic/.github/workflows/[email protected].1
secrets: inherit
10 changes: 5 additions & 5 deletions .github/workflows/package-deb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ on:


env:
MAVEN_VERSION: '3.9.2'
MAVEN_VERSION: '3.9.5'

jobs:

Expand All @@ -54,10 +54,10 @@ jobs:
# Under the src folder is where specific packages files live. The GitHub action inputs will modify the universal package-deb-pom.xml to tell the process which assets to use during the packaging step
mkdir -p $PWD/.github/src/${{ inputs.artifactId }}/deb/control
mkdir -p $PWD/.github/src/${{ inputs.artifactId }}/main/archive
curl -o $PWD/.github/src/${{ inputs.artifactId }}/deb/control/control https://raw.githubusercontent.com/liquibase/build-logic/v0.5.0/src/${{ inputs.artifactId }}/deb/control/control
curl -o $PWD/.github/src/${{ inputs.artifactId }}/deb/control/postinst https://raw.githubusercontent.com/liquibase/build-logic/v0.5.0/src/${{ inputs.artifactId }}/deb/control/postinst
curl -o $PWD/.github/src/${{ inputs.artifactId }}/main/archive/${{ inputs.artifactId }}-env.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.5.0/src/${{ inputs.artifactId }}/main/archive/${{ inputs.artifactId }}-env.sh
curl -o $PWD/.github/package-deb-pom.xml https://raw.githubusercontent.com/liquibase/build-logic/v0.5.0/.github/package-deb-pom.xml
curl -o $PWD/.github/src/${{ inputs.artifactId }}/deb/control/control https://raw.githubusercontent.com/liquibase/build-logic/v0.5.1/src/${{ inputs.artifactId }}/deb/control/control
curl -o $PWD/.github/src/${{ inputs.artifactId }}/deb/control/postinst https://raw.githubusercontent.com/liquibase/build-logic/v0.5.1/src/${{ inputs.artifactId }}/deb/control/postinst
curl -o $PWD/.github/src/${{ inputs.artifactId }}/main/archive/${{ inputs.artifactId }}-env.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.5.1/src/${{ inputs.artifactId }}/main/archive/${{ inputs.artifactId }}-env.sh
curl -o $PWD/.github/package-deb-pom.xml https://raw.githubusercontent.com/liquibase/build-logic/v0.5.1/.github/package-deb-pom.xml
- name: Set up Maven
uses: stCarolas/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pom-release-published.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ jobs:
maven-release:
needs: release
uses: liquibase/build-logic/.github/workflows/[email protected].0
uses: liquibase/build-logic/.github/workflows/[email protected].1
secrets: inherit
20 changes: 16 additions & 4 deletions .github/workflows/pro-extension-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ env:
AWS_ACCESS_KEY_ID: ${{ secrets.GHA_AWS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.GHA_AWS_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAVEN_VERSION: '3.9.5'

jobs:
build:
Expand All @@ -53,6 +54,11 @@ jobs:
distribution: 'temurin'
cache: 'maven'

- name: Set up Maven
uses: stCarolas/[email protected]
with:
maven-version: ${{ env.MAVEN_VERSION }}

# look for dependencies in maven
- name: maven-settings-xml-action
uses: whelk-io/maven-settings-xml-action@v20
Expand Down Expand Up @@ -96,12 +102,13 @@ jobs:
}
]
- name: Set latest liquibase version
- name: Build and Package latest liquibase version
if: ${{ inputs.nightly }}
run: mvn versions:set-property -Dproperty=liquibase.version -DnewVersion=master-SNAPSHOT
run: mvn -B dependency:go-offline clean package -DskipTests=true -Dliquibase.version=master-SNAPSHOT

- name: Build and Package
run: mvn -B dependency:go-offline clean package -DskipTests=true
if: ${{ !inputs.nightly }}
run: mvn -B dependency:go-offline clean package -DskipTests=true -Dliquibase.version=master-SNAPSHOT

- name: Get Artifact ID
id: get-artifact-id
Expand Down Expand Up @@ -142,6 +149,11 @@ jobs:
distribution: 'temurin'
cache: 'maven'

- name: Set up Maven
uses: stCarolas/[email protected]
with:
maven-version: ${{ env.MAVEN_VERSION }}

# look for dependencies in maven
- name: maven-settings-xml-action
uses: whelk-io/maven-settings-xml-action@v20
Expand Down Expand Up @@ -204,5 +216,5 @@ jobs:
sonar-pr:
needs: [ unit-test ]
uses: liquibase/build-logic/.github/workflows/[email protected].0
uses: liquibase/build-logic/.github/workflows/[email protected].1
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/sonar-test-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ on:
default: mysql

env:
MAVEN_VERSION: '3.8.7'
MAVEN_VERSION: '3.9.5'

jobs:
sonar-scan:
Expand Down

0 comments on commit f66d068

Please sign in to comment.