-
Notifications
You must be signed in to change notification settings - Fork 29
feat: release pipeline #97
base: main
Are you sure you want to change the base?
Changes from all commits
e1faf22
336cd9d
2a2c9cb
eca874e
5cc6a2e
62467fd
c556f24
3be7661
e5016d7
0c3b8ed
dfc6a8a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -103,6 +103,72 @@ resources: | |
json_key: ((concourse-gcs-resources-service-account-key)) | ||
regexp: server/published/gpdb6/server-rc-(.*)-ubuntu18.04_x86_64.tar.gz | ||
|
||
|
||
# For uploading to the dev bucket | ||
# For uploading every build to gcs | ||
# Dev | ||
- name: bin_greenplumpython_rhel7_intermediates | ||
type: gcs | ||
source: | ||
bucket: gpdb-extensions-concourse-resources | ||
json_key: ((extension/extensions-gcs-service-account-key)) | ||
versioned_file: intermediates/greenplumpython/greenplumpython_rhel7_gpdb6.tar.gz | ||
|
||
- name: bin_greenplumpython_rhel8_intermediates | ||
type: gcs | ||
source: | ||
bucket: gpdb-extensions-concourse-resources | ||
json_key: ((extension/extensions-gcs-service-account-key)) | ||
versioned_file: intermediates/greenplumpython/greenplumpython_rhel8_gpdb6.tar.gz | ||
|
||
- name: bin_greenplumpython_ubuntu18_intermediates | ||
type: gcs | ||
source: | ||
bucket: gpdb-extensions-concourse-resources | ||
json_key: ((extension/extensions-gcs-service-account-key)) | ||
versioned_file: intermediates/greenplumpython/greenplumpython_ubuntu18_gpdb6.tar.gz | ||
|
||
# Release | ||
- name: bin_greenplumpython_rhel7_intermediates_rel | ||
type: gcs | ||
source: | ||
bucket: gpdb-extensions-concourse-resources | ||
json_key: ((extension/extensions-gcs-service-account-key)) | ||
versioned_file: intermediates_release/greenplumpython/greenplumpython_rhel7_gpdb6.tar.gz | ||
- name: bin_greenplumpython_rhel8_intermediates_rel | ||
type: gcs | ||
source: | ||
bucket: gpdb-extensions-concourse-resources | ||
json_key: ((extension/extensions-gcs-service-account-key)) | ||
versioned_file: intermediates_release/greenplumpython/greenplumpython_rhel8_gpdb6.tar.gz | ||
- name: bin_greenplumpython_ubuntu18_intermediates_rel | ||
type: gcs | ||
source: | ||
bucket: gpdb-extensions-concourse-resources | ||
json_key: ((extension/extensions-gcs-service-account-key)) | ||
versioned_file: intermediates_release/greenplumpython/greenplumpython_ubuntu18.04_gpdb6.tar.gz | ||
|
||
|
||
# For uploading to the release bucket | ||
- name: bin_greenplumpython_rhel7_release | ||
type: gcs | ||
source: | ||
bucket: pivotal-gpdb-concourse-resources-prod | ||
json_key: ((concourse-gcs-resources-service-account-key)) | ||
regexp: greenplumpython/released/greenplumpython-(.*).tar.gz | ||
- name: bin_greenplumpython_rhel8_release | ||
type: gcs | ||
source: | ||
bucket: pivotal-gpdb-concourse-resources-prod | ||
json_key: ((concourse-gcs-resources-service-account-key)) | ||
regexp: greenplumpython/released/greenplumpython-(.*).tar.gz | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should not be |
||
- name: bin_greenplumpython_ubuntu18_release | ||
type: gcs | ||
source: | ||
bucket: pivotal-gpdb-concourse-resources-prod | ||
json_key: ((concourse-gcs-resources-service-account-key)) | ||
regexp: greenplumpython/released/greenplumpython-(.*).tar.gz | ||
|
||
# plpython3 for gpdb6 | ||
- name: bin_plpython3_gpdb6_rhel7 | ||
type: gcs | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,6 +56,27 @@ on_error: | |
alert_type: errored | ||
#@ end | ||
|
||
#! Release trigger. For dev pipelines. No webhook | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Is the comment correct? |
||
#@ def release_trigger(res_map): | ||
#@ add_res_by_name(res_map, "greenplumpython_commit") | ||
#@ add_res_by_name(res_map, "greenplumpython_release") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are line 61 & 62 needed? |
||
auto_trigger: true | ||
to_get: | ||
- get: greenplumpython_src | ||
resource: greenplumpython_commit | ||
to_put_pre: #@ [] | ||
to_put_post: | ||
- put: greenplumpython_commit | ||
params: | ||
repository: greenplumpython_src | ||
tag: greenplumpython_src/VERSION | ||
#! To set the github commit status, https://github.com/Pix4D/cogito is a good choice. | ||
#! Unfortunately it doesn't work with Concourse 5. | ||
on_success: | ||
on_failure: | ||
on_error: | ||
#@ end | ||
|
||
#! Commit trigger. For dev pipelines. No webhook | ||
#@ def commit_dev_trigger(res_map): | ||
#@ add_res_by_name(res_map, "greenplumpython_commit_dev") | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -161,13 +161,12 @@ setup_gpadmin_bashrc | |
# Do the special setup with root permission for the each task, then run the real task script with | ||
# gpadmin. bashrc won't be read by 'su', it needs to be sourced explicitly. | ||
case "$1" in | ||
test) | ||
|
||
test_and_build) | ||
# To make fly debug easier | ||
su gpadmin -c \ | ||
"source /home/gpadmin/.bashrc &&\ | ||
/home/gpadmin/greenplumpython_src/concourse/scripts/test.sh" | ||
;; | ||
/home/gpadmin/greenplumpython_src/concourse/scripts/test_and_build.sh" | ||
;; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. spaces at the end should be removed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Just as thorough as back in the days. 😉 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I am a heartless tail-space-finding machine. |
||
*) | ||
echo "Unknown target task $1" | ||
exit 1 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash -l | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes |
||
|
||
set -exo pipefail | ||
|
||
function _main() { | ||
# FIXME: The test db and extension creation should be handled by python code. | ||
createdb gpadmin | ||
psql gpadmin -c "CREATE LANGUAGE plpython3u;" | ||
|
||
# Run testing | ||
pushd /home/gpadmin/greenplumpython_src | ||
unset PYTHONPATH | ||
unset PYTHONHOME | ||
tox -e test_py39 | ||
# build wheel | ||
pip3 wheel . -w ../greenplumpython_artifacts | ||
popd | ||
tar -czf greenplumpython_artifacts/greenplumpython.tar.gz greenplumpython_artifacts/*.whl | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So user needs to install There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what will be the full name of the wheel file on different platforms? On my arch, it is:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we do a simple test here? Just install the wheel and do a |
||
} | ||
|
||
_main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this won't work since the unpacked file will be a
.whl
fileYou could change the release bucket and test it.