-
Notifications
You must be signed in to change notification settings - Fork 7
159 lines (125 loc) · 5.54 KB
/
create-bosh-release.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
name: Create Release
on:
workflow_dispatch:
# push:
# branches:
# - "187042013-release-workflow"
jobs:
acquire_binaries:
runs-on: ubuntu-latest
steps:
# - name: Acquire latest CF CLI V8 linux binary
# run: |
# curl -L "https://packages.cloudfoundry.org/stable?release=linux64-binary&version=v7&source=bosh-package-cf-cli-release-workflow" | tar -zx
# ./cf version
# - name: Acquire latest CF CLI V8 linux binary
# run: |
# curl -L -o linux-binary-v8.tgz "https://packages.cloudfoundry.org/stable?release=linux64-binary&version=v8&source=bosh-package-cf-cli-release-workflow"
# tar -xvzf linux-binary-v8.tgz --wildcards 'cf*'
# ./cf version
# - name: Acquire latest CF CLI V7 linux binary
# run: |
# curl -L -o linux-binary-v7.tgz "https://packages.cloudfoundry.org/stable?release=linux64-binary&version=v7&source=bosh-package-cf-cli-release-workflow"
# tar -xvzf linux-binary-v7.tgz --wildcards 'cf*'
# ./cf version
# - name: Acquire latest CF CLI V6 linux binary
# run: |
# curl -L -o linux-binary-v6.tgz "https://packages.cloudfoundry.org/stable?release=linux64-binary&version=v6&source=bosh-package-cf-cli-release-workflow"
# tar -xvzf linux-binary-v6.tgz --wildcards 'cf*'
# ./cf version
# - name: Store Linux Binaries
# uses: actions/upload-artifact@v4
# with:
# if-no-files-found: error
# name: cf-cli-linux-binaries
# path: cf[0-9]
bosh_release_create_candidate:
runs-on: ubuntu-latest
container:
image: 'cfcli/cli-release-base'
steps:
# - name: Get latest V8 release from github
# uses: dsaltares/fetch-gh-release-asset@master
# with:
# repo: 'dsaltares/godot-wild-jam-18'
# version: 'tags/v0.1.18'
# regex: true
# file: "plague-.*\\.zip"
# target: 'subdir/'
# token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout cli bosh release repo
uses: actions/checkout@v4
#- name: Install bosh cli
#env:
#BOSH_CLI_VERSION: ${{ vars.BOSH_CLI_VERSION }}
#run: |
#install_location=/usr/local/bin
## bosh_cli_artifact=bosh-cli-7.0.1-linux-amd64
## bbl_artifact=bbl-v8.4.110_linux_x86-64
## credhub_artifact=credhub-linux-2.9.4.tgz
## curl https://github.com/cloudfoundry/bosh-bootloader/releases/download/v8.4.110/${bbl_artifact} --silent --location --output $install_location/bbl
## chmod +x $install_location/bbl
## bbl --version
## curl https://s3.amazonaws.com/bosh-cli-artifacts/$bosh_cli_artifact --silent --output $install_location/bosh --location
## chmod +x $install_location/bosh
## bosh --version
## curl "https://storage.googleapis.com/bosh-cli-artifacts/bosh-cli-#{BOSH_CLI_VERSION:-7.0.1}-linux-amd64" --silent --output $install_location/bosh --location
## chmod +x $install_location/bosh
## bosh --version
#latest_bosh_url=$(curl -s https://api.github.com/repos/cloudfoundry/bosh-cli/releases/latest \
#| jq -r ".assets[] | select(.name | test(\"^bosh-cli-.*-linux-amd64$\")) | .browser_download_url")
#curl ${latest_bosh_url:?} --silent --output $install_location/bosh --location
#chmod +x $install_location/bosh
## curl https://github.com/cloudfoundry/credhub-cli/releases/download/2.9.4/$credhub_artifact --silent --output /tmp/$credhub_artifact --location
## tar xzvf /tmp/$credhub_artifact
## mv credhub $install_location/credhub
## chmod +x $install_location/credhub
## credhub --version
## apt-get update
## apt-get install -y build-essential
- name: Acquire latest CF CLI V8 linux binary
run: |
wget --trust-server-names "https://packages.cloudfoundry.org/stable?release=linux64-binary&version=v8&source=bosh-package-cf-cli-release-workflow"
tar -xvzf cf8-cli_*_linux_x86-64.tgz --wildcards 'cf*'
./cf version
- name: Create bosh release candidate
env:
AWS_REGION: ${{ vars.AWS_REGION }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
bosh --version
echo AWS_REGION: ${AWS_REGION:?}
echo AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID:?}
echo AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY:?}
OLD_V6_BLOB_PATH=$(bosh blobs --column=path | grep "cf-")
bosh blobs
bosh remove-blob $OLD_V6_BLOB_PATH
bosh blobs
echo bosh add-blob ../v6-cli-binary/cf-cli_${LATEST_V6_CLI_VERSION}_linux_x86-64.tgz cf-cli_${LATEST_V6_CLI_VERSION}_linux_x86-64.tgz
bosh upload-blobs
git config --global user.email [email protected]
git config --global user.name "CI Bot"
git add config/blobs.yml
git status
git commit -m "bump v6 cli to ${LATEST_V6_CLI_VERSION}"
echo else
echo "Release has latest v6 CLI version, skipping bump."
# git log -5
# # - name: |
# Test Bosh release
# - Claim Shepherd env
# - Deploy release candidate
# - Run tests
# - Unclaim Sheperd env
# run: echo hi
# - name: Finalize release
# run: echo hi
# - name: List artifacts
# run: |
# ls -lah
# - name: Setup upterm session
# # if: ${{ always() && runner.debug }}
# if: ${{ failure() }}
# uses: lhotari/action-upterm@v1
# timeout-minutes: 60