forked from cloudfoundry/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
152 lines (125 loc) · 4.19 KB
/
Copy pathtest.yml
File metadata and controls
152 lines (125 loc) · 4.19 KB
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
name: "Test"
permissions:
contents: write
defaults:
run:
shell: bash
on:
workflow_dispatch:
jobs:
test-deb:
name: Test Debian Repository
strategy:
matrix:
image:
- debian:13
- debian:12
- debian:11
- ubuntu:latest
runs-on: ubuntu-latest
env:
CLAW_URL: https://packages.cloudfoundry.org
VERSION_BUILD: 8.16.0
VERSION_MAJOR: 8
steps:
- name: Install CF CLI via apt
env:
IMAGE: ${{ matrix.image }}
run: |
docker run \
--interactive \
--rm \
${IMAGE} <<EOC
set -o pipefail -e
apt update
apt install -y wget gnupg curl
wget -q -O - ${CLAW_URL}/debian/cli.cloudfoundry.org.key | gpg --dearmor -o /usr/share/keyrings/cloudfoundry-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/cloudfoundry-keyring.gpg] ${CLAW_URL}/debian stable main" | tee /etc/apt/sources.list.d/cloudfoundry-cli.list
# curl -fsSL https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | gpg --dearmor -o /usr/share/keyrings/cloudfoundry-keyring.gpg
# echo "deb [signed-by=/usr/share/keyrings/cloudfoundry-keyring.gpg] https://packages.cloudfoundry.org/debian stable main" | tee /etc/apt/sources.list.d/cloudfoundry.list
# wget -q -O - ${CLAW_URL}/debian/cli.cloudfoundry.org.key | apt-key add -
# echo "deb ${CLAW_URL}/debian stable main" | tee /etc/apt/sources.list.d/cloudfoundry-cli.list
# wget -q -O - ${CLAW_URL}/debian/cli.cloudfoundry.org.key | gpg --dearmor
# echo "deb ${CLAW_URL}/debian stable main" | tee /etc/apt/sources.list.d/cloudfoundry-cli.list
apt update
apt install -y cf${VERSION_MAJOR}-cli
which cf
set -x
cf -v
cf${VERSION_MAJOR} -v
cf -v | grep "${VERSION_BUILD}"
EOC
test-aws-access:
name: AWS access
runs-on: ubuntu-latest
if: false
steps:
- name: Setup aws to upload installers to CLAW S3 bucket
uses: aws-actions/configure-aws-credentials@v4
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_S3_ROLE_ARN: ${{ secrets.AWS_S3_ROLE_ARN }}
with:
aws-access-key-id: ${{ env.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ env.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-1
role-to-assume: ${{ env.AWS_S3_ROLE_ARN }}
role-skip-session-tagging: true
role-duration-seconds: 1200
- name: Upload installers to CLAW S3 bucket
run: |
pwd
pwd > test123.txt
aws s3 cp test123.txt "s3://cf-cli-dev/"
- name: list S3 for human verification
run: aws s3 ls "s3://cf-cli-dev/"
- name: debug
if: always()
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_S3_ROLE_ARN: ${{ secrets.AWS_S3_ROLE_ARN }}
uses: mxschmitt/action-tmate@v3
create-draft-release:
name: Draft release
if: false
runs-on: ubuntu-latest
steps:
- name: Checkout cli
uses: actions/checkout@v4
- name: Create draft release
if: false
uses: softprops/action-gh-release@v2
with:
draft: true
name: "DRAFT test"
tag_name: "vTest"
fail_on_unmatched_files: true
generate_release_notes: true
files: |
Makefile
README.md
CLAW-access:
name: Test CLAW access
runs-on: ubuntu-latest
if: false
steps:
- name: Checkout CLAW
uses: actions/checkout@v4
with:
repository: cloudfoundry/CLAW
ref: test-release-update
path: CLAW
ssh-key: ${{ secrets.GIT_CLI_BOT_SSH_KEY }}
- name: Add new version to claw variables
run: |
set -ex
pushd CLAW
pwd >> test123.txt
git add test123.txt
git config user.name cf-cli-eng
git config user.email cf-cli-eng@pivotal.io
git commit -m "Add test file"
git push
popd