Skip to content

Commit

Permalink
wip 1720011414
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Heath <[email protected]>
  • Loading branch information
Jason Heath committed Jul 3, 2024
1 parent aefb415 commit 419c266
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 104 deletions.
155 changes: 54 additions & 101 deletions .github/workflows/hab-pkg-build-upload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ on:

env:
BLDR_URL: 'https://bldr.habitat.sh/'
# HAB_ORIGIN: 'habitat'
HAB_ORIGIN: 'jasonheath'
HAB_ORIGIN: 'habitat'
HAB_AUTH_TOKEN: ${{ secrets.HAB_AUTH_TOKEN }}
HABITAT_VERSION_SET: 'latest'
HAB_STUDIO_SECRET_GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
Expand All @@ -23,122 +22,76 @@ permissions:

jobs:

# # These components either have a plan.sh file or a habitat plan directory
# simple-packages:
# name: ${{matrix.components}} (plan.sh, habitat dir)
# strategy:
# fail-fast: false
# matrix:
# os: [ubuntu-latest]
# channel: [unstable]
# components: [builder-memcached, builder-datastore, builder-graph, builder-minio]
# # components: [builder-memcached, builder-datastore]
# # components: [builder-graph, builder-minio]
# runs-on: ${{matrix.os}}
# steps:
# - name: Checkout for ${{matrix.components}}
# uses: actions/checkout@v4
# - name: Install Habitat for ${{matrix.components}}
# uses: ./.github/actions/hab-install-linux
# - name: Build and Upload Habitat Package for ${{matrix.components}}
# uses: ./.github/actions/hab-pkg-build-and-upload-linux
# with:
# hab-auth-token: ${{ env.HAB_AUTH_TOKEN }}
# hab-origin: ${{ env.HAB_ORIGIN }}
# bldr-component: components/${{matrix.components}}

# # These components have architecture specific plan directories
# architecture-packages:
# name: ${{matrix.components}} ${{matrix.arches}}
# strategy:
# fail-fast: false
# matrix:
# os: [ubuntu-latest, windows-latest]
# channel: [unstable]
# components: [builder-worker]
# arches: [x86_64-linux, x86_64-linux-kernel2, x86_64-windows]
# exclude:
# - os: ubuntu-latest
# arches: x86_64-windows
# - os: windows-latest
# arches: x86_64-linux
# - os: windows-latest
# arches: x86_64-linux-kernel2
# runs-on: ${{matrix.os}}
# steps:

# - name: Checkout
# uses: actions/checkout@v4

# - if: ${{ matrix.os == 'ubuntu-latest' && matrix.arches != 'x86_64-windows' }}
# name: Install Habitat
# uses: ./.github/actions/hab-install-linux
# - if: ${{ matrix.os == 'windows-latest' && matrix.arches == 'x86_64-windows' }}
# name: Install Habitat
# uses: ./.github/actions/hab-install-windows

# - if: ${{ matrix.os == 'ubuntu-latest' && matrix.arches != 'x86_64-windows' }}
# name: Build and Upload Habitat Package
# uses: ./.github/actions/hab-pkg-build-and-upload-linux
# with:
# hab-auth-token: ${{ env.HAB_AUTH_TOKEN }}
# hab-origin: ${{ env.HAB_ORIGIN }}
# bldr-component: components/${{matrix.components}}/habitat/${{matrix.arches}}
# - if: ${{ matrix.os == 'windows-latest' && matrix.arches == 'x86_64-windows' }}
# name: Build and Upload Habitat Package
# uses: ./.github/actions/hab-pkg-build-and-upload-windows
# with:
# hab-auth-token: ${{ env.HAB_AUTH_TOKEN }}
# hab-origin: ${{ env.HAB_ORIGIN }}
# bldr-component: components/${{matrix.components}}/habitat/${{matrix.arches}}
# app-version: ${{ needs.pre-build.outputs.app_version }}
# build-date-time: ${{ needs.pre-build.outputs.date }}


# These components have a plan in a habitat-dev directory which is to be built
# after building a package from a plan in a habitat directory
dependent-packages:
name: ${{matrix.components}} (habitat, habitat-dev dirs)
# These components either have a plan.sh file or a habitat plan directory
simple-packages:
name: ${{matrix.components}} (plan.sh, habitat dir)
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
channel: [unstable]
components: [builder-jobsrv]
# components: [builder-api, builder-api-proxy, builder-jobsrv, builder-worker]
components: [builder-api-proxy, builder-api, builder-datastore, builder-graph, builder-jobsrv, builder-memcached, builder-minio]
runs-on: ${{matrix.os}}
steps:
- name: Checkout for ${{matrix.components}}
uses: actions/checkout@v4
- name: Install Habitat for ${{matrix.components}}
uses: ./.github/actions/hab-install-linux
- name: Build and Upload Habitat Package for ${{matrix.components}}
uses: ./.github/actions/hab-pkg-build-and-upload-linux
with:
hab-auth-token: ${{ env.HAB_AUTH_TOKEN }}
hab-origin: ${{ env.HAB_ORIGIN }}
bldr-component: components/${{matrix.components}}

# These components have architecture specific plan directories
architecture-packages:
name: ${{matrix.components}} ${{matrix.arches}}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
channel: [unstable]
components: [builder-worker]
arches: [x86_64-linux, x86_64-linux-kernel2, x86_64-windows]
exclude:
- os: ubuntu-latest
arches: x86_64-windows
- os: windows-latest
arches: x86_64-linux
- os: windows-latest
arches: x86_64-linux-kernel2
runs-on: ${{matrix.os}}
steps:

- name: Checkout
uses: actions/checkout@v4

- name: Install Habitat
- if: ${{ matrix.os == 'ubuntu-latest' && matrix.arches != 'x86_64-windows' }}
name: Install Habitat
uses: ./.github/actions/hab-install-linux
- if: ${{ matrix.os == 'windows-latest' && matrix.arches == 'x86_64-windows' }}
name: Install Habitat
uses: ./.github/actions/hab-install-windows

# - name: ${{matrix.components}} habitat directory package
# uses: ./.github/actions/hab-pkg-build-and-upload-linux
# with:
# hab-auth-token: ${{ env.HAB_AUTH_TOKEN }}
# hab-origin: ${{ env.HAB_ORIGIN }}
# bldr-component: components/${{matrix.components}}

# - name: hab pkg path experiments
# shell: bash
# run: |
# echo --=> BEGIN hab pkg path EXPERIMENTS
# source results/last_build.env
# echo --=> hab pkg path $pkg_origin/$pkg_name
# hab pkg path $pkg_origin/$pkg_name
# echo --=> END hab pkg path EXPERIMENTS

- name: ${{matrix.components}} habitat-dev directory package
- if: ${{ matrix.os == 'ubuntu-latest' && matrix.arches != 'x86_64-windows' }}
name: Build and Upload Habitat Package
uses: ./.github/actions/hab-pkg-build-and-upload-linux
with:
hab-auth-token: ${{ env.HAB_AUTH_TOKEN }}
hab-origin: ${{ env.HAB_ORIGIN }}
bldr-component: components/${{matrix.components}}/habitat-dev
bldr-component: components/${{matrix.components}}/habitat/${{matrix.arches}}
- if: ${{ matrix.os == 'windows-latest' && matrix.arches == 'x86_64-windows' }}
name: Build and Upload Habitat Package
uses: ./.github/actions/hab-pkg-build-and-upload-windows
with:
hab-auth-token: ${{ env.HAB_AUTH_TOKEN }}
hab-origin: ${{ env.HAB_ORIGIN }}
bldr-component: components/${{matrix.components}}/habitat/${{matrix.arches}}
app-version: ${{ needs.pre-build.outputs.app_version }}
build-date-time: ${{ needs.pre-build.outputs.date }}


# JAH: trigger appropriately
# JAH: Set the hab_auth_token more appropriately
# JAH: stop using jasonheath origin
# JAH: fix broken builder-api-proxy
# JAH: fix broken builder-api-proxy?
4 changes: 1 addition & 3 deletions support/ci/builder-dev-plan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ do_prepare() {
# shellcheck disable=2154
do_builder_install() {
local pkg_path
build_line "hab pkg path "$pkg_origin"/"$pkg_name""
pkg_path=$(hab pkg path "$pkg_origin"/"$pkg_name")
# JAH: change the above back to habitat/"$pkg_name" as it was before?
pkg_path=$(hab pkg path habitat/"$pkg_name")

build_line "Linking new binary into package"
ln -sfv "$CARGO_TARGET_DIR/$rustc_target/${builder_build_type#--}/$bin" \
Expand Down

0 comments on commit 419c266

Please sign in to comment.