Skip to content

Commit d347393

Browse files
Abel Salgado Romerospikymonkey
authored andcommitted
Remove Bintray from release pipelines
1 parent eaa00d0 commit d347393

File tree

14 files changed

+57
-188
lines changed

14 files changed

+57
-188
lines changed

ci/config-concourse.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1+
artifactory-server: https://repo.spring.io
2+
build-name: spring-cloud-app-broker
13
ab-slack-success-channel: "#sc-app-broker"
24
ab-slack-failure-channel: "#sc-app-broker"
35

4-
bintray-distribution-repo: spring-cloud-app-broker
5-
bintray-package: spring-cloud-app-broker
6-
bintray-repo: jars
7-
bintray-subject: spring
8-
build-name: spring-cloud-app-broker
6+
7+

ci/config/release-scripts.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
logging:
2+
level:
3+
io.spring.concourse: DEBUG
4+
spring:
5+
main:
6+
banner-mode: off
7+
sonatype:
8+
exclude:
9+
- 'build-info\.json'
10+
- '.*\.zip'

ci/images/app-broker-ci/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ ENV JAVA_HOME /opt/openjdk
1212
ENV PATH $JAVA_HOME/bin:$PATH
1313
RUN mkdir -p /opt/openjdk && \
1414
cd /opt/openjdk && \
15-
curl -L https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u192-b12/OpenJDK8U-jdk_x64_linux_hotspot_8u192b12.tar.gz | tar xz --strip-components=2
15+
curl -L https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u292-b10/OpenJDK8U-jdk_x64_linux_hotspot_8u292b10.tar.gz | tar xz --strip-components=1
1616

17-
ADD https://raw.githubusercontent.com/spring-io/concourse-java-scripts/v0.0.3/concourse-java.sh /opt/
18-
ADD https://repo.spring.io/libs-release/io/spring/concourse/releasescripts/concourse-release-scripts/0.3.2/concourse-release-scripts-0.3.2.jar /opt/
17+
ADD https://raw.githubusercontent.com/spring-io/concourse-java-scripts/v0.0.4/concourse-java.sh /opt/
18+
ADD https://repo.spring.io/libs-release/io/spring/concourse/releasescripts/concourse-release-scripts/0.3.3/concourse-release-scripts-0.3.3.jar /opt/
1919

2020
RUN cd /usr/local/bin && curl -L https://github.com/cloudfoundry-incubator/credhub-cli/releases/download/2.9.0/credhub-linux-2.9.0.tgz | tar xz
2121

22-
RUN curl -L https://github.com/cloudfoundry/bosh-bootloader/releases/download/v8.4.40/bbl-v8.4.40_linux_x86-64 --output /usr/local/bin/bbl && \
22+
RUN curl -L https://github.com/cloudfoundry/bosh-bootloader/releases/download/v8.4.43/bbl-v8.4.43_linux_x86-64 --output /usr/local/bin/bbl && \
2323
chmod +x /usr/local/bin/bbl
2424

25-
RUN curl -L https://github.com/cloudfoundry/bosh-cli/releases/download/v6.4.3/bosh-cli-6.4.3-linux-amd64 --output /usr/local/bin/bosh && \
25+
RUN curl -L https://github.com/cloudfoundry/bosh-cli/releases/download/v6.4.4/bosh-cli-6.4.4-linux-amd64 --output /usr/local/bin/bosh && \
2626
chmod +x /usr/local/bin/bosh

ci/pipeline.yml

Lines changed: 4 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,8 @@ jobs:
4444
build_uri: "${ATC_EXTERNAL_URL}/teams/${BUILD_TEAM_NAME}/pipelines/${BUILD_PIPELINE_NAME}/jobs/${BUILD_JOB_NAME}/builds/${BUILD_NAME}"
4545
build_number: "${BUILD_PIPELINE_NAME}-${BUILD_JOB_NAME}-${BUILD_NAME}"
4646
disable_checksum_uploads: true
47-
artifact_set:
48-
- include:
49-
- "/**/spring-cloud-app-broker-*-docs.zip"
50-
properties:
51-
"zip.type": "docs"
52-
"zip.deployed": "false"
47+
on_failure:
48+
*slack-failure-notification
5349

5450
- name: run-acceptance-tests
5551
serial: true
@@ -81,7 +77,6 @@ jobs:
8177
serial: true
8278
plan:
8379
- get: git-repo
84-
trigger: false
8580
passed: [run-acceptance-tests]
8681
- task: stage
8782
file: git-repo/ci/tasks/stage.yml
@@ -100,7 +95,6 @@ jobs:
10095
serial: true
10196
plan:
10297
- get: git-repo
103-
trigger: false
10498
passed: [run-acceptance-tests]
10599
- task: stage
106100
file: git-repo/ci/tasks/stage.yml
@@ -119,7 +113,6 @@ jobs:
119113
serial: true
120114
plan:
121115
- get: git-repo
122-
trigger: false
123116
passed: [run-acceptance-tests]
124117
- task: stage
125118
file: git-repo/ci/tasks/stage.yml
@@ -138,9 +131,7 @@ jobs:
138131
serial: true
139132
plan:
140133
- get: git-repo
141-
trigger: false
142134
- get: artifactory-repo
143-
trigger: false
144135
passed: [stage-milestone]
145136
params:
146137
save_build_info: true
@@ -155,9 +146,7 @@ jobs:
155146
plan:
156147
- in_parallel:
157148
- get: git-repo
158-
trigger: false
159149
- get: artifactory-repo
160-
trigger: false
161150
passed: [stage-rc]
162151
params:
163152
save_build_info: true
@@ -172,9 +161,7 @@ jobs:
172161
plan:
173162
- in_parallel:
174163
- get: git-repo
175-
trigger: false
176164
- get: artifactory-repo
177-
trigger: false
178165
passed: [stage-release]
179166
params:
180167
save_build_info: true
@@ -184,51 +171,26 @@ jobs:
184171
release-type: RELEASE
185172
ci-image-tag: ((ci-image-tag))
186173

187-
- name: distribute-release
188-
serial: true
189-
plan:
190-
- in_parallel:
191-
- get: git-repo
192-
trigger: false
193-
- get: artifactory-repo
194-
trigger: false
195-
passed: [promote-release]
196-
params:
197-
save_build_info: true
198-
- task: distribute
199-
file: git-repo/ci/tasks/distribute.yml
200-
vars:
201-
ci-image-tag: ((ci-image-tag))
202-
bintray-distribution-repo: ((bintray-distribution-repo))
203-
bintray-package: ((bintray-package))
204-
bintray-repo: ((bintray-repo))
205-
bintray-subject: ((bintray-subject))
206-
207174
- name: sync-to-maven-central
208175
serial: true
209176
plan:
210177
- in_parallel:
211178
- get: git-repo
212-
trigger: false
213179
- get: artifactory-repo
214-
trigger: false
215-
passed: [distribute-release]
180+
passed: [promote-release]
216181
params:
217182
save_build_info: true
218183
- task: sync-to-maven-central
219184
file: git-repo/ci/tasks/sync-to-maven-central.yml
220185
vars:
221186
ci-image-tag: ((ci-image-tag))
222-
bintray-package: ((bintray-package))
223-
bintray-repo: ((bintray-repo))
224-
bintray-subject: ((bintray-subject))
225187

226188
resource_types:
227189
- name: artifactory-resource
228190
type: registry-image
229191
source:
230192
repository: ((dockerhub-mirror-registry))/springio/artifactory-resource
231-
tag: 0.0.12
193+
tag: 0.0.14
232194

233195
- name: slack-notification
234196
type: registry-image
@@ -313,7 +275,6 @@ groups:
313275
jobs:
314276
- stage-release
315277
- promote-release
316-
- distribute-release
317278
- sync-to-maven-central
318279
- name: "ci-images"
319280
jobs:

ci/scripts/distribute.sh

Lines changed: 0 additions & 52 deletions
This file was deleted.

ci/scripts/promote.sh

Lines changed: 6 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,13 @@
11
#!/bin/bash
2-
set -e
2+
set -euo pipefail
33

44
# shellcheck source=scripts/common.sh
5-
source "$(dirname "$0")/common.sh"
5+
source $(dirname $0)/common.sh
66

7-
buildName=$(cat artifactory-repo/build-info.json | jq -r '.buildInfo.name')
8-
buildNumber=$(cat artifactory-repo/build-info.json | jq -r '.buildInfo.number')
9-
version=$(cat artifactory-repo/build-info.json | jq -r '.buildInfo.modules[0].id' | sed 's/.*:.*:\(.*\)/\1/')
7+
version=$( cat artifactory-repo/build-info.json | jq -r '.buildInfo.modules[0].id' | sed 's/.*:.*:\(.*\)/\1/' )
8+
export BUILD_INFO_LOCATION=$(pwd)/artifactory-repo/build-info.json
109

11-
if [[ $RELEASE_TYPE == "M" ]]; then
12-
targetRepo="libs-milestone-local"
13-
elif [[ $RELEASE_TYPE == "RC" ]]; then
14-
targetRepo="libs-milestone-local"
15-
elif [[ $RELEASE_TYPE == "RELEASE" ]]; then
16-
targetRepo="libs-release-local"
17-
else
18-
echo "Unknown release type $RELEASE_TYPE" >&2
19-
exit 1
20-
fi
21-
22-
echo "Promoting ${buildName}/${buildNumber} to ${targetRepo}"
23-
24-
curl \
25-
-s \
26-
--connect-timeout 240 \
27-
--max-time 900 \
28-
-u "${ARTIFACTORY_USERNAME}":"${ARTIFACTORY_PASSWORD}" \
29-
-H "Content-type:application/json" \
30-
-d "{\"status\": \"staged\", \"sourceRepo\": \"libs-staging-local\", \"targetRepo\": \"${targetRepo}\"}" \
31-
-f \
32-
-X \
33-
POST "${ARTIFACTORY_SERVER}/api/build/promote/${buildName}/${buildNumber}" >/dev/null || {
34-
echo "Failed to promote" >&2
35-
exit 1
36-
}
10+
java -jar /opt/concourse-release-scripts*.jar promote $RELEASE_TYPE $BUILD_INFO_LOCATION
3711

3812
echo "Promotion complete"
39-
echo $version >version/version
13+
echo $version > version/version
Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,11 @@
11
#!/bin/bash
2-
set -e
2+
set -euo pipefail
33

4-
buildName=$(cat artifactory-repo/build-info.json | jq -r '.buildInfo.name')
5-
buildNumber=$(cat artifactory-repo/build-info.json | jq -r '.buildInfo.number')
6-
version=$(cat artifactory-repo/build-info.json | jq -r '.buildInfo.modules[0].id' | sed 's/.*:.*:\(.*\)/\1/')
4+
readonly BUILD_INFO_LOCATION="$(pwd)/artifactory-repo/build-info.json"
5+
readonly CONFIG_DIR="$(pwd)/git-repo/ci/config"
6+
7+
java -jar /opt/concourse-release-scripts*.jar \
8+
--spring.config.location="${CONFIG_DIR}/release-scripts.yml" \
9+
publishToCentral 'RELEASE' "$BUILD_INFO_LOCATION" "artifactory-repo"
710

8-
echo "Syncing ${buildName}/${buildNumber} to Maven Central"
9-
curl \
10-
-s \
11-
--connect-timeout 240 \
12-
--max-time 2700 \
13-
-u "${BINTRAY_USERNAME}":"${BINTRAY_API_KEY}" \
14-
-H "Content-Type: application/json" -d "{\"username\": \"${SONATYPE_USER_TOKEN}\", \"password\": \"${SONATYPE_PASSWORD_TOKEN}\"}" \
15-
-f \
16-
-X \
17-
POST "https://api.bintray.com/maven_central_sync/${BINTRAY_SUBJECT}/${BINTRAY_REPO}/${BINTRAY_PACKAGE}/versions/${version}" >/dev/null || {
18-
echo "Failed to sync" >&2
19-
exit 1
20-
}
2111
echo "Sync complete"

ci/tasks/acceptance-tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ image_resource:
44
type: registry-image
55
source:
66
repository: ((corporate-harbor-registry))/((dockerhub-organization))/app-broker-ci
7+
username: ((corporate-harbor-robot-account.username))
8+
password: ((corporate-harbor-robot-account.password))
79
tag: ((ci-image-tag))
810
inputs:
911
- name: git-repo

ci/tasks/build-project.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ image_resource:
44
type: registry-image
55
source:
66
repository: ((corporate-harbor-registry))/((dockerhub-organization))/app-broker-ci
7+
username: ((corporate-harbor-robot-account.username))
8+
password: ((corporate-harbor-robot-account.password))
79
tag: ((ci-image-tag))
810
inputs:
911
- name: git-repo
@@ -15,5 +17,5 @@ caches:
1517
run:
1618
path: git-repo/ci/scripts/build-project.sh
1719
params:
18-
ONLY_SHOW_STANDARD_STREAMS_ON_TEST_FAILURE: true
19-
SKIP_TESTS: false
20+
ARTIFACTORY_USERNAME: ((artifactory-username))
21+
ARTIFACTORY_PASSWORD: ((artifactory-password))

ci/tasks/distribute.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)