use explicit image tag

This commit is contained in:
Dr Nic Williams 2018-11-19 12:02:57 +10:00
parent 3c64702a51
commit aa5cf05b97
2 changed files with 17 additions and 9 deletions

View File

@ -84,6 +84,7 @@ groups:
jobs: jobs:
- name: latest-image - name: latest-image
public: true public: true
serial_groups: [test-image]
plan: plan:
- get: git - get: git
trigger: true trigger: true
@ -100,12 +101,13 @@ jobs:
- name: helm-test - name: helm-test
public: true public: true
serial_groups: [test-image] # to ensure :latest is what comes from image-latest above
plan: plan:
- aggregate: - aggregate:
- { get: git, trigger: true } - { get: git }
- { get: image-latest, params: {skip_download: true} } - { get: image-latest, params: {skip_download: true} }
# - { get: git, passed: [latest-image], trigger: true } # - { get: git, passed: [latest-image], trigger: true }
# - { get: image-latest, passed: [latest-image] } # - { get: image-latest, passed: [latest-image], params: {skip_download: true} }
- name: build-chart - name: build-chart
task: build-chart task: build-chart
config: config:
@ -131,7 +133,7 @@ jobs:
params: params:
chart: chart/*.tgz chart: chart/*.tgz
devel: true devel: true
wait_until_ready: 10 wait_until_ready: 60
- name: shipit - name: shipit
public: true public: true
@ -223,7 +225,7 @@ jobs:
- put: helm-install-latest - put: helm-install-latest
params: params:
chart: github/*.tgz chart: github/*.tgz
wait_until_ready: 10 wait_until_ready: 60
- name: rc - name: rc
public: true public: true

View File

@ -24,11 +24,17 @@ header() {
CHART_NAME=$(bosh int ${REPO_ROOT}/${CHART_ROOT}/Chart.yaml --path /name) CHART_NAME=$(bosh int ${REPO_ROOT}/${CHART_ROOT}/Chart.yaml --path /name)
header "Copy chart into folder with chart name ${CHART_NAME}..." header "Copy chart into folder with chart name ${CHART_NAME}..."
mkdir -p chart/${CHART_NAME}
cp -r ${REPO_ROOT}/${CHART_ROOT}/* chart/${CHART_NAME}
header "Set values.yaml for docker + version" mkdir -p build-chart/${CHART_NAME}
echo "TODO ****" cp -r ${REPO_ROOT}/${CHART_ROOT}/* build-chart/${CHART_NAME}
header "Use latest docker image"
tmpfile=$(mktemp /tmp/chart-yaml.XXXX)
sed -e "s/^ tag:.*$/ tag: latest/g" build-chart/${CHART_NAME}/values.yaml > $tmpfile
cp $tmpfile build-chart/${CHART_NAME}/values.yaml
header "Updated values.yaml"
cat build-chart/${CHART_NAME}/values.yaml
header "Build helm chart" header "Build helm chart"
helm package chart/${CHART_NAME} -d ${CHART_OUT} helm package build-chart/${CHART_NAME} -d ${CHART_OUT}