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

Headless release (onescript) #5569

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Empty file modified .github/scripts/deploy-plugins-to-github.sh
100644 → 100755
Empty file.
Empty file modified .github/scripts/deploy-plugins-to-maven.sh
100644 → 100755
Empty file.
Empty file modified .github/scripts/deploy-to-docker.sh
100644 → 100755
Empty file.
Empty file modified .github/scripts/deploy-to-github.sh
100644 → 100755
Empty file.
Empty file modified .github/scripts/deploy-to-maven.sh
100644 → 100755
Empty file.
Empty file modified .github/scripts/deploy-to-s3.sh
100644 → 100755
Empty file.
Empty file modified .github/scripts/publish-release.sh
100644 → 100755
Empty file.
28 changes: 28 additions & 0 deletions .github/scripts/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env bash
set -e

# build artifacts
make distribution

# tag release
./tag-release.sh

# deploy to maven
./deploy-to-maven.sh

# deploy to S3
./deploy-to-s3.sh

# deploy to docker
./deploy-to-docker.sh

# deploy to github
./deploy-to-github.sh

# deploy plugins
./deploy-plugins-to-maven.sh
./deploy-plugins-to-github.sh
./update-plugins-index.sh

# finally, publish the distribution
./publish-release.sh
Empty file modified .github/scripts/tag-release.sh
100644 → 100755
Empty file.
Empty file modified .github/scripts/update-plugins-index.sh
100644 → 100755
Empty file.
70 changes: 68 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,20 +244,86 @@ jobs:
GITHUB_TOKEN: ${{ secrets.AUTOMATION_GITHUB_TOKEN }}
GRADLE_OPTS: '-Dorg.gradle.daemon=false'

# --------------------------------------------------
# job: release
# --------------------------------------------------
release:
name: Release
if: ${{ contains(needs.build.outputs.commit_message,'[release]') }}
runs-on: ubuntu-latest
needs: build
timeout-minutes: 10
steps:
# setup steps
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: true

- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
architecture: x64

- name: Setup AWS
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: eu-west-1
aws-access-key-id: ${{ secrets.AWS_DEPLOY_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_DEPLOY_SECRET_ACCESS_KEY }}

- name: Login to Docker hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_ID }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}

- name: Login to Seqera registry
uses: docker/login-action@v3
with:
registry: ${{ vars.SEQERA_PUBLIC_CR_URL }}
username: ${{ secrets.SEQERA_PUBLIC_CR_USER }}
password: ${{ secrets.SEQERA_PUBLIC_CR_PASSWORD }}

# release step
- name: Release
run: gh workflow run release.yml --ref ${{ github.ref }}
run: bash .github/scripts/release.sh
env:
GH_TOKEN: ${{ secrets.AUTOMATION_GITHUB_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_DEPLOY_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_DEPLOY_SECRET_ACCESS_KEY }}
GH_ORG: ${{ vars.PLUGINS_GITHUB_ORG }}
GH_USER: ${{ vars.DEPLOY_GITHUB_USER }}
GH_USER_EMAIL: ${{ vars.DEPLOY_GITHUB_EMAIL }}
GH_TOKEN: ${{ secrets.DEPLOY_GITHUB_TOKEN }}
MAVEN_PUBLISH_URL: ${{ vars.MAVEN_PLUGINS_PUBLISH_URL }}
PLUGINS_INDEX_JSON: ${{ vars.PLUGINS_INDEX_JSON }}
S3_RELEASE_BUCKET: ${{ vars.S3_RELEASE_BUCKET }}
SEQERA_REGISTRY: ${{ vars.SEQERA_PUBLIC_CR_URL }}

# upload steps
- name: Upload artifacts (libs)
uses: actions/upload-artifact@v4
with:
retention-days: 3
name: libs
path: modules/*/build/libs/

- name: Upload artifacts (distribution)
uses: actions/upload-artifact@v4
with:
retention-days: 3
name: distribution
path: build/releases/

- name: Upload artifacts (plugins)
uses: actions/upload-artifact@v4
with:
retention-days: 3
compression-level: 0
name: plugins
path: |
plugins/build/libs/
plugins/*/build/libs/
Loading
Loading