diff --git a/.gitignore b/.gitignore index 28422534..b12b164e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,4 @@ *.qcow2 pvs openshift.local.clusterup/ -common-templates.yaml +common-templates*.yaml diff --git a/.travis.yml b/.travis.yml index f6a8f2f5..5e53405d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,12 +32,12 @@ jobs: - stage: Build and Deploy name: Build and Deploy to GitHub before_script: skip - script: make common-templates.yaml + script: make release "VERSION=$TRAVIS_TAG" deploy: provider: releases api_key: secure: "TKxavkyq4h4xmH5hLCMbl2w9gceWh9InTY9xomxrZM8DkhLozjeUCRXn6YubnPnI9V23iemLHucUMV/mIwxT3m3iU+L6IwIdl1E1SdYKGwWUvW5ZfMjYI2A1NEVCiR7yyRoo0rhMd7v00gavgAY9UhUhIerR/CduFqbyfik/Qvy80m6+XZ1D099Em+4uWlzZ9qBVHSj7kdEbhDlV2rvqd9A6sA/qO+eg+jdzirB2T5sRvNs0eSpoKl2M1qPRBilbeA7DWXvkHsA5LJlOuNO0p6DW/+vqMxXpKBE1BsfQQzHReCCrSi0CkM+1uPzbKDPYKHXkWFfwQP8s6mZf4pPx2EVmiuZ7nKtB+y1hUoTnaIQs0IdsOMzPJvTNC+5DMnldMn1+8uDzIXrPkxfPCC6z9vc4eenuBWuNR/3SVzWkmoB+JpsvMNC2+rCX7SB8yy93T9PlfyOBRnckKzr2YZmxcArGvLzb+wVHwukzmIyQYLq4pxjgMhh1BWMdobLPYhTgj1s1pWqgNnam54bdK+OLVt72Xh0VHVtPSZHrmtyE5m+Ifzz+DUu9NKeCdgzxNq+KrOmf9q3xn8iUYPOIbbI67tmWYaQ/UB6nGd2Np2dOGlhfAFau11Q9d8X2U/IKBn0u725cj/a/yaRYzATSzd2xJo29BYE8I0KTJq5pVaTAMzg=" - file: "common-templates.yaml" + file: "common-templates-$TRAVIS_TAG.yaml" skip_cleanup: true name: $TRAVIS_TAG on: diff --git a/makefile b/makefile index 9ba6b776..70688b33 100644 --- a/makefile +++ b/makefile @@ -8,6 +8,9 @@ SOURCES=$(ALL_TEMPLATES) $(ALL_PRESETS) # i.e. fedora28 ALL_GUESTS=$(ALL_TEMPLATES:templates/%.yaml=%) +# Make sure the version is defined +VERSION=unknown + TEST_SYNTAX=$(ALL_GUESTS) TEST_UNIT=$(ALL_GUESTS) @@ -39,6 +42,9 @@ common-templates.yaml: $(SOURCES) done ; \ ) | tee $@ +release: common-templates.yaml + cp common-templates.yaml common-templates-$(VERSION).yaml + TRAVIS_FOLD_START=echo -e "travis_fold:start:details\033[33;1mDetails\033[0m" TRAVIS_FOLD_END=echo -e "\ntravis_fold:end:details\r" @@ -119,4 +125,4 @@ rhel75.raw: centos7.raw clean: rm -v *.raw *.qcow2 -.PHONY: all test common-templates.yaml +.PHONY: all test release common-templates.yaml