-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2,095 changed files
with
144,670 additions
and
86,478 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Require workflow changes to be approved by developers who understand the codebase | ||
# and security implications of changes | ||
|
||
/.github/ @dotCMS/core-workflow-developers | ||
|
8,141 changes: 1,595 additions & 6,546 deletions
8,141
.github/actions/changelog-report/package-lock.json
Large diffs are not rendered by default.
Oops, something went wrong.
5,191 changes: 905 additions & 4,286 deletions
5,191
.github/actions/cleanup-gh-packages/package-lock.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Deploy Artifact to Artifactory | ||
|
||
This GitHub Action streamlines the process of deploying dotCMS artifacts to Artifactory. It's particularly useful for automating the deployment workflow in projects utilizing dotCMS. | ||
|
||
## Inputs | ||
|
||
### `artifactory-repo-username` | ||
|
||
**Description**: Username required for accessing the Artifactory repository. | ||
**Required**: true | ||
|
||
### `artifactory-repo-password` | ||
|
||
**Description**: Password associated with the Artifactory repository username. | ||
**Required**: true | ||
|
||
### `github-token` | ||
|
||
**Description**: Token required for GitHub API access, used here for retrieving artifacts. | ||
**Required**: true | ||
|
||
## Example Usage | ||
|
||
```yaml | ||
name: Deploy Artifact | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Deploy Artifact to Artifactory | ||
uses: ./.github/actions/deploy-artifact-artifactory | ||
with: | ||
artifactory-repo-username: ${{ secrets.ARTIFACTORY_REPO_USERNAME }} | ||
artifactory-repo-password: ${{ secrets.ARTIFACTORY_REPO_PASSWORD }} | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: 'Deploy Artifact to Artifactory' | ||
description: 'Deploy the dotCMS artifacts to Artifactory' | ||
inputs: | ||
artifactory-repo-username: | ||
description: 'Artifactory Repository Username' | ||
required: true | ||
artifactory-repo-password: | ||
description: 'Artifactory Repository Password' | ||
required: true | ||
github-token: | ||
description: 'GitHub Token' | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: 'Set up JDK' | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: 11 | ||
distribution: temurin | ||
|
||
- name: 'Get Date' | ||
id: get-date | ||
run: | | ||
echo "date=$(/bin/date -u "+%Y-%m")" >> $GITHUB_OUTPUT | ||
shell: bash | ||
|
||
- name: Download Build Artifact | ||
id: data-download | ||
uses: dawidd6/[email protected] | ||
with: | ||
github_token: ${{ inputs.github-token }} | ||
workflow_search: true # artifacts can come from merge_group build. Cannot specify a list of workflows without multiple calls | ||
commit: ${{ github.sha }} | ||
workflow_conclusion: success | ||
search_artifacts: true | ||
dry_run: true | ||
name: maven-repo # If using the same branch for different environments artifact names must be unique | ||
path: . | ||
if_no_artifact_found: warn | ||
|
||
- name: 'Check if artifact exists' | ||
id: check | ||
run: | | ||
build_artifact_exists=${{ steps.data-download.outputs.found_artifact }} | ||
if [[ ${build_artifact_exists} == "true" ]]; then | ||
run_id=`echo '${{ steps.data-download.outputs.artifacts }}' | jq -r '.[0].workflow_run.id'` | ||
found_artifacts=true | ||
echo "Artifact Run id: $run_id" | ||
else | ||
echo "No artifact found" | ||
run_id="${{ github.run_id }}" | ||
found_artifacts=false | ||
fi | ||
echo "run_id=$run_id" >> $GITHUB_OUTPUT | ||
echo "found_artifacts=$found_artifacts" >> $GITHUB_OUTPUT | ||
shell: bash | ||
|
||
- name: 'Download Maven Repo' | ||
uses: actions/download-artifact@v4 | ||
with: | ||
run-id: ${{ steps.check.outputs.run_id }} | ||
github-token: ${{ inputs.github-token }} | ||
name: maven-repo | ||
path: ~/.m2/repository | ||
|
||
- name: 'Maven settings.xml setup' | ||
uses: whelk-io/maven-settings-xml-action@v22 | ||
with: | ||
servers: '[{ "id": "dotcms-libs-local", "username": "${{ inputs.artifactory-repo-username }}", "password": "${{ inputs.artifactory-repo-password }}" }, { "id": "dotcms-libs-snapshot-local", "username": "${{ inputs.artifactory-repo-username }}", "password": "${{ inputs.artifactory-repo-password }}" }]' | ||
|
||
# Artifact deployment in the Artifactory excluding 'dotcms-integration' and 'dotcms-postman' | ||
- name: 'Deploy Artifacts' | ||
run: | | ||
JVM_TEST_MAVEN_OPTS="-e -B --no-transfer-progress -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn" | ||
eval ./mvnw -ntp deploy -Dprod=true -DskipTests=true -DskipITs=true $JVM_TEST_MAVEN_OPTS | ||
shell: bash |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.