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-16000



 liquibase-redshift using Liquibase Parent POM #174

Merged
merged 21 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
42cc2c4
add parent pom
Oct 13, 2023
f87ac7b
chore(test.yml): update GitHub Actions workflow to use latest version…
Oct 13, 2023
7bb64c7
chore(pom.xml): update liquibase-parent-pom version from 0.2.5-SNAPSH…
Oct 13, 2023
e86523b
chore(pom.xml): update liquibase-parent-pom version to 0.2.5-SNAPSHOT…
Oct 13, 2023
63d3c9f
chore(pom.xml): update liquibase-parent-pom version from 0.2.5-SNAPSH…
Oct 13, 2023
b965a44
chore(pom.xml): add jacoco-maven-plugin to generate code coverage rep…
Oct 13, 2023
0597a10
chore(test.yml): remove unused paths-ignore section to simplify the w…
Oct 13, 2023
3d164c0
chore(test.yml): remove unnecessary 'needs' key in the dependabot job…
Oct 13, 2023
4be7ad6
chore(test.yml): ignore unnecessary files in GitHub Actions workflow
Oct 13, 2023
980da6a
chore(test.yml): remove unused dependabot workflow
Oct 13, 2023
0e7f631
chore(test.yml): remove unnecessary paths-ignore section from the wor…
Oct 13, 2023
baf4b5b
chore(pom.xml): add maven-failsafe-plugin configuration to skip integ…
Oct 13, 2023
57aeb32
chore(pom.xml): update maven-failsafe-plugin configuration to include…
Oct 13, 2023
b877f5e
chore(pom.xml): add comment to indicate that the plugin will be clean…
Oct 13, 2023
e667888
chore(test.yml): update sonar-pull-request.yml workflow version to DA…
Oct 13, 2023
f0e40df
chore(test.yml): add comment for future reference about potential art…
Oct 13, 2023
d53d5bb
chore(test.yml): remove unnecessary comment and trailing whitespace
Oct 13, 2023
8048a4b
chore(workflows): update liquibase/build-logic workflows to v0.4.9
Oct 13, 2023
afe27ef
chore(dependabot): remove dependabot configuration file
Oct 16, 2023
6f6def1
chore(test.yml): add dependabot workflow to automatically merge depen…
Oct 16, 2023
6605516
fix(test.yml): update the 'needs' field in the dependabot job to 'uni…
Oct 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ updates:
schedule:
interval: daily
open-pull-requests-limit: 10
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: daily
3 changes: 3 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
template: |
## What’s Changed
$CHANGES
12 changes: 12 additions & 0 deletions .github/workflows/attach-artifact-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Attach Artifact to Release

on:
pull_request:
types:
- closed

jobs:
attach-artifact-to-release:
uses: liquibase/build-logic/.github/workflows/[email protected]
secrets: inherit

13 changes: 0 additions & 13 deletions .github/workflows/build-nightly.yml

This file was deleted.

50 changes: 0 additions & 50 deletions .github/workflows/ci-report.yml

This file was deleted.

87 changes: 7 additions & 80 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -1,85 +1,12 @@
name: Create Release

on:
repository_dispatch:
types: [liquibase-release]
workflow_dispatch:
inputs:
liquibaseVersion:
description: 'Liquibase Version'
required: true
extensionVersion:
description: 'Extension Version (Defaults to Liquibase Version)'
required: false
push:
branches:
- main

jobs:
setup:
name: Setup
runs-on: ubuntu-latest
outputs:
liquibaseVersion: ${{ steps.collect-data.outputs.liquibaseVersion }}
extensionVersion: ${{ steps.collect-data.outputs.extensionVersion }}
steps:
- name: Collect Data
id: collect-data
uses: actions/github-script@v4
with:
script: |
if (context.payload.client_payload) {
core.setOutput("liquibaseVersion", context.payload.client_payload.liquibaseVersion);
core.setOutput("extensionVersion", context.payload.client_payload.liquibaseVersion);
} else if (context.payload.inputs) {
core.setOutput("liquibaseVersion", context.payload.inputs.liquibaseVersion);
core.setOutput("extensionVersion", context.payload.inputs.extensionVersion || context.payload.inputs.liquibaseVersion);
} else {
core.setFailed('Unknown event type')
}

- run: |
echo "Saw Liquibase version ${{ steps.collect-data.outputs.liquibaseVersion }}"
echo "Saw Extension version ${{ steps.collect-data.outputs.extensionVersion }}"

create-release-artifacts:
name: "Create release artifacts"
runs-on: ubuntu-latest
needs: setup
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo

- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
gpg-private-key: ${{ secrets.GPG_SECRET }}
gpg-passphrase: GPG_PASSPHRASE
env:
GPG_PASSWORD: ${{ secrets.GPG_PASSPHRASE }}

- name: Download snapshot build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn -B liquibase-sdk:download-snapshot-artifacts -Dliquibase.sdk.repo=${{ github.repository }} -Dliquibase.sdk.branchSearch=master -Dliquibase.sdk.artifactPattern=liquibase-redshift-artifacts -Dliquibase.sdk.downloadDirectory=original-artifacts

- name: Re-version Artifacts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_PASSWORD: ${{ secrets.GPG_PASSPHRASE }}
run: |
(cd original-artifacts && unzip liquibase-redshift-artifacts.zip && rm liquibase-redshift-artifacts.zip)
mvn -B liquibase-sdk:create-release-artifacts -Dliquibase.sdk.repo=${{ github.repository }} -Dliquibase.sdk.inputDirectory=original-artifacts -Dliquibase.sdk.outputDirectory=final-artifacts -Dliquibase.sdk.newVersion=${{ needs.setup.outputs.extensionVersion }} -Dliquibase.sdk.gpgExecutable=/usr/bin/gpg -X
create-release:
uses: liquibase/build-logic/.github/workflows/[email protected]
secrets: inherit

- name: Attach Files to Draft Release
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ needs.setup.outputs.extensionVersion }}
draft: true
fail_on_unmatched_files: true
body: Support for Liquibase ${{ needs.setup.outputs.liquibaseVersion }}.
generate_release_notes: true
files: final-artifacts/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19 changes: 19 additions & 0 deletions .github/workflows/label-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Pull Request Labels
on:
pull_request:
types: [opened, labeled, unlabeled, synchronize, reopened]
jobs:
label:
runs-on: ubuntu-22.04
permissions:
issues: write
pull-requests: write
steps:
- name: Validate PR Labels
uses: mheap/github-action-required-labels@v5
with:
mode: minimum
count: 1
labels: "breakingChanges, newContributors, notableChanges, sdou, skipReleaseNotes, TypeBug, TypeEnhancement, TypeTest"
add_comment: true
message: "Label error: This PR is being prevented from merging because you have not added one of the labels: {{ provided }}. You'll need to add it before this PR can be merged."
25 changes: 25 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Release Drafter

on:
workflow_dispatch:
push:
branches:
- master

permissions:
contents: read

jobs:
update_release_draft:
permissions:
# write permission is required to create a github release
contents: write
# write permission is required for autolabeler
# otherwise, read permission is required at least
pull-requests: write
runs-on: ubuntu-22.04
steps:
# Drafts your next Release notes as Pull Requests are merged into the default branch
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77 changes: 4 additions & 73 deletions .github/workflows/release-published.yml
Original file line number Diff line number Diff line change
@@ -1,80 +1,11 @@
name: Release Extension to Sonatype

on:
workflow_dispatch:
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: 'Release Tag'
required: true

jobs:
setup:
name: Setup
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.collect-data.outputs.tag }}
version: ${{ steps.collect-data.outputs.version }}
steps:
- name: Collect Data
id: collect-data
uses: actions/github-script@v6
with:
script: |
let tag;
if (context.payload.inputs) {
tag = context.payload.inputs.tag;
} else {
tag = context.payload.release.tag_name;
}

let version = tag.replace(/^v/, "");

core.setOutput("tag", tag);
core.setOutput("version", version);

- run: |
echo "Publishing version ${{ steps.collect-data.outputs.version }} from ${{ steps.collect-data.outputs.tag }}"

deploy_maven:
name: Deploy to Maven
needs: [ setup ]
runs-on: ubuntu-latest
steps:
- name: Download Release Artifacts
uses: robinraju/[email protected]
with:
tag: "${{ needs.setup.outputs.tag }}"
filename: "*"
out-file-path: "."

- name: Set up Java for publishing to Maven Central Repository
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
server-id: sonatype-nexus-staging
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD

- name: Publish to Maven Central
env:
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.SONATYPE_TOKEN }}
run: |
version=${{ needs.setup.outputs.version }}

unzip *.zip

mvn -B org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy-file \
-Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ \
-DrepositoryId=sonatype-nexus-staging \
-DpomFile=liquibase-redshift-${version}.pom \
-DgeneratePom=false \
-Dfile=liquibase-redshift-${version}.jar \
-Dsources=liquibase-redshift-${version}-sources.jar \
-Djavadoc=liquibase-redshift-${version}-javadoc.jar \
-Dfiles=liquibase-redshift-${version}.jar.asc,liquibase-redshift-${version}-sources.jar.asc,liquibase-redshift-${version}-javadoc.jar.asc,liquibase-redshift-${version}.pom.asc \
-Dtypes=jar.asc,jar.asc,jar.asc,pom.asc \
-Dclassifiers=,sources,javadoc,
release:
uses: liquibase/build-logic/.github/workflows/[email protected]
secrets: inherit
62 changes: 0 additions & 62 deletions .github/workflows/snyk.yml

This file was deleted.

Loading
Loading