From 66bf43f70d043452590330c68effdb18efe40e70 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Mon, 10 Jun 2024 09:28:28 -0700 Subject: [PATCH] Delete Concourse CI Closes gh-411 --- ci/README.adoc | 18 - ci/config/release-scripts.yml | 10 - ci/images/README.adoc | 21 -- ci/images/ci-image/Dockerfile | 11 - ci/images/docker-lib.sh | 112 ------- ci/images/get-docker-url.sh | 5 - ci/images/setup.sh | 38 --- ci/parameters.yml | 10 - ci/pipeline.yml | 316 ------------------ ci/scripts/build-project.sh | 9 - ci/scripts/common.sh | 9 - ci/scripts/generate-changelog.sh | 11 - ci/scripts/promote.sh | 18 - ...blish-eclipse-update-site-pom-template.xml | 60 ---- ci/scripts/publish-eclipse-update-site.sh | 57 ---- ci/scripts/stage.sh | 58 ---- ci/scripts/sync-to-maven-central.sh | 7 - ci/tasks/build-ci-image.yml | 28 -- ci/tasks/build-project.yml | 17 - ci/tasks/generate-changelog.yml | 16 - ci/tasks/promote.yml | 14 - ci/tasks/publish-eclipse-update-site.yml | 7 - ci/tasks/stage.yml | 16 - 23 files changed, 868 deletions(-) delete mode 100644 ci/README.adoc delete mode 100644 ci/config/release-scripts.yml delete mode 100644 ci/images/README.adoc delete mode 100644 ci/images/ci-image/Dockerfile delete mode 100755 ci/images/docker-lib.sh delete mode 100755 ci/images/get-docker-url.sh delete mode 100755 ci/images/setup.sh delete mode 100644 ci/parameters.yml delete mode 100644 ci/pipeline.yml delete mode 100755 ci/scripts/build-project.sh delete mode 100644 ci/scripts/common.sh delete mode 100755 ci/scripts/generate-changelog.sh delete mode 100755 ci/scripts/promote.sh delete mode 100755 ci/scripts/publish-eclipse-update-site-pom-template.xml delete mode 100755 ci/scripts/publish-eclipse-update-site.sh delete mode 100755 ci/scripts/stage.sh delete mode 100755 ci/scripts/sync-to-maven-central.sh delete mode 100644 ci/tasks/build-ci-image.yml delete mode 100644 ci/tasks/build-project.yml delete mode 100644 ci/tasks/generate-changelog.yml delete mode 100644 ci/tasks/promote.yml delete mode 100644 ci/tasks/publish-eclipse-update-site.yml delete mode 100644 ci/tasks/stage.yml diff --git a/ci/README.adoc b/ci/README.adoc deleted file mode 100644 index bdf75bd5..00000000 --- a/ci/README.adoc +++ /dev/null @@ -1,18 +0,0 @@ -== Concourse pipeline - -Ensure that you've setup the target and can login - -[source] ----- -$ fly -t spring-javaformat login -n spring-javaformat -c https://ci.spring.io ----- - -The pipeline can be deployed using the following command: - -[source] ----- -$ fly -t spring-javaformat set-pipeline -p spring-javaformat -c ci/pipeline.yml -l ci/parameters.yml ----- - -NOTE: This assumes that you have credhub integration configured with the appropriate -secrets. diff --git a/ci/config/release-scripts.yml b/ci/config/release-scripts.yml deleted file mode 100644 index d31f8cba..00000000 --- a/ci/config/release-scripts.yml +++ /dev/null @@ -1,10 +0,0 @@ -logging: - level: - io.spring.concourse: DEBUG -spring: - main: - banner-mode: off -sonatype: - exclude: - - 'build-info\.json' - - '.*\.zip' diff --git a/ci/images/README.adoc b/ci/images/README.adoc deleted file mode 100644 index 84eae160..00000000 --- a/ci/images/README.adoc +++ /dev/null @@ -1,21 +0,0 @@ -== CI Images - -These images are used by CI to run the actual builds. - -To build the image locally run the following from this directory: - ----- -$ docker build --no-cache -f /Dockerfile . ----- - -For example - ----- -$ docker build --no-cache -f spring-boot-ci-image/Dockerfile . ----- - -To test run: - ----- -$ docker run -it --entrypoint /bin/bash ✈ ----- diff --git a/ci/images/ci-image/Dockerfile b/ci/images/ci-image/Dockerfile deleted file mode 100644 index fbdbb4c0..00000000 --- a/ci/images/ci-image/Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -FROM ubuntu:focal-20210401 - -ADD setup.sh /setup.sh -ADD get-docker-url.sh /get-docker-url.sh -RUN ./setup.sh - -ENV JAVA_HOME /opt/openjdk -ENV PATH $JAVA_HOME/bin:$PATH -ADD docker-lib.sh /docker-lib.sh - -ENTRYPOINT [ "switch", "shell=/bin/bash", "--", "codep", "/bin/docker daemon" ] diff --git a/ci/images/docker-lib.sh b/ci/images/docker-lib.sh deleted file mode 100755 index 4c7b1d58..00000000 --- a/ci/images/docker-lib.sh +++ /dev/null @@ -1,112 +0,0 @@ -# Based on: https://github.com/concourse/docker-image-resource/blob/master/assets/common.sh - -DOCKER_LOG_FILE=${DOCKER_LOG_FILE:-/tmp/docker.log} -SKIP_PRIVILEGED=${SKIP_PRIVILEGED:-false} -STARTUP_TIMEOUT=${STARTUP_TIMEOUT:-120} - -sanitize_cgroups() { - mkdir -p /sys/fs/cgroup - mountpoint -q /sys/fs/cgroup || \ - mount -t tmpfs -o uid=0,gid=0,mode=0755 cgroup /sys/fs/cgroup - - mount -o remount,rw /sys/fs/cgroup - - sed -e 1d /proc/cgroups | while read sys hierarchy num enabled; do - if [ "$enabled" != "1" ]; then - # subsystem disabled; skip - continue - fi - - grouping="$(cat /proc/self/cgroup | cut -d: -f2 | grep "\\<$sys\\>")" || true - if [ -z "$grouping" ]; then - # subsystem not mounted anywhere; mount it on its own - grouping="$sys" - fi - - mountpoint="/sys/fs/cgroup/$grouping" - - mkdir -p "$mountpoint" - - # clear out existing mount to make sure new one is read-write - if mountpoint -q "$mountpoint"; then - umount "$mountpoint" - fi - - mount -n -t cgroup -o "$grouping" cgroup "$mountpoint" - - if [ "$grouping" != "$sys" ]; then - if [ -L "/sys/fs/cgroup/$sys" ]; then - rm "/sys/fs/cgroup/$sys" - fi - - ln -s "$mountpoint" "/sys/fs/cgroup/$sys" - fi - done - - if ! test -e /sys/fs/cgroup/systemd ; then - mkdir /sys/fs/cgroup/systemd - mount -t cgroup -o none,name=systemd none /sys/fs/cgroup/systemd - fi -} - -start_docker() { - mkdir -p /var/log - mkdir -p /var/run - - if [ "$SKIP_PRIVILEGED" = "false" ]; then - sanitize_cgroups - - # check for /proc/sys being mounted readonly, as systemd does - if grep '/proc/sys\s\+\w\+\s\+ro,' /proc/mounts >/dev/null; then - mount -o remount,rw /proc/sys - fi - fi - - local mtu=$(cat /sys/class/net/$(ip route get 8.8.8.8|awk '{ print $5 }')/mtu) - local server_args="--mtu ${mtu}" - local registry="" - - server_args="${server_args}" - - for registry in $3; do - server_args="${server_args} --insecure-registry ${registry}" - done - - if [ -n "$4" ]; then - server_args="${server_args} --registry-mirror $4" - fi - - try_start() { - dockerd --data-root /scratch/docker ${server_args} >$DOCKER_LOG_FILE 2>&1 & - echo $! > /tmp/docker.pid - - sleep 1 - - echo waiting for docker to come up... - until docker info >/dev/null 2>&1; do - sleep 1 - if ! kill -0 "$(cat /tmp/docker.pid)" 2>/dev/null; then - return 1 - fi - done - } - - export server_args DOCKER_LOG_FILE - declare -fx try_start - trap stop_docker EXIT - - if ! timeout ${STARTUP_TIMEOUT} bash -ce 'while true; do try_start && break; done'; then - echo Docker failed to start within ${STARTUP_TIMEOUT} seconds. - return 1 - fi -} - -stop_docker() { - local pid=$(cat /tmp/docker.pid) - if [ -z "$pid" ]; then - return 0 - fi - - kill -TERM $pid -} - diff --git a/ci/images/get-docker-url.sh b/ci/images/get-docker-url.sh deleted file mode 100755 index 221b3462..00000000 --- a/ci/images/get-docker-url.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -set -e - -version="20.10.6" -echo "https://download.docker.com/linux/static/stable/x86_64/docker-$version.tgz"; diff --git a/ci/images/setup.sh b/ci/images/setup.sh deleted file mode 100755 index 6c90192c..00000000 --- a/ci/images/setup.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -set -ex - -########################################################### -# UTILS -########################################################### -export DEBIAN_FRONTEND=noninteractive -apt-get update -apt-get install --no-install-recommends -y tzdata ca-certificates net-tools libxml2-utils git curl libudev1 libxml2-utils iptables iproute2 jq fontconfig -ln -fs /usr/share/zoneinfo/UTC /etc/localtime -dpkg-reconfigure --frontend noninteractive tzdata -rm -rf /var/lib/apt/lists/* -curl https://raw.githubusercontent.com/spring-io/concourse-java-scripts/v0.0.4/concourse-java.sh > /opt/concourse-java.sh - -########################################################### -# JAVA -########################################################### -JDK_URL=https://github.com/bell-sw/Liberica/releases/download/17.0.6+10/bellsoft-jdk17.0.6+10-linux-amd64.tar.gz - -mkdir -p /opt/openjdk -cd /opt/openjdk -curl -L ${JDK_URL} | tar zx --strip-components=1 -test -f /opt/openjdk/bin/java -test -f /opt/openjdk/bin/javac - -########################################################### -# DOCKER -########################################################### -cd / -DOCKER_URL=$( ./get-docker-url.sh ) -curl -L ${DOCKER_URL} | tar zx -mv /docker/* /bin/ -chmod +x /bin/docker* -export ENTRYKIT_VERSION=0.4.0 -curl -L https://github.com/progrium/entrykit/releases/download/v${ENTRYKIT_VERSION}/entrykit_${ENTRYKIT_VERSION}_Linux_x86_64.tgz | tar zx -chmod +x entrykit && \ -mv entrykit /bin/entrykit && \ -entrykit --symlink \ No newline at end of file diff --git a/ci/parameters.yml b/ci/parameters.yml deleted file mode 100644 index d4564cd2..00000000 --- a/ci/parameters.yml +++ /dev/null @@ -1,10 +0,0 @@ -project: spring-javaformat -branch: main -milestone: 0.0.x -github-owner: spring-io -github-repository: spring-javaformat -docker-hub-ci-organization: springci -ci-image: spring-javaformat-ci -artifactory-server: https://repo.spring.io -build-name: spring-javaformat -task-timeout: 2h00m diff --git a/ci/pipeline.yml b/ci/pipeline.yml deleted file mode 100644 index 92027920..00000000 --- a/ci/pipeline.yml +++ /dev/null @@ -1,316 +0,0 @@ -anchors: - github-release-source: &github-release-source - owner: ((github-owner)) - repository: ((github-repository)) - access_token: ((github-ci-release-token)) - artifactory-repo-put-params: &artifactory-repo-put-params - signing_key: ((signing-key)) - signing_passphrase: ((signing-passphrase)) - repo: libs-snapshot-local - folder: distribution-repository - build_uri: https://ci.spring.io/teams/${BUILD_TEAM_NAME}/pipelines/${BUILD_PIPELINE_NAME}/jobs/${BUILD_JOB_NAME}/builds/${BUILD_NAME} - build_number: ${BUILD_PIPELINE_NAME}-${BUILD_JOB_NAME}-${BUILD_NAME} - disable_checksum_uploads: true - threads: 8 - sonatype-task-params: &sonatype-task-params - SONATYPE_USERNAME: ((sonatype-username)) - SONATYPE_PASSWORD: ((sonatype-password)) - SONATYPE_URL: ((sonatype-url)) - SONATYPE_STAGING_PROFILE_ID: ((sonatype-staging-profile-id)) - artifactory-task-params: &artifactory-task-params - ARTIFACTORY_SERVER: ((artifactory-server)) - ARTIFACTORY_USERNAME: ((artifactory-username)) - ARTIFACTORY_PASSWORD: ((artifactory-password)) - docker-hub-task-params: &docker-hub-task-params - DOCKER_HUB_USERNAME: ((docker-hub-username)) - DOCKER_HUB_PASSWORD: ((docker-hub-password)) - slack-fail-params: &slack-fail-params - text: > - :concourse-failed: - silent: true - icon_emoji: ":concourse:" - username: concourse-ci - slack-success-params: &slack-success-params - text: > - :concourse-succeeded: - silent: true - icon_emoji: ":concourse:" - username: concourse-ci -resource_types: -- name: artifactory-resource - type: registry-image - source: - repository: springio/artifactory-resource - tag: "0.0.18" - username: ((docker-hub-username)) - password: ((docker-hub-password)) -- name: slack-notification - type: registry-image - source: - repository: cfcommunity/slack-notification-resource - username: ((docker-hub-username)) - password: ((docker-hub-password)) -resources: -- name: git-repo - type: git - icon: github - source: - uri: https://github.com/((github-owner))/((github-repository)).git - username: ((github-username)) - password: ((github-ci-release-token)) - branch: ((branch)) -- name: github-pre-release - type: github-release - icon: briefcase-download-outline - source: - <<: *github-release-source - pre_release: true - release: false -- name: github-release - type: github-release - icon: briefcase-download - source: - <<: *github-release-source - pre_release: false - release: true -- name: ci-images-git-repo - type: git - icon: github - source: - uri: https://github.com/((github-owner))/((github-repository)).git - branch: ((branch)) - paths: ["ci/images/*"] -- name: ci-image - type: registry-image - icon: docker - source: - username: ((docker-hub-username)) - password: ((docker-hub-password)) - tag: ((milestone)) - repository: ((docker-hub-ci-organization))/((ci-image)) -- name: artifactory-repo - type: artifactory-resource - icon: package-variant - source: - uri: ((artifactory-server)) - username: ((artifactory-username)) - password: ((artifactory-password)) - build_name: ((build-name)) -- name: slack-alert - type: slack-notification - icon: slack - source: - url: ((slack-webhook-url)) -jobs: -- name: build-ci-images - plan: - - get: ci-images-git-repo - trigger: true - - get: git-repo - - task: build-ci-image - privileged: true - file: git-repo/ci/tasks/build-ci-image.yml - params: - DOCKER_HUB_AUTH: ((docker-hub-auth)) - output_mapping: - image: ci-image - - put: ci-image - params: - image: ci-image/image.tar -- name: build - serial: true - public: true - plan: - - get: ci-image - - get: git-repo - trigger: true - - do: - - task: build-project - image: ci-image - privileged: true - timeout: ((task-timeout)) - file: git-repo/ci/tasks/build-project.yml - params: - <<: *docker-hub-task-params - BRANCH: ((branch)) - on_failure: - do: - - put: slack-alert - params: - <<: *slack-fail-params - - put: slack-alert - params: - <<: *slack-success-params -- name: stage-milestone - serial: true - plan: - - get: ci-image - - get: git-repo - trigger: false - - task: stage - image: ci-image - file: git-repo/ci/tasks/stage.yml - params: - <<: *docker-hub-task-params - RELEASE_TYPE: M - - put: artifactory-repo - params: - <<: *artifactory-repo-put-params - repo: libs-staging-local - - put: git-repo - params: - repository: stage-git-repo -- name: stage-rc - serial: true - plan: - - get: ci-image - - get: git-repo - trigger: false - - task: stage - image: ci-image - file: git-repo/ci/tasks/stage.yml - params: - <<: *docker-hub-task-params - RELEASE_TYPE: RC - - put: artifactory-repo - params: - <<: *artifactory-repo-put-params - repo: libs-staging-local - - put: git-repo - params: - repository: stage-git-repo -- name: stage-release - serial: true - plan: - - get: ci-image - - get: git-repo - trigger: false - - task: stage - image: ci-image - file: git-repo/ci/tasks/stage.yml - params: - <<: *docker-hub-task-params - RELEASE_TYPE: RELEASE - - put: artifactory-repo - params: - <<: *artifactory-repo-put-params - repo: libs-staging-local - - put: git-repo - params: - repository: stage-git-repo -- name: promote-milestone - serial: true - plan: - - get: ci-image - - get: git-repo - trigger: false - - get: artifactory-repo - trigger: false - passed: [stage-milestone] - params: - download_artifacts: false - save_build_info: true - - task: promote - file: git-repo/ci/tasks/promote.yml - params: - RELEASE_TYPE: M - <<: *artifactory-task-params - - task: generate-changelog - file: git-repo/ci/tasks/generate-changelog.yml - params: - RELEASE_TYPE: M - GITHUB_USERNAME: ((github-username)) - GITHUB_TOKEN: ((github-ci-release-token)) - - put: github-pre-release - params: - name: generated-changelog/tag - tag: generated-changelog/tag - body: generated-changelog/changelog.md -- name: promote-rc - serial: true - plan: - - get: ci-image - - get: git-repo - trigger: false - - get: artifactory-repo - trigger: false - passed: [stage-rc] - params: - download_artifacts: false - save_build_info: true - - task: promote - file: git-repo/ci/tasks/promote.yml - params: - RELEASE_TYPE: RC - <<: *artifactory-task-params - - task: generate-changelog - file: git-repo/ci/tasks/generate-changelog.yml - params: - RELEASE_TYPE: RC - - put: github-pre-release - params: - name: generated-changelog/tag - tag: generated-changelog/tag - body: generated-changelog/changelog.md -- name: promote-release - serial: true - plan: - - get: ci-image - - get: git-repo - trigger: false - - get: artifactory-repo - trigger: false - passed: [stage-release] - params: - download_artifacts: true - save_build_info: true - - task: promote - file: git-repo/ci/tasks/promote.yml - params: - RELEASE_TYPE: RELEASE - <<: *artifactory-task-params - <<: *sonatype-task-params -- name: create-github-release - serial: true - plan: - - get: ci-image - - get: git-repo - - get: artifactory-repo - trigger: true - passed: [promote-release] - params: - download_artifacts: false - save_build_info: true - - task: generate-changelog - file: git-repo/ci/tasks/generate-changelog.yml - params: - RELEASE_TYPE: RELEASE - - put: github-release - params: - name: generated-changelog/tag - tag: generated-changelog/tag - body: generated-changelog/changelog.md -- name: publish-eclipse-update-site - serial: true - plan: - - get: ci-image - - get: git-repo - trigger: false - - get: artifactory-repo - trigger: false - passed: [promote-release] - params: - save_build_info: true - - task: publish-eclipse-update-site - image: ci-image - file: git-repo/ci/tasks/publish-eclipse-update-site.yml - params: - ARTIFACTORY_USERNAME: ((artifactory-username)) - ARTIFACTORY_PASSWORD: ((artifactory-password)) -groups: -- name: builds - jobs: [build] -- name: releases - jobs: [stage-milestone, stage-rc, stage-release, promote-milestone, promote-rc, promote-release, create-github-release, publish-eclipse-update-site] -- name: ci-images - jobs: [build-ci-images] diff --git a/ci/scripts/build-project.sh b/ci/scripts/build-project.sh deleted file mode 100755 index 476c837e..00000000 --- a/ci/scripts/build-project.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -set -e - -source $(dirname $0)/common.sh -repository=$(pwd)/distribution-repository - -pushd git-repo > /dev/null -run_maven clean deploy -U -Dfull -DaltDeploymentRepository=distribution::file://${repository} -popd > /dev/null diff --git a/ci/scripts/common.sh b/ci/scripts/common.sh deleted file mode 100644 index 8eea3f79..00000000 --- a/ci/scripts/common.sh +++ /dev/null @@ -1,9 +0,0 @@ -source /opt/concourse-java.sh - -setup_symlinks - -if [[ -n $DOCKER_HUB_USERNAME ]]; then - docker login -u $DOCKER_HUB_USERNAME -p $DOCKER_HUB_PASSWORD -fi - -cleanup_maven_repo "io.spring.javaformat" diff --git a/ci/scripts/generate-changelog.sh b/ci/scripts/generate-changelog.sh deleted file mode 100755 index 1e4b6e5b..00000000 --- a/ci/scripts/generate-changelog.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -set -e - -version=$( cat artifactory-repo/build-info.json | jq -r '.buildInfo.modules[0].id' | sed 's/.*:.*:\(.*\)/\1/' ) - -java -jar /github-changelog-generator.jar \ - --changelog.repository=spring-io/spring-javaformat \ - ${version} generated-changelog/changelog.md - -echo ${version} > generated-changelog/version -echo v${version} > generated-changelog/tag diff --git a/ci/scripts/promote.sh b/ci/scripts/promote.sh deleted file mode 100755 index 4ce8285b..00000000 --- a/ci/scripts/promote.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -set -e - -CONFIG_DIR=git-repo/ci/config - -version=$( cat artifactory-repo/build-info.json | jq -r '.buildInfo.modules[0].id' | sed 's/.*:.*:\(.*\)/\1/' ) - -export BUILD_INFO_LOCATION=$(pwd)/artifactory-repo/build-info.json - -java -jar /concourse-release-scripts.jar \ - --spring.config.location=${CONFIG_DIR}/release-scripts.yml \ - publishToCentral $RELEASE_TYPE $BUILD_INFO_LOCATION artifactory-repo || { exit 1; } - -java -jar /concourse-release-scripts.jar \ - --spring.config.location=${CONFIG_DIR}/release-scripts.yml \ - promote $RELEASE_TYPE $BUILD_INFO_LOCATION || { exit 1; } - -echo "Promotion complete" diff --git a/ci/scripts/publish-eclipse-update-site-pom-template.xml b/ci/scripts/publish-eclipse-update-site-pom-template.xml deleted file mode 100755 index 6ee635e0..00000000 --- a/ci/scripts/publish-eclipse-update-site-pom-template.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - 4.0.0 - org.eclipse.m2e.maveneclipse - m2eclipse-maveneclipse-publish - 0.0.0-SNAPSHOT - pom - - 1.1.0 - - - - - org.eclipse.tycho.extras - tycho-p2-extras-plugin - ${tycho-extras-version} - - - prepare-package - - mirror - - - - - -##repositories## - - ${project.build.directory}/repository - true - - - - org.apache.maven.plugins - maven-antrun-plugin - 1.8 - - - prepare-package - - mvn - - - - - - - - - - - run - - - - - - - diff --git a/ci/scripts/publish-eclipse-update-site.sh b/ci/scripts/publish-eclipse-update-site.sh deleted file mode 100755 index 761f74c3..00000000 --- a/ci/scripts/publish-eclipse-update-site.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/bash -set -e - -source $(dirname $0)/common.sh - -buildName=$( cat artifactory-repo/build-info.json | jq -r '.buildInfo.name' ) -buildNumber=$( cat artifactory-repo/build-info.json | jq -r '.buildInfo.number' ) -groupId=$( cat artifactory-repo/build-info.json | jq -r '.buildInfo.modules[0].id' | sed 's/\(.*\):.*:.*/\1/' ) -version=$( cat artifactory-repo/build-info.json | jq -r '.buildInfo.modules[0].id' | sed 's/.*:.*:\(.*\)/\1/' ) - -echo "Publishing ${buildName}/${buildNumber} to Eclipse Update Site" -curl \ - -s \ - --connect-timeout 240 \ - --max-time 2700 \ - -u ${ARTIFACTORY_USERNAME}:${ARTIFACTORY_PASSWORD} \ - -f \ - -H "X-Explode-Archive: true" \ - -X PUT \ - -T "artifactory-repo/io/spring/javaformat/io.spring.javaformat.eclipse.site/${version}/io.spring.javaformat.eclipse.site-${version}.zip" \ - "https://repo.spring.io/javaformat-eclipse-update-site/${version}/" > /dev/null || { echo "Failed to publish" >&2; exit 1; } - -releasedVersions=$( curl -s -f -X GET https://repo.spring.io/api/storage/javaformat-eclipse-update-site | jq -r '.children[] | .uri' | cut -c 2- | grep '[0-9].*' | sort -V ) - -repositories="" -while read -r releasedVersion; do - echo "Adding repository for ${releasedVersion}" - repositories="${repositories}https://repo.spring.io/javaformat-eclipse-update-site/${releasedVersion}p2" -done <<< "${releasedVersions}" - -pushd git-repo > /dev/null -sed "s|##repositories##|${repositories}|" ci/scripts/publish-eclipse-update-site-pom-template.xml > publish-eclipse-update-site-pom.xml -run_maven -f publish-eclipse-update-site-pom.xml clean package || { echo "Failed to publish" >&2; exit 1; } - -curl \ - -s \ - --connect-timeout 240 \ - --max-time 2700 \ - -u ${ARTIFACTORY_USERNAME}:${ARTIFACTORY_PASSWORD} \ - -f \ - -X PUT \ - -T "target/repository/content.jar" \ - "https://repo.spring.io/javaformat-eclipse-update-site/" > /dev/null || { echo "Failed to publish" >&2; exit 1; } - -curl \ - -s \ - --connect-timeout 240 \ - --max-time 2700 \ - -u ${ARTIFACTORY_USERNAME}:${ARTIFACTORY_PASSWORD} \ - -f \ - -X PUT \ - -T "target/repository/artifacts.jar" \ - "https://repo.spring.io/javaformat-eclipse-update-site/" > /dev/null || { echo "Failed to publish" >&2; exit 1; } - -popd > /dev/null - -echo "Publish complete" diff --git a/ci/scripts/stage.sh b/ci/scripts/stage.sh deleted file mode 100755 index 5b36e8b4..00000000 --- a/ci/scripts/stage.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/bash -set -e - -source $(dirname $0)/common.sh -repository=$(pwd)/distribution-repository - -pushd git-repo > /dev/null -git fetch --tags --all > /dev/null -popd > /dev/null - -git clone git-repo stage-git-repo > /dev/null - -pushd stage-git-repo > /dev/null - -snapshotVersion=$( xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' pom.xml ) -if [[ $RELEASE_TYPE = "M" ]]; then - stageVersion=$( get_next_milestone_release $snapshotVersion) - nextVersion=$snapshotVersion -elif [[ $RELEASE_TYPE = "RC" ]]; then - stageVersion=$( get_next_rc_release $snapshotVersion) - nextVersion=$snapshotVersion -elif [[ $RELEASE_TYPE = "RELEASE" ]]; then - stageVersion=$( get_next_release $snapshotVersion) - nextVersion=$( bump_version_number $snapshotVersion) -else - echo "Unknown release type $RELEASE_TYPE" >&2; exit 1; -fi - -echo "Staging ${stageVersion} (next version will be ${nextVersion})" -run_maven versions:set -DnewVersion=${stageVersion} -DgenerateBackupPoms=false -run_maven org.eclipse.tycho:tycho-versions-plugin:update-eclipse-metadata -run_maven --projects io.spring.javaformat:spring-javaformat-vscode-extension -P '!formatter-dependencies' antrun:run@update-version frontend:install-node-and-npm frontend:npm@update-package-lock - -git config user.name "Spring Builds" > /dev/null -git config user.email "spring-builds@users.noreply.github.com" > /dev/null -git add pom.xml > /dev/null -git commit -m"Release v${stageVersion}" > /dev/null -git tag -a "v${stageVersion}" -m"Release v${stageVersion}" > /dev/null - -run_maven clean deploy -U -Dfull -DaltDeploymentRepository=distribution::default::file://${repository} - -git reset --hard HEAD^ > /dev/null -if [[ $nextVersion != $snapshotVersion ]]; then - echo "Setting next development version (v$nextVersion)" - run_maven versions:set -DnewVersion=$nextVersion -DgenerateBackupPoms=false - run_maven org.eclipse.tycho:tycho-versions-plugin:update-eclipse-metadata - run_maven --projects io.spring.javaformat:spring-javaformat-vscode-extension -P '!formatter-dependencies' antrun:run@update-version frontend:npm@update-package-lock - sed -i "s/:release-version:.*/:release-version: ${stageVersion}/g" README.adoc - sed -i "s/spring-javaformat-gradle-plugin:.*/spring-javaformat-gradle-plugin:${nextVersion}\"\)/g" samples/spring-javaformat-gradle-sample/build.gradle - sed -i "s/spring-javaformat-checkstyle:.*/spring-javaformat-checkstyle:${nextVersion}\"\)/g" samples/spring-javaformat-gradle-sample/build.gradle - sed -i "s|.*|${nextVersion}|" samples/spring-javaformat-maven-sample/pom.xml - git add -u . > /dev/null - git commit -m"Next development version (v${nextVersion})" > /dev/null -fi; - -popd > /dev/null - -echo "Staging Complete" diff --git a/ci/scripts/sync-to-maven-central.sh b/ci/scripts/sync-to-maven-central.sh deleted file mode 100755 index f691b9f9..00000000 --- a/ci/scripts/sync-to-maven-central.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -export BUILD_INFO_LOCATION=$(pwd)/artifactory-repo/build-info.json -version=$( cat artifactory-repo/build-info.json | jq -r '.buildInfo.modules[0].id' | sed 's/.*:.*:\(.*\)/\1/' ) -java -jar /opt/concourse-release-scripts.jar syncToCentral "RELEASE" $BUILD_INFO_LOCATION || { exit 1; } - -echo "Sync complete" diff --git a/ci/tasks/build-ci-image.yml b/ci/tasks/build-ci-image.yml deleted file mode 100644 index 6f4de778..00000000 --- a/ci/tasks/build-ci-image.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -platform: linux -image_resource: - type: registry-image - source: - repository: concourse/oci-build-task - tag: 0.10.0 - username: ((docker-hub-username)) - password: ((docker-hub-password)) -inputs: -- name: ci-images-git-repo -outputs: -- name: image -caches: -- path: ci-image-cache -params: - CONTEXT: ci-images-git-repo/ci/images - DOCKERFILE: ci-images-git-repo/ci/images/ci-image/Dockerfile -run: - path: /bin/sh - args: - - "-c" - - | - mkdir -p /root/.docker - cat > /root/.docker/config.json <