File tree Expand file tree Collapse file tree 4 files changed +28
-18
lines changed
tasks/create-bosh-deployment-source-file
dockerfiles/cf-deployment-concourse-tasks-bbl-dev Expand file tree Collapse file tree 4 files changed +28
-18
lines changed Original file line number Diff line number Diff line change @@ -78,12 +78,17 @@ RUN curl -s https://api.github.com/repos/cloudfoundry/credhub-cli/releases/lates
78
78
mv credhub-* /usr/local/bin/credhub && \
79
79
chmod +x /usr/local/bin/credhub
80
80
81
- RUN go install github.com/pivotal-cf/texplate@latest
82
-
83
81
# Install yq
84
82
RUN wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq && \
85
83
chmod +x /usr/bin/yq
86
84
85
+ # Install ytt
86
+ RUN curl -s https://api.github.com/repos/carvel-dev/ytt/releases/latest | \
87
+ jq -r '.assets[] | .browser_download_url | select(contains("linux-amd64"))' | \
88
+ xargs wget && \
89
+ mv ytt-* /usr/local/bin/ytt && \
90
+ chmod +x /usr/local/bin/ytt
91
+
87
92
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
88
93
unzip awscliv2.zip && ./aws/install
89
94
Original file line number Diff line number Diff line change 1
1
---
2
- target : {{ env "TARGET" }}
3
- client : {{ env "CLIENT" }}
4
- client_secret : {{ env "CLIENT_SECRET" }}
5
- ca_cert : {{ toJson (env "CA_CERT") }}
6
- jumpbox_url : {{ env "JUMPBOX_URL" }}:22
7
- jumpbox_ssh_key : {{ toJson (env "JUMPBOX_SSH_KEY") }}
2
+ # @ load("@ytt:data", "data")
3
+ target : # @ data.values.TARGET
4
+ client : # @ data.values.CLIENT
5
+ client_secret : # @ data.values.CLIENT_SECRET
6
+ ca_cert : # @ data.values.CA_CERT
7
+ jumpbox_url : # @ data.values.JUMPBOX_URL + ":22"
8
+ jumpbox_ssh_key : # @ data.values.JUMPBOX_SSH_KEY
Original file line number Diff line number Diff line change @@ -7,15 +7,15 @@ function main() {
7
7
source_file=" ${ROOT} /source-file/bosh-source.json"
8
8
9
9
pushd " ${ROOT} /bbl-states/${BBL_STATE_DIR} " > /dev/null
10
- export TARGET =" $( bbl director-address) "
11
- export CLIENT =" $( bbl director-username) "
12
- export CLIENT_SECRET =" $( bbl director-password) "
13
- export CA_CERT =" $( bbl director-ca-cert) "
14
- export JUMPBOX_URL =" $( bbl jumpbox-address) "
15
- export JUMPBOX_SSH_KEY =" $( bbl ssh-key) "
10
+ export YTT_TARGET =" $( bbl director-address) "
11
+ export YTT_CLIENT =" $( bbl director-username) "
12
+ export YTT_CLIENT_SECRET =" $( bbl director-password) "
13
+ export YTT_CA_CERT =" $( bbl director-ca-cert) "
14
+ export YTT_JUMPBOX_URL =" $( bbl jumpbox-address) "
15
+ export YTT_JUMPBOX_SSH_KEY =" $( bbl ssh-key) "
16
16
popd > /dev/null
17
17
18
- texplate execute " ${ROOT} /bbl-ci/ci/tasks/create-bosh-deployment-source-file/source-template.yml" -o json > " ${source_file} "
18
+ ytt -f " ${ROOT} /bbl-ci/ci/tasks/create-bosh-deployment-source-file/source-template.yml" --data-values-env YTT > " ${source_file} "
19
19
}
20
20
21
21
main
Original file line number Diff line number Diff line change 1
1
FROM cloudfoundry/cf-deployment-concourse-tasks
2
- MAINTAINER https://github.com/cloudfoundry/bosh-bootloader
2
+ LABEL maintainer= " https://github.com/cloudfoundry/bosh-bootloader"
3
3
4
4
# Create directory for GOPATH
5
5
RUN mkdir -p /go/bin
@@ -26,8 +26,12 @@ RUN echo "deb https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /et
26
26
apt-get update && \
27
27
apt-get -qqy install google-cloud-cli
28
28
29
- # needed in the task 'create-bosh-source-file'
30
- RUN go install github.com/pivotal-cf/texplate@latest
29
+ # Install ytt
30
+ RUN curl -s https://api.github.com/repos/carvel-dev/ytt/releases/latest | \
31
+ jq -r '.assets[] | .browser_download_url | select(contains("linux-amd64"))' | \
32
+ xargs wget && \
33
+ mv ytt-* /usr/local/bin/ytt && \
34
+ chmod +x /usr/local/bin/ytt
31
35
32
36
# add bbl from latest commit
33
37
ADD bbl /usr/local/bin/
You can’t perform that action at this time.
0 commit comments