-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathup.sh
executable file
·59 lines (53 loc) · 1.49 KB
/
up.sh
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
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
if ! [ -d state/ ]; then
exit "No State, exiting"
exit 1
fi
source state/env.sh
true ${CONCOURSE_TEAM:?"!"}
true ${CONCOURSE_USERNAME:?"!"}
true ${CONCOURSE_PASSWORD:?"!"}
true ${CONCOURSE_DEV_PIPELINE:?"!"}
true ${CF_API_URL:?"!"}
true ${CF_USERNAME:?"!"}
true ${CF_PASSWORD:?"!"}
true ${CF_ORG:?"!"}
true ${CF_SPACE:?"!"}
true ${PIPELINE_REPO_URL:?"!"}
true ${PIPELINE_REPO_PRIVATE_KEY:?"!"}
true ${GITHUB_RELEASE_OWNER:?"!"}
true ${GITHUB_RELEASE_REPO:?"!"}
true ${GITHUB_RELEASE_TOKEN:?"!"}
mkdir -p bin
PATH=$(pwd)/bin:$PATH
if ! [ -f bin/fly ]; then
curl -L "https://$DOMAIN/api/v1/cli?arch=amd64&platform=darwin" > bin/fly
chmod +x bin/fly
fi
fly login \
--target $CONCOURSE_TARGET \
--concourse-url "https://$DOMAIN" \
--team-name $CONCOURSE_TEAM \
--username $CONCOURSE_USERNAME \
--password $CONCOURSE_PASSWORD \
;
fly set-pipeline \
--target $CONCOURSE_TARGET \
--pipeline $CONCOURSE_DEV_PIPELINE \
-v cf_api_url="$CF_API_URL" \
-v cf_username="$CF_USERNAME" \
-v cf_password="$CF_PASSWORD" \
-v cf_org="$CF_ORG" \
-v cf_space="$CF_SPACE" \
-v pipeline_repo_url="$PIPELINE_REPO_URL" \
-v pipeline_repo_private_key="$PIPELINE_REPO_PRIVATE_KEY" \
-v quorum_pcf_repo_url="$QUORUM_PCF_REPO_URL" \
-v github_release_owner="$GITHUB_RELEASE_OWNER" \
-v github_release_repo="$GITHUB_RELEASE_REPO" \
-v github_release_token="$GITHUB_RELEASE_TOKEN" \
--config quorum-pipeline/pipeline.yml \
--non-interactive \
;