concourse-ci CHANGELOG
======================
+0.2.7
+-----
+- adds the `fly_prune_workers_main` script.
+
0.2.6
-----
- fixes format version detection of a local `docker-compose.yml`.
---
-# $ fly -t target sp -p concourse-ci-cookbook -c concourse.yml -l fly-vars.yml -l ~/sec/credentials-prod.yml
+# $ fly -t $CC_TARGET sp -p concourse-ci-cookbook -c concourse.yml -l fly-vars.yml -l ~/sec/credentials-prod.yml
resources:
- name: src-git
type: git
ca_certs:
- domain: ((registry-mirror-domain)) # e.g. registry.docker.example.com:5000
cert: ((docker-reg-ca-cert))
- check_every: 12h # default: 1m
+ check_every: 6h # default: 1m
jobs:
- name: test-cookbook
end
external_url = web_envs_org['CONCOURSE_EXTERNAL_URL']
-web_envs['CONCOURSE_EXTERNAL_URL'] = "http://#{node['ipaddress']}:8080" if external_url.nil?
+external_url = "http://#{node['ipaddress']}:8080" if external_url.nil?
+web_envs['CONCOURSE_EXTERNAL_URL'] = external_url
data_source = web_envs_org['CONCOURSE_POSTGRES_DATA_SOURCE']
# for backward compatibility.
mode '0600'
end
+template "#{bin_dir}/fly_prune_workers_main" do
+ source 'opt/docker-compose/app/concourse/bin/fly_prune_workers_main'
+ owner 'root'
+ group 'root'
+ mode '0755'
+ action :create
+ variables(
+ external_url: external_url
+ )
+end
+
log <<-"EOM"
Note: You must execute the following command manually.
See #{doc_url}
--- /dev/null
+#!/usr/bin/env bash
+
+PATH=.:/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin:`dirname $0`
+
+if [ `whoami` != 'root' ]; then
+ echo 'ERROR: This script requires the root privilege.'
+ exit 1
+fi
+
+. <%= node['concourse-ci']['docker-compose']['app_dir'] %>/.env
+
+fly login -t main -u concourse -p $CONCOURSE_BASIC_AUTH_PASSWORD -c <%= @external_url %>
+fly_prune_workers -t main
target=''
usage() {
- echo 'Usage: prune_workers -t target'
+ echo 'Usage: prune_workers -t $CC_TARGET'
echo
echo "Options:"
echo " -h: this help."