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