Compare commits
3 Commits
Author | SHA1 | Date |
---|---|---|
|
8bda540dea | |
|
91b7360a76 | |
|
e63de8dc71 |
|
@ -262,7 +262,7 @@ jobs:
|
|||
- name: Run pack acceptance
|
||||
run: |
|
||||
cd pack
|
||||
git checkout $(git describe --abbrev=0 --tags) # check out the latest tag
|
||||
git checkout $(git describe --abbrev=0 --tags --exclude *-rc*) # check out the latest tag
|
||||
LIFECYCLE_PATH="../lifecycle-v${{ env.LIFECYCLE_VERSION }}+linux.x86-64.tgz" \
|
||||
LIFECYCLE_IMAGE="buildpacksio/lifecycle:${{ env.LIFECYCLE_IMAGE_TAG }}" \
|
||||
make acceptance
|
||||
|
@ -328,7 +328,7 @@ jobs:
|
|||
- name: Run pack acceptance
|
||||
run: |
|
||||
cd pack
|
||||
git checkout $(git describe --abbrev=0 --tags) # check out the latest tag
|
||||
git checkout $(git describe --abbrev=0 --tags --exclude *-rc*) # check out the latest tag
|
||||
$env:LIFECYCLE_PATH="..\lifecycle-v${{ env.LIFECYCLE_VERSION }}+windows.x86-64.tgz"
|
||||
$env:LIFECYCLE_IMAGE="buildpacksio/lifecycle:${{ env.LIFECYCLE_IMAGE_TAG }}"
|
||||
make acceptance
|
||||
|
|
|
@ -133,6 +133,7 @@ func testExtenderFunc(platformAPI string) func(t *testing.T, when spec.G, it spe
|
|||
h.AssertStringContains(t, firstOutput, "Hello Extensions buildpack\ncurl") // output by buildpack, shows that curl was installed on the build image
|
||||
t.Log("sets environment variables from the extended build image in the build context")
|
||||
h.AssertStringContains(t, firstOutput, "CNB_STACK_ID for buildpack: stack-id-from-ext-tree")
|
||||
h.AssertStringContains(t, firstOutput, "HOME for buildpack: /home/cnb")
|
||||
|
||||
t.Log("cleans the kaniko directory")
|
||||
fis, err := os.ReadDir(kanikoDir)
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
FROM ubuntu:bionic
|
||||
|
||||
ARG cnb_uid=1234
|
||||
ARG cnb_gid=1000
|
||||
|
||||
ENV CNB_USER_ID=${cnb_uid}
|
||||
ENV CNB_GROUP_ID=${cnb_gid}
|
||||
|
||||
COPY ./container/ /
|
||||
|
||||
RUN groupadd cnb --gid ${cnb_gid} && \
|
||||
useradd --uid ${cnb_uid} --gid ${cnb_gid} -m -s /bin/bash cnb
|
||||
|
|
|
@ -7,3 +7,4 @@ curl --version
|
|||
tree /layers
|
||||
|
||||
echo "CNB_STACK_ID for buildpack: ${CNB_STACK_ID}"
|
||||
echo "HOME for buildpack: ${HOME}"
|
||||
|
|
|
@ -75,6 +75,9 @@ func (e *extendCmd) Exec() error {
|
|||
if err = priv.RunAs(e.UID, e.GID); err != nil {
|
||||
return cmd.FailErr(err, fmt.Sprintf("exec as user %d:%d", e.UID, e.GID))
|
||||
}
|
||||
if err = priv.SetEnvironmentForUser(e.UID); err != nil {
|
||||
return cmd.FailErr(err, fmt.Sprintf("set environment for user %d", e.UID))
|
||||
}
|
||||
buildCmd := buildCmd{
|
||||
groupPath: e.GroupPath,
|
||||
planPath: e.PlanPath,
|
||||
|
|
Loading…
Reference in New Issue