Skip to content

Instantly share code, notes, and snippets.

@sub-mod
Last active April 27, 2020 23:42
Show Gist options
  • Save sub-mod/0857cfd96cc79a52feb8f850fe6ff8c3 to your computer and use it in GitHub Desktop.
Save sub-mod/0857cfd96cc79a52feb8f850fe6ff8c3 to your computer and use it in GitHub Desktop.

Revisions

  1. sub-mod revised this gist Apr 27, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion simple-bc.yml
    Original file line number Diff line number Diff line change
    @@ -20,7 +20,7 @@ spec:
    FROM centos:7
    USER 0
    RUN yum install -y centos-release-scl && yum install devtoolset-7 rh-python36 -y
    RUN source scl_enable devtoolset-7 rh-python36
    RUN source scl_source enable devtoolset-7 rh-python36 && gcc --version && python -V
    USER example
    strategy:
    type: "Docker"
  2. sub-mod revised this gist Apr 27, 2020. 1 changed file with 7 additions and 2 deletions.
    9 changes: 7 additions & 2 deletions simple-bc.yml
    Original file line number Diff line number Diff line change
    @@ -8,15 +8,20 @@ spec:
    local: false
    ---
    kind: "BuildConfig"
    apiVersion: "v1"
    apiVersion: "build.openshift.io/v1" #3.11 v1
    metadata:
    name: "test-sample-build"
    spec:
    source:
    type: "Git"
    git:
    uri: "https://github.com/sub-mod/empty-repo"
    dockerfile: "FROM registry.access.redhat.com/ubi8:latest\n USER 0\n RUN yum install which -y\n RUN yum install gcc -y\n USER example"
    dockerfile: |-
    FROM centos:7
    USER 0
    RUN yum install -y centos-release-scl && yum install devtoolset-7 rh-python36 -y
    RUN source scl_enable devtoolset-7 rh-python36
    USER example
    strategy:
    type: "Docker"
    dockerStrategy:
  3. sub-mod created this gist Apr 27, 2020.
    27 changes: 27 additions & 0 deletions simple-bc.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,27 @@
    ---
    apiVersion: image.openshift.io/v1
    kind: ImageStream
    metadata:
    name: test-bc-sample
    spec:
    lookupPolicy:
    local: false
    ---
    kind: "BuildConfig"
    apiVersion: "v1"
    metadata:
    name: "test-sample-build"
    spec:
    source:
    type: "Git"
    git:
    uri: "https://github.com/sub-mod/empty-repo"
    dockerfile: "FROM registry.access.redhat.com/ubi8:latest\n USER 0\n RUN yum install which -y\n RUN yum install gcc -y\n USER example"
    strategy:
    type: "Docker"
    dockerStrategy:
    dockerfilePath: Dockerfile
    output:
    to:
    kind: "ImageStreamTag"
    name: "test-bc-sample:latest"