Bug 1408879
| Summary: | OPENSHIFT_BUILD_COMMIT env is not set on manual builds | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Eric Rich <erich> |
| Component: | Build | Assignee: | Ben Parees <bparees> |
| Status: | CLOSED ERRATA | QA Contact: | Wang Haoran <haowang> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 3.3.1 | CC: | aos-bugs, dlbewley, dyan, tdawson, wzheng |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
Cause: Different code paths for retrieving and setting the commit information.
Consequence: OPENSHIFT_BUILD_COMMIT env variable is only set in the output image when the build is triggered by a webhook.
Fix: Use a common code path for retrieving and setting the commit information so it is always available to be added to the image.
Result: OPENSHIFT_BUILD_COMMIT env variable is always present in the output image.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-04-12 19:08:18 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Eric Rich
2016-12-27 22:51:18 UTC
Ben assigning to you, since you are assigned the origin issue we should be adding the commit information in a consistent way:
clone the git repo
check out the requested commit/ref (if any, otherwise master)
check what the current commit information is
apply that commit information as labels/env/etc.
i'm guessing this is currently broken because the ENV comes from the webhook info and the label comes from the flow I just described.
Verified openshift v1.5.0-alpha.1+15872c0-61 kubernetes v1.4.0+776c994 etcd 3.1.0-rc.0 devenv-centos7_5644 (ami-8fc12599) docker build logs: Step 13 : ENV "OPENSHIFT_BUILD_NAME" "ruby-sample-build-1" "OPENSHIFT_BUILD_NAMESPACE" "dyan" "OPENSHIFT_BUILD_SOURCE" "git://github.com/openshift/ruby-hello-world.git" "OPENSHIFT_BUILD_COMMIT" "e79d8870be808a7abb4ab304e94c8bee69d909c6" ---> Running in a674847812b0 ---> a6fed1ff2c15 Removing intermediate container a674847812b0 docker build and sti build image $ env |grep OPENSHIFT OPENSHIFT_BUILD_COMMIT=e79d8870be808a7abb4ab304e94c8bee69d909c6 OPENSHIFT_BUILD_NAME=ruby-sample-build-1 OPENSHIFT_BUILD_SOURCE=https://github.com/openshift/ruby-hello-world.git OPENSHIFT_BUILD_NAMESPACE=dyan1 need verify on ocp once pr merged This has been merged into ocp and is in OCP v3.5.0.7 or newer. Verified openshift v3.5.0.7+390ef18 kubernetes v1.5.2+43a9be4 etcd 3.1.0-rc.0 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2017:0884 |