Skip to content

Commit

Permalink
use git instead of github api to upload release.yaml file
Browse files Browse the repository at this point in the history
life is too short to spend so much time on this

Signed-off-by: Chmouel Boudjnah <[email protected]>
  • Loading branch information
chmouel committed Aug 22, 2023
1 parent dc310ca commit 0488f72
Showing 1 changed file with 14 additions and 17 deletions.
31 changes: 14 additions & 17 deletions .tekton/generate-coverage-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,23 +130,20 @@ spec:
echo -n "nightly,stable,"
for i in $(git tag -l | grep '^v' | sort -rn); do echo -n "$i,"; done | sed 's/,$//'
)
set +x # Do not show TOKEN in logs
echo python hack/upload-file-to-github.py --message "'Release yaml generated from {{repo_url}}/commit/{{revision}}'" \
--from-ref refs/heads/main --to-ref refs/heads/nightly \
--owner-repository openshift-pipelines/pipelines-as-code --token \$HUB_TOKEN \
-f release.k8s.yaml:release.k8s.yaml \
-f release.yaml:release.yaml \
-f nightly:docs/content/VERSION \
-f ${allversions}:docs/content/ALLVERSIONS \
-f "nightly-$ssa-$(date +%Y%m%d):pkg/params/version/version.txt"
python hack/upload-file-to-github.py --message "Release yaml generated from {{repo_url}}/commit/{{revision}}" \
--from-ref refs/heads/main --to-ref refs/heads/nightly \
--owner-repository openshift-pipelines/pipelines-as-code --token ${HUB_TOKEN} \
-f release.k8s.yaml:release.k8s.yaml \
-f release.yaml:release.yaml \
-f nightly:docs/content/VERSION \
-f ${allversions}:docs/content/ALLVERSIONS \
-f "nightly-$ssa-$(date +%Y%m%d):pkg/params/version/version.txt"
git checkout -B nightly origin/main
echo nightly > docs/content/VERSION
echo ${allversions} > docs/content/ALLVERSIONS
echo "nightly-$ssa-$(date +%Y%m%d)" > pkg/params/version/version.txt
git add release.yaml release.k8s.yaml docs/content/VERSION docs/content/ALLVERSIONS pkg/params/version/version.txt
git config --global user.email "[email protected]"
git config --global user.name "Pipelines as Code CI Robot"
git commit -m "Release yaml generated from {{repo_url}}/commit/{{revision}}"
set +x
echo git push "https://git:\[email protected]/{{ repo_owner }}/{{ repo_name }} nightly:nightly"
git push --force https://git:[email protected]/{{ repo_owner }}/{{ repo_name }}/ nightly:nightly
set -x
git checkout -
workspaces:
- name: source
workspaces:
Expand Down

0 comments on commit 0488f72

Please sign in to comment.