Skip to content

Remove WCOW examples #193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 24, 2025
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
79 changes: 0 additions & 79 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,82 +51,3 @@ jobs:
run: make deploy-linux
- name: Clean up
run: make clean-linux
build-deploy-windows:
strategy:
matrix:
include:
- os: windows-2022
version: 2022
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Determine download URL for latest pack
id: pack-download-url
uses: actions/github-script@v6
with:
github-token: ${{secrets.GITHUB_TOKEN}}
result-encoding: string
# FIXME: Revert back to 'getLatestRelease' when pack v0.31.0 is released
script: |
return github.rest.repos.getReleaseByTag({
owner: "buildpacks",
repo: "pack",
tag: "v0.31.0-rc1"
}).then(result => {
return result.data.assets
.filter(a => a.name.includes("windows"))
.map(a => a.browser_download_url)[0];
})
- name: Install pack
run: |
curl -s -L -o pack.zip ${{ steps.pack-download-url.outputs.result }}
tar -xvf pack.zip
mkdir ~\.pack
- name: Set Experimental
run: make set-experimental
- name: Build
run: make build-windows-${{ matrix.version }}
- uses: azure/docker-login@v1
if: ${{ github.ref == 'refs/heads/main' }}
with:
username: cnbs
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Deploy
if: ${{ github.ref == 'refs/heads/main' }}
run: make deploy-windows-${{ matrix.version }}
build-deploy-windows-packages:
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
- name: Determine download URL for latest pack
id: pack-download-url
uses: actions/github-script@v6
with:
github-token: ${{secrets.GITHUB_TOKEN}}
result-encoding: string
script: |
return github.rest.repos.getLatestRelease({
owner: "buildpacks",
repo: "pack"
}).then(result => {
return result.data.assets
.filter(a => a.name.includes("windows"))
.map(a => a.browser_download_url)[0];
})
- name: Install pack
run: |
curl -s -L -o pack.zip ${{ steps.pack-download-url.outputs.result }}
tar -xvf pack.zip
mkdir ~\.pack
- name: Set Experimental
run: make set-experimental
- name: Build
run: make build-windows-packages
- uses: azure/docker-login@v1
if: ${{ github.ref == 'refs/heads/main' }}
with:
username: cnbs
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Deploy
if: ${{ github.ref == 'refs/heads/main' }}
run: make deploy-windows-packages
105 changes: 1 addition & 104 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PULL_POLICY_NEVER?=--pull-policy=never
PACK_BUILD_FLAGS?=--trust-builder
PACK_CMD?=pack

clean: clean-linux clean-windows
clean: clean-linux

####################
## Linux
Expand Down Expand Up @@ -153,109 +153,6 @@ set-experimental:
@echo "> Setting experimental"
$(PACK_CMD) config experimental true

####################
## Windows
####################

build-windows-2022: build-windows-packages build-dotnet-framework-2022 build-nanoserver-2022

build-nanoserver-2022: build-base-nanoserver-2022 build-builder-nanoserver-2022 build-buildpacks-nanoserver-2022

build-dotnet-framework-2022: build-base-dotnet-framework-2022 build-builder-dotnet-framework-2022 build-buildpacks-dotnet-framework-2022

build-base-nanoserver-2022:
@echo "> Building 'nanoserver-2022' base images..."
bash base-images/build.sh nanoserver-2022

build-base-dotnet-framework-2022:
@echo "> Building 'dotnet-framework-2022' base images..."
bash base-images/build.sh dotnet-framework-2022

build-builder-nanoserver-2022: build-windows-packages
@echo "> Building 'nanoserver-2022' builder..."
$(PACK_CMD) builder create cnbs/sample-builder:nanoserver-2022 --config $(SAMPLES_ROOT)/builders/nanoserver-2022/builder.toml $(PULL_POLICY_NEVER)

build-builder-dotnet-framework-2022: build-windows-packages
@echo "> Building 'dotnet-framework-2022' builder..."
$(PACK_CMD) builder create cnbs/sample-builder:dotnet-framework-2022 --config $(SAMPLES_ROOT)/builders/dotnet-framework-2022/builder.toml $(PULL_POLICY_NEVER)

build-buildpacks-nanoserver-2022: build-sample-root
@echo "> Creating 'hello-moon-windows' app using 'nanoserver-2022' builder..."
$(PACK_CMD) build sample-hello-moon-windows-app:nanoserver-2022 -v --builder cnbs/sample-builder:nanoserver-2022 --buildpack $(SAMPLES_ROOT)/buildpacks/hello-world-windows --buildpack $(SAMPLES_ROOT)/buildpacks/hello-moon-windows $(PULL_POLICY_NEVER) $(PACK_BUILD_FLAGS)

@echo "> Creating 'hello-world-windows' app using 'nanoserver-2022' builder..."
$(PACK_CMD) build sample-hello-world-windows-app:nanoserver-2022 -v --builder cnbs/sample-builder:nanoserver-2022 --buildpack $(SAMPLES_ROOT)/buildpacks/hello-world-windows $(PULL_POLICY_NEVER) $(PACK_BUILD_FLAGS)

build-buildpacks-dotnet-framework-2022: build-sample-root
@echo "> Creating 'dotnet-framework' app using 'dotnet-framework-2022' builder..."
$(PACK_CMD) build sample-dotnet-framework-app:dotnet-framework-2022 -v --builder cnbs/sample-builder:dotnet-framework-2022 --buildpack $(SAMPLES_ROOT)/buildpacks/dotnet-framework --path apps/aspnet $(PULL_POLICY_NEVER) $(PACK_BUILD_FLAGS)

build-windows-packages: build-sample-root
@echo "> Creating 'hello-world-windows' buildpack package"
$(PACK_CMD) buildpack package cnbs/sample-package:hello-world-windows --config $(SAMPLES_ROOT)/$(PACKAGES_DIR)/hello-world-windows/package.toml $(PULL_POLICY_NEVER)

@echo "> Creating 'hello-universe-windows' buildpack package"
$(PACK_CMD) buildpack package cnbs/sample-package:hello-universe-windows --config $(SAMPLES_ROOT)/$(PACKAGES_DIR)/hello-universe-windows/package.toml $(PULL_POLICY_NEVER)

deploy-windows-packages:
@echo "> Deploying windows packages..."
docker push cnbs/sample-package:hello-world-windows
docker push cnbs/sample-package:hello-universe-windows

deploy-windows-2022: deploy-windows-bases-2022 deploy-windows-builders-2022

deploy-windows-bases-2022: deploy-windows-bases-dotnet-framework-2022 deploy-windows-bases-nanoserver-2022

deploy-windows-bases-nanoserver-2022:
@echo "> Deploying 'nanoserver-2022' base images..."
docker push cnbs/sample-base:nanoserver-2022
docker push cnbs/sample-base-run:nanoserver-2022
docker push cnbs/sample-base-build:nanoserver-2022

deploy-windows-bases-dotnet-framework-2022:
@echo "> Deploying 'dotnet-framework-2022' base images..."
docker push cnbs/sample-base-run:dotnet-framework-2022
docker push cnbs/sample-base-build:dotnet-framework-2022

deploy-windows-builders-2022: deploy-windows-builders-dotnet-framework-2022 deploy-windows-builders-nanoserver-2022

deploy-windows-builders-nanoserver-2022:
@echo "> Deploying 'nanoserver-2022' builder..."
docker push cnbs/sample-builder:nanoserver-2022

deploy-windows-builders-dotnet-framework-2022:
@echo "> Deploying 'dotnet-framework-2022' builder..."
docker push cnbs/sample-builder:dotnet-framework-2022

clean-windows:
@echo "> Removing 'nanoserver-2022' base images..."
docker rmi cnbs/sample-base:nanoserver-2022 || true
docker rmi cnbs/sample-base-run:nanoserver-2022 || true
docker rmi cnbs/sample-base-build:nanoserver-2022 || true

@echo "> Removing 'dotnet-framework-2022' base images..."
docker rmi cnbs/sample-base-run:dotnet-framework-2022 || true
docker rmi cnbs/sample-base-build:dotnet-framework-2022 || true

@echo "> Removing builders..."
docker rmi cnbs/sample-builder:nanoserver-2022 || true
docker rmi cnbs/sample-builder:dotnet-framework-2022 || true

@echo "> Removing 'nanoserver-2022' apps..."
docker rmi sample-hello-moon-windows-app:nanoserver-2022 || true
docker rmi sample-hello-world-windows-app:nanoserver-2022 || true
docker rmi sample-batch-script-app:nanoserver-2022 || true

@echo "> Removing 'dotnet-framework-2022' apps..."
docker rmi sample-aspnet-app:dotnet-framework-2022 || true

@echo "> Removing packages..."
docker rmi cnbs/sample-package:hello-world-windows || true
docker rmi cnbs/sample-package:hello-universe-windows || true

@echo "> Removing '.tmp'"
rm -rf .tmp

####################
## Windows pack for any daemon OS
####################
Expand Down
11 changes: 0 additions & 11 deletions base-images/dotnet-framework-2022/base/Dockerfile

This file was deleted.

16 changes: 0 additions & 16 deletions base-images/dotnet-framework-2022/build/Dockerfile

This file was deleted.

15 changes: 0 additions & 15 deletions base-images/dotnet-framework-2022/run/Dockerfile

This file was deleted.

14 changes: 0 additions & 14 deletions base-images/nanoserver-2022/base/Dockerfile

This file was deleted.

16 changes: 0 additions & 16 deletions base-images/nanoserver-2022/build/Dockerfile

This file was deleted.

5 changes: 0 additions & 5 deletions base-images/nanoserver-2022/run/Dockerfile

This file was deleted.

23 changes: 0 additions & 23 deletions builders/dotnet-framework-2022/README.md

This file was deleted.

24 changes: 0 additions & 24 deletions builders/dotnet-framework-2022/builder.toml

This file was deleted.

21 changes: 0 additions & 21 deletions builders/nanoserver-2022/README.md

This file was deleted.

22 changes: 0 additions & 22 deletions builders/nanoserver-2022/builder.toml

This file was deleted.

Loading