diff --git a/ci/README.adoc b/ci/README.adoc deleted file mode 100644 index 72adafde45..0000000000 --- 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 initializr login -n initializr -c https://ci.spring.io ----- - -The pipeline can be deployed using the following command: - -[source] ----- -$ fly -t initializr set-pipeline -p initializr-0.20.x -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/changelog-generator.yml b/ci/config/changelog-generator.yml deleted file mode 100644 index bfc4e9de69..0000000000 --- a/ci/config/changelog-generator.yml +++ /dev/null @@ -1,17 +0,0 @@ -changelog: - repository: spring-io/initializr - sections: - - title: ":star: New Features" - labels: - - "type: enhancement" - - title: ":lady_beetle: Bug Fixes" - labels: - - "type: bug" - - "type: regression" - - title: ":notebook_with_decorative_cover: Documentation" - labels: - - "type: documentation" - - title: ":hammer: Dependency Upgrades" - sort: "title" - labels: - - "type: dependency-upgrade" diff --git a/ci/config/release-scripts.yml b/ci/config/release-scripts.yml deleted file mode 100644 index d31f8cba00..0000000000 --- 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 92fa3c2ec5..0000000000 --- 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 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 e5b4e9b868..0000000000 --- a/ci/images/ci-image/Dockerfile +++ /dev/null @@ -1,8 +0,0 @@ -FROM ubuntu:jammy-20240111 - -ADD setup.sh /setup.sh -ADD get-jdk-url.sh /get-jdk-url.sh -RUN ./setup.sh java17 - -ENV JAVA_HOME /opt/openjdk -ENV PATH $JAVA_HOME/bin:$PATH \ No newline at end of file diff --git a/ci/images/get-jdk-url.sh b/ci/images/get-jdk-url.sh deleted file mode 100755 index 8821f134a5..0000000000 --- a/ci/images/get-jdk-url.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -set -e - -case "$1" in - java17) - echo "https://github.com/bell-sw/Liberica/releases/download/17.0.10%2B13/bellsoft-jdk17.0.10+13-linux-amd64.tar.gz" - ;; - *) - echo $"Unknown java version" - exit 1 -esac diff --git a/ci/images/setup.sh b/ci/images/setup.sh deleted file mode 100755 index 0e9d9d9570..0000000000 --- a/ci/images/setup.sh +++ /dev/null @@ -1,26 +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 unzip -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=$( ./get-jdk-url.sh $1 ) - -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 \ No newline at end of file diff --git a/ci/parameters.yml b/ci/parameters.yml deleted file mode 100644 index f533fb7d0a..0000000000 --- a/ci/parameters.yml +++ /dev/null @@ -1,12 +0,0 @@ -github-repo: "https://github.com/spring-io/initializr.git" -github-repo-name: "spring-io/initializr" -docker-hub-organization: "springci" -artifactory-server: "https://repo.spring.io" -branch: "main" -milestone: "0.20.x" -build-name: "initializr" -concourse-url: "https://ci.spring.io" -task-timeout: 30m -registry-mirror-host: docker.repo.spring.io -registry-mirror-username: ((artifactory-username)) -registry-mirror-password: ((artifactory-password)) \ No newline at end of file diff --git a/ci/pipeline.yml b/ci/pipeline.yml deleted file mode 100644 index b9ac28200a..0000000000 --- a/ci/pipeline.yml +++ /dev/null @@ -1,278 +0,0 @@ -anchors: - 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 - exclude: - - "**/*.effective-pom" - - "**/initializr-service-sample/**" - artifact_set: - - include: - - "/**/initializr-docs-*.zip" - properties: - "zip.type": "docs" - "zip.deployed": "false" - artifactory-task-params: &artifactory-task-params - ARTIFACTORY_SERVER: ((artifactory-server)) - ARTIFACTORY_USERNAME: ((artifactory-username)) - ARTIFACTORY_PASSWORD: ((artifactory-password)) - build-project-task-params: &build-project-task-params - privileged: true - timeout: ((task-timeout)) - file: git-repo/ci/tasks/build-project.yml - git-repo-resource-source: &git-repo-resource-source - uri: ((github-repo)) - username: ((github-username)) - password: ((github-ci-release-token)) - branch: ((branch)) - registry-image-resource-source: ®istry-image-resource-source - username: ((docker-hub-username)) - 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 - sontatype-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)) -resource_types: -- name: artifactory-resource - type: registry-image - source: - repository: springio/artifactory-resource - tag: 0.0.17 - <<: *registry-image-resource-source -- name: github-release - type: registry-image - source: - repository: concourse/github-release-resource - tag: 1.5.5 - <<: *registry-image-resource-source -- name: github-status-resource - type: registry-image - source: - repository: dpb587/github-status-resource - tag: master - <<: *registry-image-resource-source -- name: slack-notification - type: registry-image - source: - repository: cfcommunity/slack-notification-resource - tag: latest - <<: *registry-image-resource-source -resources: -- name: git-repo - type: git - icon: github - source: - <<: *git-repo-resource-source -- name: git-repo-windows - type: git - icon: github - source: - <<: *git-repo-resource-source - git_config: - - name: core.autocrlf - value: true -- name: github-release - type: github-release - icon: briefcase-download - source: - owner: spring-io - repository: initializr - access_token: ((github-ci-release-token)) - pre_release: false -- name: ci-images-git-repo - type: git - icon: github - source: - uri: ((github-repo)) - branch: ((branch)) - paths: ["ci/images/*"] -- name: ci-image - type: registry-image - icon: docker - source: - <<: *registry-image-resource-source - repository: ((docker-hub-organization))/initializr-ci - tag: ((milestone)) -- name: artifactory-repo - type: artifactory-resource - icon: package-variant - source: - uri: ((artifactory-server)) - username: ((artifactory-username)) - password: ((artifactory-password)) - build_name: ((build-name)) -- name: repo-status-build - type: github-status-resource - icon: eye-check-outline - source: - repository: ((github-repo-name)) - access_token: ((github-ci-status-token)) - branch: ((branch)) - context: build -- name: slack-alert - type: slack-notification - icon: slack - source: - url: ((slack-webhook-url)) -- name: daily - type: time - icon: clock-outline - source: { interval: "24h" } -jobs: -- name: build-ci-image - plan: - - get: ci-images-git-repo - trigger: true - - get: git-repo - - in_parallel: - - task: build-ci-image - privileged: true - file: git-repo/ci/tasks/build-ci-image.yml - output_mapping: - image: ci-image - vars: - ci-image-name: ci-image - <<: *registry-image-resource-source - - in_parallel: - - put: ci-image - params: - image: ci-image/image.tar -- name: build - serial: true - public: true - plan: - - get: ci-image - - get: git-repo - trigger: true - - put: repo-status-build - params: { state: "pending", commit: "git-repo" } - - do: - - task: build-project - image: ci-image - <<: *build-project-task-params - on_failure: - do: - - put: repo-status-build - params: { state: "failure", commit: "git-repo" } - - put: slack-alert - params: - <<: *slack-fail-params - - put: repo-status-build - params: { state: "success", commit: "git-repo" } - - put: artifactory-repo - params: - <<: *artifactory-repo-put-params - on_failure: - do: - - put: slack-alert - params: - <<: *slack-fail-params - - put: slack-alert - params: - <<: *slack-success-params -- name: windows-build - serial: true - plan: - - get: git-repo - resource: git-repo-windows - - get: daily - trigger: true - - do: - - task: build-project - privileged: true - file: git-repo/ci/tasks/build-project-windows.yml - tags: [ WIN64 ] - timeout: ((task-timeout)) - params: - BRANCH: ((branch)) - on_failure: - do: - - put: slack-alert - params: - <<: *slack-fail-params - - put: slack-alert - params: - <<: *slack-success-params -- 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: - 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-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 - <<: *registry-image-resource-source - <<: *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 - GITHUB_USERNAME: ((github-username)) - GITHUB_TOKEN: ((github-ci-release-token)) - vars: - <<: *registry-image-resource-source - - put: github-release - params: - name: generated-changelog/tag - tag: generated-changelog/tag - body: generated-changelog/changelog.md -groups: -- name: "build" - jobs: ["build", "windows-build"] -- name: "releases" - jobs: ["stage-release", "promote-release", "create-github-release"] -- name: "ci-images" - jobs: ["build-ci-image"] diff --git a/ci/scripts/build-project-windows.bat b/ci/scripts/build-project-windows.bat deleted file mode 100755 index 33d303ddb0..0000000000 --- a/ci/scripts/build-project-windows.bat +++ /dev/null @@ -1,3 +0,0 @@ -SET "JAVA_HOME=C:\opt\jdk-17" -cd git-repo -./mvnw clean install \ No newline at end of file diff --git a/ci/scripts/build-project.sh b/ci/scripts/build-project.sh deleted file mode 100755 index 2fbb4debfe..0000000000 --- a/ci/scripts/build-project.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -set -e - -source $(dirname $0)/common.sh -repository=$(pwd)/distribution-repository -if [ -z "$(ls -A maven)" ]; then - echo "Maven cache not available." -else - echo "Maven cache found." -fi -pushd git-repo > /dev/null -./mvnw clean deploy -U -Pfull -DaltDeploymentRepository=distribution::default::file://${repository} -popd > /dev/null diff --git a/ci/scripts/common.sh b/ci/scripts/common.sh deleted file mode 100644 index fbb889e63d..0000000000 --- a/ci/scripts/common.sh +++ /dev/null @@ -1,4 +0,0 @@ -source /opt/concourse-java.sh - -setup_symlinks -cleanup_maven_repo "io.spring.initializr" diff --git a/ci/scripts/generate-changelog.sh b/ci/scripts/generate-changelog.sh deleted file mode 100755 index d3d2b97e5d..0000000000 --- a/ci/scripts/generate-changelog.sh +++ /dev/null @@ -1,12 +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/' ) - -java -jar /github-changelog-generator.jar \ - --spring.config.location=${CONFIG_DIR}/changelog-generator.yml \ - ${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 bd1600191a..0000000000 --- a/ci/scripts/promote.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -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" -echo $version > version/version diff --git a/ci/scripts/stage.sh b/ci/scripts/stage.sh deleted file mode 100755 index 0e7adbd660..0000000000 --- a/ci/scripts/stage.sh +++ /dev/null @@ -1,39 +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=$( get_revision_from_pom ) -stageVersion=$( get_next_release $snapshotVersion) -nextVersion=$( bump_version_number $snapshotVersion) -echo "Staging $stageVersion (next version will be $nextVersion)" - -set_revision_to_pom "$stageVersion" -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 - -./mvnw clean deploy -U -Pfull -DaltDeploymentRepository=distribution::default::file://${repository} - -git reset --hard HEAD^ > /dev/null -if [[ $nextVersion != $snapshotVersion ]]; then - echo "Setting next development version (v$nextVersion)" - set_revision_to_pom "$nextVersion" - git add pom.xml > /dev/null - git commit -m"Next development version (v$nextVersion)" > /dev/null -fi; - -echo "DONE" - -popd > /dev/null diff --git a/ci/tasks/build-ci-image.yml b/ci/tasks/build-ci-image.yml deleted file mode 100644 index 5cb819ad15..0000000000 --- a/ci/tasks/build-ci-image.yml +++ /dev/null @@ -1,29 +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-name))/Dockerfile - DOCKER_HUB_AUTH: ((docker-hub-auth)) -run: - path: /bin/sh - args: - - "-c" - - | - mkdir -p /root/.docker - cat > /root/.docker/config.json <