-
Notifications
You must be signed in to change notification settings - Fork 27
ACS-4454 Migrating to GH Actions #727
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
Merged
mikolajbrzezinski
merged 25 commits into
master
from
feature/ACS-4454_migrating_to_gh_actions
Feb 9, 2023
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
608763d
initial commit
mikolajbrzezinski f620c99
fix "needs"
mikolajbrzezinski c659e1b
fixes and add master release
mikolajbrzezinski 4ed45cc
fixes
mikolajbrzezinski 8f112f9
fixes
mikolajbrzezinski ec12cab
fixes
mikolajbrzezinski 34c46e8
test --create-dirs
mikolajbrzezinski 5c5af75
clean-up before PR
mikolajbrzezinski d7d99e4
clean-up
mikolajbrzezinski ee4923e
clean-up
mikolajbrzezinski 7d3ebe8
clean-up
mikolajbrzezinski 712fd5b
clean-up
mikolajbrzezinski aaa6e58
clean-up
mikolajbrzezinski 04d170e
clean-up
mikolajbrzezinski 598f0d5
remove config user
mikolajbrzezinski 44a08a4
change docker login
mikolajbrzezinski 6608a8c
change docker login
mikolajbrzezinski 0584fab
cleanup
mikolajbrzezinski ef9c9b6
cleanup
mikolajbrzezinski e80b24a
cleanup
mikolajbrzezinski 6d02e30
cleanup
mikolajbrzezinski 02a4531
cleanup
mikolajbrzezinski a767d62
cleanup
mikolajbrzezinski c839fe5
cleanup
mikolajbrzezinski f8b24f5
cleanup
mikolajbrzezinski File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
File renamed without changes.
This file contains hidden or 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,186 @@ | ||
| name: Alfresco Transform Core CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| - feature/** | ||
| - fix/** | ||
| - SP/** | ||
mikolajbrzezinski marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - HF/** | ||
| - ATS-** | ||
| - ACS-** | ||
| - MNT-** | ||
| pull_request: | ||
| branches: | ||
| - master | ||
| - feature/** | ||
| - fix/** | ||
| - SP/** | ||
| - HF/** | ||
| schedule: | ||
| - cron: '0 5 * * 1' | ||
| workflow_dispatch: | ||
|
|
||
| env: | ||
| DOCKERHUB_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
| DOCKERHUB_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
mikolajbrzezinski marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} | ||
| NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} | ||
| QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} | ||
| QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} | ||
mikolajbrzezinski marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| GIT_USERNAME: ${{ secrets.BOT_GITHUB_USERNAME }} | ||
| GIT_EMAIL: ${{ secrets.BOT_GITHUB_EMAIL }} | ||
| GIT_PASSWORD: ${{ secrets.BOT_GITHUB_TOKEN }} | ||
| GITHUB_ACTIONS_DEPLOY_TIMEOUT: 60 | ||
|
|
||
| jobs: | ||
| veracode: | ||
| name: "Veracode - Source Clear Scan (SCA)" | ||
| runs-on: ubuntu-latest | ||
| if: > | ||
| github.ref_name == 'master' || | ||
| github.event_name == 'pull_request' | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.34.0 | ||
| - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.34.0 | ||
| - name: "Clean-up SNAPSHOT artifacts" | ||
| run: find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" | xargs -r -l rm -rf | ||
| - uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v1.34.0 | ||
| with: | ||
| srcclr-api-token: ${{ secrets.SRCCLR_API_TOKEN }} | ||
|
|
||
| build_and_test: | ||
| name: "Core & Base Snapshot deployment" | ||
| runs-on: ubuntu-latest | ||
| if: > | ||
| github.ref_name == 'master' && | ||
| github.event_name != 'pull_request' | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.34.0 | ||
| - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.34.0 | ||
| - name: "Login to Docker Hub" | ||
| uses: docker/login-action@v2.1.0 | ||
| with: | ||
| username: ${{ secrets.DOCKER_USERNAME }} | ||
| password: ${{ secrets.DOCKER_PASSWORD }} | ||
| - name: "Login to Quay.io" | ||
| uses: docker/login-action@v2.1.0 | ||
| with: | ||
| registry: quay.io | ||
| username: ${{ secrets.QUAY_USERNAME }} | ||
| password: ${{ secrets.QUAY_PASSWORD }} | ||
| - name: "Enable experimental docker features" | ||
| run: | | ||
mikolajbrzezinski marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json | ||
| sudo service docker restart | ||
| - name: "Clean-up SNAPSHOT artifacts" | ||
| run: find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" | xargs -r -l rm -rf | ||
| - name: "Build" | ||
| timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} | ||
| run: mvn -B -U -q clean install -DadditionalOption=-Xdoclint:none -DskipTests -Dmaven.javadoc.skip=true -Dmaven.wagon.http.pool=false -Pbase | ||
| - name: "Cache LibreOffice" | ||
| run: bash _ci/cache_artifacts.sh | ||
| - name: "Run tests" | ||
| timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} | ||
| run: mvn -B -U clean deploy -DadditionalOption=-Xdoclint:none -Dmaven.javadoc.skip=true -Dmaven.wagon.http.pool=false -Pbase | ||
|
|
||
| all_tests_matrix: | ||
| name: ${{ matrix.testName }} | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - testName: ImageMagick | ||
| buildProfile: imagemagick | ||
| testProfile: imagemagick | ||
| - testName: LibreOffice | ||
| buildProfile: libreoffice | ||
| testProfile: libreoffice | ||
| - testName: Transform Misc | ||
| buildProfile: misc | ||
| testProfile: misc | ||
| - testName: PDF Renderer | ||
| buildProfile: pdf-renderer | ||
| testProfile: pdf-renderer | ||
| - testName: Tika | ||
| buildProfile: tika | ||
| testProfile: tika | ||
| - testName: All in One Transformer | ||
| buildProfile: full-build | ||
| testProfile: aio-test | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.34.0 | ||
| - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.34.0 | ||
| - name: "Login to Docker Hub" | ||
| uses: docker/login-action@v2.1.0 | ||
| with: | ||
| username: ${{ secrets.DOCKER_USERNAME }} | ||
| password: ${{ secrets.DOCKER_PASSWORD }} | ||
| - name: "Login to Quay.io" | ||
| uses: docker/login-action@v2.1.0 | ||
| with: | ||
| registry: quay.io | ||
| username: ${{ secrets.QUAY_USERNAME }} | ||
| password: ${{ secrets.QUAY_PASSWORD }} | ||
| - name: "Enable experimental docker features" | ||
| run: | | ||
mikolajbrzezinski marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json | ||
| sudo service docker restart | ||
| - name: "Clean-up SNAPSHOT artifacts" | ||
| run: find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" | xargs -r -l rm -rf | ||
| - name: "Build local docker image" | ||
| timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} | ||
| run: bash _ci/build.sh ${{ matrix.buildProfile }} | ||
| - name: "Cache LibreOffice" | ||
| run: bash _ci/cache_artifacts.sh | ||
| - name: "Run tests" | ||
| timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} | ||
| run: bash _ci/test.sh ${{ matrix.testProfile }} | ||
|
|
||
| release: | ||
| name: "Release" | ||
| runs-on: ubuntu-latest | ||
| needs: [veracode, build_and_test, all_tests_matrix] | ||
| if: > | ||
| !failure() && | ||
| contains(github.event.head_commit.message, '[release]') && | ||
| github.event_name != 'pull_request' && | ||
| (github.ref_name == 'master' || startsWith(github.ref_name, 'SP/') || startsWith(github.ref_name, 'HF/')) | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.34.0 | ||
| - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.34.0 | ||
| - name: "Login to Docker Hub" | ||
| uses: docker/login-action@v2.1.0 | ||
| with: | ||
| username: ${{ secrets.DOCKER_USERNAME }} | ||
| password: ${{ secrets.DOCKER_PASSWORD }} | ||
| - name: "Login to Quay.io" | ||
| uses: docker/login-action@v2.1.0 | ||
| with: | ||
| registry: quay.io | ||
| username: ${{ secrets.QUAY_USERNAME }} | ||
| password: ${{ secrets.QUAY_PASSWORD }} | ||
| - name: "Enable experimental docker features" | ||
| run: | | ||
mikolajbrzezinski marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json | ||
| sudo service docker restart | ||
| - name: "Clean-up SNAPSHOT artifacts" | ||
| run: find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" | xargs -r -l rm -rf | ||
| - uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v1.34.0 | ||
| with: | ||
| username: ${{ env.GIT_USERNAME }} | ||
| email: ${{ env.GIT_EMAIL }} | ||
| global: true | ||
| - name: "Cache LibreOffice" | ||
| run: bash _ci/cache_artifacts.sh | ||
| - name: "Release" | ||
| timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} | ||
| run: bash _ci/release.sh | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
This file contains hidden or 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
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.