Skip to content

Commit

Permalink
Merge pull request #225 from HarrisonWAffel/wins-suc-image-improvements
Browse files Browse the repository at this point in the history
Improving the SUC image
  • Loading branch information
HarrisonWAffel authored Sep 3, 2024
2 parents fdc2367 + 0321aa8 commit e119efa
Show file tree
Hide file tree
Showing 45 changed files with 1,253 additions and 1,302 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/PR.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Pull Request

on:
push:
pull_request:

permissions:
Expand All @@ -15,10 +16,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@a4f60bb28d35aeee14e6880718e0c85ff1882e64
uses: golangci/golangci-lint-action@v6.1.0
with:
args: --timeout=10m
version: v1.55
version: v1.59

test:
strategy:
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
contents: read
id-token: write
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4

- name: retrieve dockerhub credentials
uses: rancher-eio/read-vault-secrets@main
Expand All @@ -26,7 +26,7 @@ jobs:
secret/data/github/repo/${{ github.repository }}/dockerhub/rancher/credentials password | DOCKER_PASSWORD
- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
uses: docker/login-action@v3
with:
username: ${{ env.DOCKER_USERNAME }}
password: ${{ env.DOCKER_PASSWORD }}
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
contents: read
id-token: write
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: retrieve dockerhub credentials
uses: rancher-eio/read-vault-secrets@main
with:
Expand All @@ -76,7 +76,7 @@ jobs:
secret/data/github/repo/${{ github.repository }}/dockerhub/rancher/credentials password | DOCKER_PASSWORD
- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
uses: docker/login-action@v3
with:
username: ${{ env.DOCKER_USERNAME }}
password: ${{ env.DOCKER_PASSWORD }}
Expand All @@ -99,11 +99,11 @@ jobs:
# which cannot be installed onto windows VMs. Additionally, it is not possible to cross compile
# Windows images on linux. So, we're stuck with manual docker commands.
- name: Build Windows 2019
run: ./scripts/build-image.ps1 -ServerCoreVersion "1809" -Repo "${{ env.REPO }}" -Tag "${{ env.TAG }}"
run: ./scripts/build-image.ps1 -ServerCoreVersion "ltsc2019" -Repo "${{ env.REPO }}" -Tag "${{ env.TAG }}"

- name: push images
run: |
docker push ${{ env.REPO }}/wins:${{ env.TAG }}-windows-1809
docker push ${{ env.REPO }}/wins:${{ env.TAG }}-windows-ltsc2019
create-github-release:
needs: [ create-push-image-windows-2019, create-push-image-windows-2022 ]
Expand Down Expand Up @@ -151,12 +151,12 @@ jobs:
secret/data/github/repo/${{ github.repository }}/dockerhub/rancher/credentials password | DOCKER_PASSWORD
- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
uses: docker/login-action@v3
with:
username: ${{ env.DOCKER_USERNAME }}
password: ${{ env.DOCKER_PASSWORD }}

- name: create manifest list
run: |
docker manifest create ${{ env.REPO }}/wins:${{ env.TAG }} ${{ env.REPO }}/wins:${{ env.TAG }}-windows-ltsc2022 ${{ env.REPO }}/wins:${{ env.TAG }}-windows-1809
docker manifest create ${{ env.REPO }}/wins:${{ env.TAG }} ${{ env.REPO }}/wins:${{ env.TAG }}-windows-ltsc2022 ${{ env.REPO }}/wins:${{ env.TAG }}-windows-ltsc2019
docker manifest push ${{ env.REPO }}/wins:${{ env.TAG }}
16 changes: 5 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG SERVERCORE_VERSION
FROM mcr.microsoft.com/windows/servercore:${SERVERCORE_VERSION} as wins
ARG NANOSERVER_VERSION
FROM mcr.microsoft.com/windows/nanoserver:${NANOSERVER_VERSION} as wins
ARG VERSION
ARG MAINTAINERS
ARG REPO
Expand All @@ -19,14 +19,8 @@ LABEL org.opencontainers.image.vendor="Rancher Labs"
LABEL org.opencontainers.image.version=${VERSION}
WORKDIR C:/

COPY ./artifacts C:/
# staging for backwards compatibility
# Create a symbolic link pwsh.exe that points to powershell.exe for consistency
RUN New-Item -ItemType SymbolicLink -Target "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -Path "C:\Windows\System32\WindowsPowerShell\v1.0\pwsh.exe" ; \
Copy-Item wins.exe -Destination C:/Windows
COPY ./artifacts/wins-suc.exe C:/
COPY ./suc/update-connection-info.ps1 C:/

USER ContainerAdministrator
ENTRYPOINT [ "powershell", "-Command", "./run.ps1"]



ENTRYPOINT [ "wins-suc.exe" ]
23 changes: 0 additions & 23 deletions charts/rancher-wins-upgrader/.helmignore

This file was deleted.

17 changes: 0 additions & 17 deletions charts/rancher-wins-upgrader/Chart.yaml

This file was deleted.

43 changes: 0 additions & 43 deletions charts/rancher-wins-upgrader/README.md

This file was deleted.

21 changes: 0 additions & 21 deletions charts/rancher-wins-upgrader/app-readme.md

This file was deleted.

4 changes: 0 additions & 4 deletions charts/rancher-wins-upgrader/scripts/noop.ps1

This file was deleted.

72 changes: 0 additions & 72 deletions charts/rancher-wins-upgrader/scripts/upgrade.ps1

This file was deleted.

63 changes: 0 additions & 63 deletions charts/rancher-wins-upgrader/templates/_helpers.tpl

This file was deleted.

17 changes: 0 additions & 17 deletions charts/rancher-wins-upgrader/templates/configmap.yaml

This file was deleted.

Loading

0 comments on commit e119efa

Please sign in to comment.