diff --git a/.github/scripts/clear-s3-caches.sh b/.github/scripts/clear-s3-caches.sh new file mode 100755 index 000000000..2dfc4ebb4 --- /dev/null +++ b/.github/scripts/clear-s3-caches.sh @@ -0,0 +1,12 @@ +s3_path=$1 +invalidation_json=`aws cloudfront create-invalidation --distribution-id ECAO9Q8651L8M --paths $s3_path | jq '.'` +invalidation_id=`echo $invalidation_json | jq -r '.Invalidation.Id'` +invalidation_status=`echo $invalidation_json | jq -r '.Invalidation.Status'` +echo "ID=${invalidation_id} Status=${invalidation_status}" +while [ $invalidation_status = "InProgress" ] +do + echo "Invalidation status: ${invalidation_status}" + sleep 3 + invalidation_status=`aws cloudfront get-invalidation --distribution-id ECAO9Q8651L8M --id $invalidation_id | jq -r '.Invalidation.Status'` +done +echo "Final invalidation status: ${invalidation_status}" diff --git a/.github/workflows/clear_s3_cache.yml b/.github/workflows/clear_s3_cache.yml new file mode 100644 index 000000000..f03b751d3 --- /dev/null +++ b/.github/workflows/clear_s3_cache.yml @@ -0,0 +1,26 @@ +name: Clear S3 Cache for path + +on: + workflow_dispatch: + inputs: + path: + description: Path in the S3 bucket dist.springsource.com without leading slash + required: true + type: string + +jobs: + + clear-s3-cache: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + with: + ref: ${{ inputs.ref }} + sparse-checkout: | + .github + - name: Invalidate S3 Cloudfront Cache + env: + AWS_ACCESS_KEY_ID: ${{ secrets.TOOLS_S3_ACCESS_KEY }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.TOOLS_S3_SECRET_KEY }} + run: | + ${{ github.workspace }}/.github/scripts/clear-s3-caches.sh ${{ inputs.path }} diff --git a/.github/workflows/release-eclipse-build.yml b/.github/workflows/release-eclipse-build.yml deleted file mode 100644 index 04014b05b..000000000 --- a/.github/workflows/release-eclipse-build.yml +++ /dev/null @@ -1,59 +0,0 @@ -name: Release - Eclipse Build - -concurrency: - group: release-eclipse - cancel-in-progress: true - -on: - workflow_dispatch: - -jobs: - - eclipse-ls-extension: - runs-on: ubuntu-latest - steps: - - name: Timestamp - id: timestamp - run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT - - uses: ./.github/workflows/eclipse-ls-extensions-build.yml - with: - eclipse_profile: 'e427' - build_type: 'release' - skip_tests: true - sts4-language-servers-version: ${{ steps.timestamp.outputs.date }} - secrets: inherit - outputs: - sts4-language-servers-version: ${{ steps.timestamp.outputs.date }} - - e427-distro: - runs-on: ubuntu-latest - needs: [ eclipse-ls-extension ] - steps: - - uses: ./.github/workflows/gh-hosted-eclipse-distro-build.yml - with: - eclipse_profile: 'e427' - build_type: 'release' - p2-qualifier: 'RELEASE' - sts4-language-servers-version: ${{ needs.eclipse-ls-extension.outputs.sts4-language-servers-version }} - - e428-distro: - runs-on: ubuntu-latest - needs: [ eclipse-ls-extension ] - steps: - - uses: ./.github/workflows/gh-hosted-eclipse-distro-build.yml - with: - eclipse_profile: 'e428' - build_type: 'release' - p2-qualifier: 'RELEASE' - sts4-language-servers-version: ${{ needs.eclipse-ls-extension.outputs.sts4-language-servers-version }} - - e429-distro: - runs-on: ubuntu-latest - needs: [ eclipse-ls-extension ] - steps: - - uses: ./.github/workflows/gh-hosted-eclipse-distro-build.yml - with: - eclipse_profile: 'e429' - build_type: 'release' - p2-qualifier: 'RELEASE' - sts4-language-servers-version: ${{ needs.eclipse-ls-extension.outputs.sts4-language-servers-version }} diff --git a/.github/workflows/release-eclipse-distro-build.yml b/.github/workflows/release-eclipse-distro-build.yml new file mode 100644 index 000000000..c9c1913c8 --- /dev/null +++ b/.github/workflows/release-eclipse-distro-build.yml @@ -0,0 +1,45 @@ +name: Release - Eclipse Build + +concurrency: + group: release-eclipse + cancel-in-progress: true + +on: + workflow_dispatch: + inputs: + sts4-language-servers-version: + description: Last segments of an s3 path for p2 Repo for eclipse ls extensions + required: true + type: string + +jobs: + + e427-distro: + runs-on: ubuntu-latest + steps: + - uses: ./.github/workflows/gh-hosted-eclipse-distro-build.yml + with: + eclipse_profile: 'e427' + build_type: 'release' + p2-qualifier: 'RELEASE' + sts4-language-servers-version: ${{ inputs.sts4-language-servers-version }} + + e428-distro: + runs-on: ubuntu-latest + steps: + - uses: ./.github/workflows/gh-hosted-eclipse-distro-build.yml + with: + eclipse_profile: 'e428' + build_type: 'release' + p2-qualifier: 'RELEASE' + sts4-language-servers-version: ${{ inputs.sts4-language-servers-version }} + + e429-distro: + runs-on: ubuntu-latest + steps: + - uses: ./.github/workflows/gh-hosted-eclipse-distro-build.yml + with: + eclipse_profile: 'e429' + build_type: 'release' + p2-qualifier: 'RELEASE' + sts4-language-servers-version: ${{ inputs.sts4-language-servers-version }} diff --git a/.github/workflows/release-eclipse-ls-extensions.yml b/.github/workflows/release-eclipse-ls-extensions.yml new file mode 100644 index 000000000..9c39c0090 --- /dev/null +++ b/.github/workflows/release-eclipse-ls-extensions.yml @@ -0,0 +1,26 @@ +name: Release - Eclipse LS Extensions Build + +concurrency: + group: release-eclipse-ls-extensions + cancel-in-progress: true + +on: + workflow_dispatch: + +jobs: + + eclipse-ls-extension: + runs-on: ubuntu-latest + steps: + - name: Timestamp + id: timestamp + run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT + - uses: ./.github/workflows/eclipse-ls-extensions-build.yml + with: + eclipse_profile: 'e427' + build_type: 'release' + skip_tests: true + sts4-language-servers-version: ${{ steps.timestamp.outputs.date }} + secrets: inherit + outputs: + sts4-language-servers-version: ${{ steps.timestamp.outputs.date }} \ No newline at end of file diff --git a/.github/workflows/snapshot-eclipse-ls-extensions-build.yml b/.github/workflows/snapshot-eclipse-ls-extensions-build.yml index f398da152..c0307c642 100644 --- a/.github/workflows/snapshot-eclipse-ls-extensions-build.yml +++ b/.github/workflows/snapshot-eclipse-ls-extensions-build.yml @@ -4,12 +4,12 @@ concurrency: group: eclipse-ls-extension-snapshot cancel-in-progress: true -#on: -# workflow_dispatch: on: - push: - branches: - - 'main' + workflow_dispatch: +#on: +# push: +# branches: +# - 'main' jobs: eclipse-ls-extensions: