Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,12 @@ on:
workflow_dispatch:
inputs:
image_version:
description: "Docker image version"
description: "Image version"
required: true
staging:
description: "Build staging images"
type: boolean
default: false
prepull_staging:
description: "Pre-pull staging Docker images"
type: boolean
default: false
build_docker:
description: "Build Docker images"
type: boolean
Expand All @@ -39,7 +35,6 @@ on:
env:
PACKER_VERSION: "1.9.2"
BUILD_DOCKER_REPO: ${{ inputs.staging && 'base-stgn' || 'base' }}
PREPULL_DOCKER_REPO: ${{ inputs.prepull_staging && 'base-stgn' || 'base' }}
VM_IMAGE_BUILD_PREFIX: ${{ inputs.staging && format('stgn-{0}-', github.run_number) || '' }} # staging ? prefix : ''

jobs:
Expand Down Expand Up @@ -111,7 +106,7 @@ jobs:
chmod +x packer
- name: Run packer
run: |
./packer build -var-file=versions.json $PROD_VARS -var image_repo=${{ env.PREPULL_DOCKER_REPO }} -var image_version=${{ inputs.image_version }} -var build_prefix=$VM_IMAGE_BUILD_PREFIX aws-image${{ matrix.variant }}.json
./packer build -var-file=versions.json $PROD_VARS -var image_version=${{ inputs.image_version }} -var build_prefix=$VM_IMAGE_BUILD_PREFIX aws-image${{ matrix.variant }}.json
env:
PROD_VARS: ${{ !inputs.staging && '-var-file=aws-vars-prod.json' || '' }} # production ? var-file : ''

Expand Down Expand Up @@ -144,7 +139,7 @@ jobs:
chmod +x packer
- name: Run packer
run: |
./packer build -var-file=versions.json -var image_repo=${{ env.PREPULL_DOCKER_REPO }} -var image_version=${{ inputs.image_version }} -var build_prefix=$VM_IMAGE_BUILD_PREFIX azure-image${{ matrix.variant }}.json
./packer build -var-file=versions.json -var image_version=${{ inputs.image_version }} -var build_prefix=$VM_IMAGE_BUILD_PREFIX azure-image${{ matrix.variant }}.json
- name: Publish azure image
if: ${{ !inputs.staging }}
run: |
Expand Down Expand Up @@ -182,7 +177,7 @@ jobs:
chmod +x packer
- name: Run packer
run: |
./packer build -var-file=versions.json -var image_repo=${{ env.PREPULL_DOCKER_REPO }} -var image_version=${{ inputs.image_version }} -var build_prefix=$VM_IMAGE_BUILD_PREFIX gcp-image${{ matrix.variant }}.json
./packer build -var-file=versions.json -var image_version=${{ inputs.image_version }} -var build_prefix=$VM_IMAGE_BUILD_PREFIX gcp-image${{ matrix.variant }}.json
- name: Publish images
run: |
IMAGE_VERSION=${IMAGE_VERSION//./-}
Expand Down Expand Up @@ -231,7 +226,6 @@ jobs:
run: |
./packer build \
-var-file=versions.json \
-var image_repo=${{ env.PREPULL_DOCKER_REPO }} \
-var image_version=${{ inputs.image_version }} \
-var build_prefix=$VM_IMAGE_BUILD_PREFIX \
-var oci_compartment_ocid=$OCI_COMPARTMENT \
Expand Down
1 change: 0 additions & 1 deletion scripts/packer/aws-image-cuda.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"build_prefix": "",
"ami_regions": "",
"ami_groups": "",
"image_repo": "",
"image_version": ""
},
"builders": [
Expand Down
1 change: 0 additions & 1 deletion scripts/packer/aws-image.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"build_prefix": "",
"ami_regions": "",
"ami_groups": "",
"image_repo": "",
"image_version": ""
},
"builders": [
Expand Down
1 change: 0 additions & 1 deletion scripts/packer/azure-image-cuda.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"build_prefix": "",
"docker_version": "",
"cuda_drivers_version": "",
"image_repo": "",
"image_version": ""
},
"builders": [{
Expand Down
1 change: 0 additions & 1 deletion scripts/packer/azure-image-grid.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"azure_vm_size": "Standard_D2s_v6",
"build_prefix": "",
"docker_version": "",
"image_repo": "",
"image_version": ""
},
"builders": [{
Expand Down
1 change: 0 additions & 1 deletion scripts/packer/azure-image.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"azure_vm_size": "Standard_D2s_v6",
"build_prefix": "",
"docker_version": "",
"image_repo": "",
"image_version": ""
},
"builders": [{
Expand Down
1 change: 0 additions & 1 deletion scripts/packer/gcp-image-cuda.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"build_prefix": "",
"docker_version": "",
"cuda_drivers_version": "",
"image_repo": "",
"image_version": ""
},
"builders": [
Expand Down
1 change: 0 additions & 1 deletion scripts/packer/gcp-image.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"variables": {
"build_prefix": "",
"docker_version": "",
"image_repo": "",
"image_version": ""
},
"builders": [
Expand Down
1 change: 0 additions & 1 deletion scripts/packer/oci-image-cuda.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"build_prefix": "",
"docker_version": "",
"cuda_drivers_version": "",
"image_repo": "",
"image_version": "",
"oci_availability_domain": "",
"oci_compartment_ocid": "",
Expand Down
1 change: 0 additions & 1 deletion scripts/packer/oci-image.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"variables": {
"build_prefix": "",
"docker_version": "",
"image_repo": "",
"image_version": "",
"oci_availability_domain": "",
"oci_compartment_ocid": "",
Expand Down
Loading