|
| 1 | +name: Backup Eclipse Releases to GCP |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + inputs: |
| 6 | + ls_version: |
| 7 | + description: The suffix of the p2 repo URL in S3 (i.e. 2023-11-01) |
| 8 | + required: true |
| 9 | + type: string |
| 10 | + release_version: |
| 11 | + description: Release version (i.e. 4.20.1) |
| 12 | + required: true |
| 13 | + type: string |
| 14 | + |
| 15 | +env: |
| 16 | + AWS_ACCESS_KEY_ID: ${{ secrets.CDN_S3_ACCESS_KEY }} |
| 17 | + AWS_SECRET_ACCESS_KEY: ${{ secrets.CDN_S3_SECRET_KEY }} |
| 18 | + AWS_DEFAULT_REGION: us-east-1 |
| 19 | + AWS_ENDPOINT_URL_S3: ${{ secrets.CDN_S3_ENDPOINT }} |
| 20 | + AWS_S3_BUCKET: ${{ secrets.CDN_BUCKET }} |
| 21 | + DOWNLOAD_URL_ROOT: https://cdn.spring.io/spring-tools |
| 22 | + |
| 23 | +jobs: |
| 24 | + backup-eclipse-releases-to-gcp: |
| 25 | + runs-on: ubuntu-latest |
| 26 | + name: Backup Eclipse releases for version '${{ inputs.release_version }}' |
| 27 | + steps: |
| 28 | + - name: Authenticate to GCP |
| 29 | + run: | |
| 30 | + echo -e "${{ secrets.CDN_SPRING_IO_BACKUP_GCP_BUCKET_JSON }} " > ~/gcp.json |
| 31 | + gcloud auth activate-service-account --key-file=~/gcp.json |
| 32 | + - uses: actions/checkout@v4 |
| 33 | + with: |
| 34 | + sparse-checkout: | |
| 35 | + .github/scripts |
| 36 | + - name: Download from S3, Upload to GCP |
| 37 | + run: | |
| 38 | + url_path=spring-tools/release/TOOLS/sts4-language-server-integrations/${{ inputs.ls_version }} |
| 39 | + |
| 40 | + echo "Copying Eclipse LS extensions ${{ inputs.ls_version }} to GCP..." |
| 41 | + ${{ github.workspace }}/.github/scripts/copy-from-s3-to-gcp.sh s3://$AWS_S3_BUCKET/$url_path gs://gcp-test-spring-io/$url_path |
| 42 | +
|
| 43 | + echo "Copying Eclipse Distro P2 repos ${{ inputs.ls_version }} to GCP..." |
| 44 | + url_path=spring-tools/release/TOOLS/sts4/update/${{ inputs.release_version }}.RELEASE |
| 45 | + ${{ github.workspace }}/.github/scripts/copy-from-s3-to-gcp.sh s3://$AWS_S3_BUCKET/$url_path gs://gcp-test-spring-io/$url_path |
| 46 | + |
| 47 | + echo "Copying Eclipse Distros ${{ inputs.release_version }} to GCP..." |
| 48 | + url_path=spring-tools/release/STS4/${{ inputs.release_version }}.RELEASE/dist |
| 49 | + ${{ github.workspace }}/.github/scripts/copy-from-s3-to-gcp.sh s3://$AWS_S3_BUCKET/$url_path gs://gcp-test-spring-io/$url_path |
0 commit comments