60 Commits

Author SHA1 Message Date
semantic-release-bot
739047e477 chore(release): 1.2.0 [skip ci]
# [1.2.0](http://gitea.gitea.svc.cluster.local:3000/djpbessems/ContainerImage.PackerExtended/compare/v1.1.0...v1.2.0) (2024-06-06)

### Features

* Add unzip (required for packer action) ([3134776](31347764ae))
2024-06-06 02:16:32 +00:00
77dab0de04 build: Disable provenance for image push
All checks were successful
build-image / Semantic Release (Dry-run) (push) Successful in 18s
build-image / Container image (push) Successful in 4m59s
build-image / Semantic Release (push) Successful in 22s
2024-06-06 12:03:19 +10:00
31347764ae feat: Add unzip (required for packer action)
Some checks failed
build-image / Semantic Release (Dry-run) (push) Successful in 16s
build-image / Container image (push) Failing after 4m46s
build-image / Semantic Release (push) Has been skipped
2024-06-06 11:53:55 +10:00
semantic-release-bot
e4749fd0c4 chore(release): 1.1.0 [skip ci]
# [1.1.0](http://gitea.gitea.svc.cluster.local:3000/djpbessems/ContainerImage.PackerExtended/compare/v1.0.0...v1.1.0) (2024-06-06)

### Features

* Add nodejs (prereq for majority of actions) ([29e242c](29e242c30c))
2024-06-06 01:47:13 +00:00
12c75403a0 Merge branch 'master' of https://code.spamasaurus.com/djpbessems/ContainerImage.PackerExtended
All checks were successful
build-image / Semantic Release (Dry-run) (push) Successful in 18s
build-image / Container image (push) Successful in 4m55s
build-image / Semantic Release (push) Successful in 24s
2024-06-06 11:18:20 +10:00
29e242c30c feat: Add nodejs (prereq for majority of actions) 2024-06-06 11:18:18 +10:00
semantic-release-bot
ee57c502d7 chore(release): 1.0.0 [skip ci]
# 1.0.0 (2024-06-05)

### Features

* Initial release w/ semantic release ([dda78b7](dda78b7334))
2024-06-05 12:18:44 +00:00
d36d9d7eb6 chore: Revert qemu action
All checks were successful
build-image / Semantic Release (Dry-run) (push) Successful in 48s
build-image / Container image (push) Successful in 4m27s
build-image / Semantic Release (push) Successful in 1m16s
2024-06-05 22:12:05 +10:00
8af7c465bb build: Push to correct registry & Housekeeping
Some checks failed
build-image / Semantic Release (Dry-run) (push) Successful in 54s
build-image / Container image (push) Failing after 11s
build-image / Semantic Release (push) Has been skipped
2024-06-05 22:08:42 +10:00
752f46a358 build: Define build-args within buildx action step
Some checks failed
build-image / Semantic Release (Dry-run) (push) Successful in 55s
build-image / Container image (push) Failing after 4m51s
2024-06-05 21:48:53 +10:00
822c235f3f chore: Housekeeping
Some checks failed
build-image / Semantic Release (Dry-run) (push) Successful in 54s
build-image / Container image (push) Failing after 43s
2024-06-05 21:42:38 +10:00
6249c093f4 build: Combine semrel dry-run w/ buildx logic
Some checks failed
build-image / Semantic Release (Dry-run) (push) Successful in 2m17s
build-image / build-image (push) Failing after 42s
2024-06-05 21:33:46 +10:00
12fa6bb959 build: Rebase act runner
Some checks failed
build-image / build-image (push) Failing after 2m0s
2024-06-05 21:24:36 +10:00
a78501ade7 chore: Debug docker context create shell environment #2
Some checks failed
build-image / build-image (push) Failing after 20s
2024-06-05 21:19:47 +10:00
98d832d5fb chore: Debug docker context create shell environment
Some checks failed
build-image / build-image (push) Failing after 21s
2024-06-05 21:18:39 +10:00
52f8b84332 chore: Test alternative buildx approach #4
Some checks failed
build-image / build-image (push) Failing after 37s
2024-06-05 21:08:49 +10:00
879c13a440 chore: Test alternative buildx approach #3
Some checks failed
build-image / build-image (push) Failing after 21s
2024-06-05 20:52:33 +10:00
d3a437fecd chore: Test alternative buildx approach #2
Some checks are pending
build-image / build-image (push) Waiting to run
2024-06-05 20:50:12 +10:00
f90cf62a71 chore: Test alternative buildx approach 2024-06-05 20:47:12 +10:00
2e6ea3f060 chore: Debug TLS handshake #6
Some checks failed
Container / Semantic Release (Dry-run) (push) Successful in 1m0s
Container / Container image (push) Failing after 19m5s
Container / Semantic Release (push) Has been cancelled
2024-06-05 17:36:06 +10:00
db7860a0e8 chore: Debug TLS handshake #5
Some checks failed
Container / Semantic Release (Dry-run) (push) Successful in 30s
Container / Container image (push) Failing after 25s
Container / Semantic Release (push) Has been skipped
2024-06-05 17:33:18 +10:00
1a90e017c7 chore: Debug TLS handshake #4
Some checks failed
Container / Semantic Release (Dry-run) (push) Successful in 56s
Container / Container image (push) Failing after 43s
Container / Semantic Release (push) Has been skipped
2024-06-05 17:29:18 +10:00
85b8c36315 chore: Debug TLS handshake #3
Some checks failed
Container / Semantic Release (Dry-run) (push) Successful in 53s
Container / Container image (push) Failing after 38s
Container / Semantic Release (push) Has been skipped
2024-06-05 17:23:12 +10:00
49779d8b31 chore: chore: Debug TLS handshake #3
Some checks failed
Container / Semantic Release (Dry-run) (push) Successful in 43s
Container / Container image (push) Failing after 43s
Container / Semantic Release (push) Has been skipped
2024-06-05 17:18:13 +10:00
3aad828587 chore: Debug TLS handshake #2
Some checks failed
Container / Semantic Release (Dry-run) (push) Successful in 50s
Container / Semantic Release (push) Has been cancelled
Container / Container image (push) Has been cancelled
2024-06-05 17:06:35 +10:00
d04cbb9764 chore: Debug TLS handshake
Some checks failed
Container / Semantic Release (Dry-run) (push) Successful in 50s
Container / Container image (push) Failing after 42s
Container / Semantic Release (push) Has been skipped
2024-06-05 16:51:06 +10:00
621de81ab9 build: Rebase http transfer agent
Some checks failed
Container / Semantic Release (Dry-run) (push) Successful in 51s
Container / Container image (push) Failing after 15m43s
Container / Semantic Release (push) Has been skipped
2024-06-05 16:32:50 +10:00
9e6c071cce build: Rebase multi-stage container build
Some checks failed
Container / Semantic Release (Dry-run) (push) Successful in 59s
Container / Container image (push) Failing after 2m58s
Container / Semantic Release (push) Has been skipped
2024-06-05 16:21:18 +10:00
5df8233e83 chore: Test build in rootless act runner
Some checks failed
Container / Semantic Release (Dry-run) (push) Successful in 54s
Container / Container image (push) Failing after 25s
Container / Semantic Release (push) Has been skipped
2024-06-05 16:11:57 +10:00
89c2b456e2 chore: Debug stalling curl request
Some checks failed
Container / Semantic Release (Dry-run) (push) Successful in 59s
Container / Container image (push) Failing after 2m36s
Container / Semantic Release (push) Has been skipped
2024-06-05 16:06:05 +10:00
98478ff55d build: Pass build arguments through kaniko extra-vars
Some checks failed
Container / Semantic Release (Dry-run) (push) Successful in 52s
Container / Container image (push) Failing after 4m21s
Container / Semantic Release (push) Has been skipped
2024-06-05 13:35:18 +10:00
dda78b7334 feat: Initial release w/ semantic release
Some checks failed
Container / Semantic Release (Dry-run) (push) Successful in 1m2s
Container / Container image (push) Failing after 2m8s
Container / Semantic Release (push) Has been skipped
2024-06-05 13:25:56 +10:00
50de7d558a build: Rebase container image build
Some checks failed
Container / Semantic Release (Dry-run) (push) Failing after 51s
Container / Container image (push) Has been skipped
Container / Semantic Release (push) Has been skipped
2024-06-05 13:19:34 +10:00
6b1c97f6e7 fix:Pin ansible-core version to avoid SSH connectivity issues
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-22 16:47:10 +02:00
25d21e11b6 Make binary executable
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-16 12:37:47 +01:00
8eb849b671 Add yq binary
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-15 11:53:25 +01:00
342556c25b Add dependencies
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-04 13:07:42 +01:00
3e401c35fc Update certificates
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-03 11:44:08 +01:00
2dbecabed8 Link gpg key to repository
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-03 10:14:50 +01:00
5c692b03d2 Add missing apt update
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-03 09:34:13 +01:00
6d62686091 Remove redundant sudo
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-03 09:27:51 +01:00
73337a661b Attempt original packagename
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-03 09:25:35 +01:00
40c87c2ed4 Add dependency
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-03 09:21:57 +01:00
e3cc74cfba Rebase Powershell package
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2023-01-03 09:17:41 +01:00
b1ad86f5e5 Add quotes
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-03 09:09:29 +01:00
041b85772e Fix powershell source url
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-03 09:07:05 +01:00
d1c4c1bca4 Re-add locale
All checks were successful
continuous-integration/drone/push Build is passing
2022-04-19 16:06:01 +02:00
d42a672e3b InSpec removed, so rebase to just Debian
All checks were successful
continuous-integration/drone/push Build is passing
2022-04-19 14:00:14 +02:00
5601e13bad Add dependency
All checks were successful
continuous-integration/drone/push Build is passing
2022-04-19 13:52:10 +02:00
436ec64266 Add missing dependency #3
All checks were successful
continuous-integration/drone/push Build is passing
2022-04-18 22:14:33 +02:00
4f36a48581 Added ansible module dependency
All checks were successful
continuous-integration/drone/push Build is passing
2022-04-18 14:54:41 +02:00
8ee8e727c2 Add missing dependency
All checks were successful
continuous-integration/drone/push Build is passing
2022-04-18 14:37:43 +02:00
f0ab12a145 Fix package name
All checks were successful
continuous-integration/drone/push Build is passing
2022-04-18 12:12:59 +02:00
3ab936b510 Update Powershell source location
Some checks failed
continuous-integration/drone/push Build is failing
2022-04-18 12:10:14 +02:00
50c7536bf4 Add missing flag
All checks were successful
continuous-integration/drone/push Build is passing
2021-06-17 11:10:16 +02:00
6682f1306f Fix broken dependencies separately from installation of other packages
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-17 11:08:14 +02:00
e218e28667 Allow dpkg to fail so apt can install missing dependencies
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-17 11:03:49 +02:00
0a8000bbe7 Rebase installation source for pwsh
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-17 10:59:06 +02:00
b1bcc4da42 Add qemu-utils
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-17 10:45:43 +02:00
bcfffa5f03 Housekeeping 2021-06-08 16:54:22 +02:00
6 changed files with 7014 additions and 68 deletions

View File

@@ -1,51 +0,0 @@
kind: pipeline
type: kubernetes
name: Harbor
steps:
- name: build & publish
image: plugins/docker
context: .
settings:
repo: bv11-cr01.bessems.eu/library/packer-extended
registry: bv11-cr01.bessems.eu
tags: latest
mtu: 1450
username:
from_secret: harbor_username
password:
from_secret: harbor_password
build_args_from_env:
- REPO_USERNAME
- REPO_PASSWORD
environment:
REPO_USERNAME:
from_secret: repo_username
REPO_PASSWORD:
from_secret: repo_password
---
kind: pipeline
type: kubernetes
name: Dockerhub
steps:
- name: build & publish
image: plugins/docker
context: .
settings:
repo: djpbessems/packer-extended
tags: latest
mtu: 1450
username:
from_secret: docker_username
password:
from_secret: docker_password
build_args_from_env:
- REPO_USERNAME
- REPO_PASSWORD
environment:
REPO_USERNAME:
from_secret: repo_username
REPO_PASSWORD:
from_secret: repo_password

View File

@@ -0,0 +1,128 @@
name: build-image
on: [push]
jobs:
semrel_dryrun:
name: Semantic Release (Dry-run)
runs-on: dind-rootless
outputs:
version: ${{ steps.sem_rel.outputs.version }}
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 20
- name: Install dependencies
run: |
npm install \
semantic-release \
@semantic-release/commit-analyzer \
@semantic-release/exec
- name: Semantic Release (dry-run)
id: sem_rel
run: |
npx semantic-release \
--package @semantic-release/exec \
--package semantic-release \
--branches ${{ gitea.refname }} \
--tag-format 'v${version}' \
--dry-run \
--plugins @semantic-release/commit-analyzer,@semantic-release/exec \
--analyzeCommits @semantic-release/commit-analyzer \
--verifyRelease @semantic-release/exec \
--verifyReleaseCmd 'echo "version=${nextRelease.version}" >> $GITHUB_OUTPUT'
env:
GIT_CREDENTIALS: ${{ secrets.GIT_USERNAME }}:${{ secrets.GIT_APIKEY }}
- name: Assert semantic release output
run: |
[[ -z "${{ steps.sem_rel.outputs.version }}" ]] && {
echo 'No release tag - exiting'; exit 1
} || {
echo 'Release tag set correctly: ${{ steps.sem_rel.outputs.version }}'; exit 0
}
build_image:
name: Container image
runs-on: dind
needs: semrel_dryrun
container: ghcr.io/catthehacker/ubuntu:act-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Set up qemu
# Will not work out of the box; instead using dind
# uses: docker/setup-qemu-action@v3
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static
- name: Create builder context
id: buildx-context
run: |
docker context create builders
env:
DOCKER_HOST: tcp://docker:2376/
DOCKER_TLS_CERTDIR: /certs
DOCKER_TLS_VERIFY: 1
DOCKER_CERT_PATH: "/certs/client"
- name: Set up buildx
id: buildx
uses: docker/setup-buildx-action@v3
with:
# buildkitd-flags: --debug
endpoint: builders
env:
DOCKER_HOST: "tcp://docker:2376/"
DOCKER_TLS_CERTDIR: "/certs"
DOCKER_TLS_VERIFY: 1
DOCKER_CERT_PATH: "/certs/client"
- name: Login to target repository
uses: docker/login-action@v3
with:
registry: code.spamasaurus.com
username: ${{ secrets.GIT_USERNAME }}
password: ${{ secrets.GIT_APIKEY }}
- name: Build & push container image
uses: docker/build-push-action@v5
with:
build-args: |
REPO_USERNAME=${{ secrets.REPO_USERNAME }}
REPO_PASSWORD=${{ secrets.REPO_PASSWORD }}
context: .
tags: code.spamasaurus.com/djpbessems/packer-extended:${{ needs.semrel_dryrun.outputs.version }}
provenance: false
push: true
env:
DOCKER_HOST: "tcp://docker:2376/"
DOCKER_TLS_CERTDIR: "/certs"
DOCKER_TLS_VERIFY: 1
DOCKER_CERT_PATH: "/certs/client"
semrel:
name: Semantic Release
runs-on: dind-rootless
needs: build_image
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 20
- name: Install dependencies
run: |
npm install \
semantic-release \
@semantic-release/changelog \
@semantic-release/commit-analyzer \
@semantic-release/git \
@semantic-release/release-notes-generator
- name: Semantic Release
run: |
npx semantic-release \
--branches ${{ gitea.refname }} \
--tag-format 'v${version}' \
--plugins @semantic-release/commit-analyzer,@semantic-release/release-notes-generator,@semantic-release/changelog,@semantic-release/git
env:
GIT_CREDENTIALS: ${{ secrets.GIT_USERNAME }}:${{ secrets.GIT_APIKEY }}

20
CHANGELOG.md Normal file
View File

@@ -0,0 +1,20 @@
# [1.2.0](http://gitea.gitea.svc.cluster.local:3000/djpbessems/ContainerImage.PackerExtended/compare/v1.1.0...v1.2.0) (2024-06-06)
### Features
* Add unzip (required for packer action) ([3134776](http://gitea.gitea.svc.cluster.local:3000/djpbessems/ContainerImage.PackerExtended/commit/31347764ae36478ddbb89735656cb044e6931276))
# [1.1.0](http://gitea.gitea.svc.cluster.local:3000/djpbessems/ContainerImage.PackerExtended/compare/v1.0.0...v1.1.0) (2024-06-06)
### Features
* Add nodejs (prereq for majority of actions) ([29e242c](http://gitea.gitea.svc.cluster.local:3000/djpbessems/ContainerImage.PackerExtended/commit/29e242c30c037a4e1f7102370b97b25d7f926c34))
# 1.0.0 (2024-06-05)
### Features
* Initial release w/ semantic release ([dda78b7](http://gitea.gitea.svc.cluster.local:3000/djpbessems/ContainerImage.PackerExtended/commit/dda78b733498b8cc1d48e96dc5630554828e6d62))

View File

@@ -11,55 +11,81 @@ ARG REPO_PASSWORD
ADD https://${REPO_USERNAME}:${REPO_PASSWORD}@sn.itch.fyi/Repository/bin/VMware/ovftool/4.4.x/${OVFTOOL_INSTALLER} /tmp/ovftool-installer
RUN apk --update add --no-cache \
curl && \
curl -L https://packages.microsoft.com/config/debian/10/packages-microsoft-prod.deb -o /tmp/packages-microsoft-prod.deb
curl \
jq && \
curl -L https://api.github.com/repos/mikefarah/yq/releases/latest | \
jq -r '.assets[] | select(.name | endswith("yq_linux_amd64")) | .browser_download_url' | \
xargs -I {} curl -L -o /tmp/yq {} && \
chmod +x /tmp/yq
FROM ruby:slim
FROM debian:11-slim
COPY --from=packer /bin/packer /bin/packer
COPY --from=terraform /bin/terraform /bin/terraform
COPY --from=download /tmp/packages-microsoft-prod.deb /tmp/packages-microsoft-prod.deb
COPY --from=download /tmp/ovftool-installer /tmp/ovftool-installer
COPY --from=download /tmp/yq /bin/yq
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN dpkg -i /tmp/packages-microsoft-prod.deb && \
rm -f /tmp/packages-microsoft-prod.deb && \
RUN apt-get update && apt-get install -y --no-install-recommends \
apt-transport-https \
ca-certificates \
curl \
gnupg && \
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /usr/share/keyrings/microsoft.gpg && \
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft.gpg] https://packages.microsoft.com/repos/microsoft-debian-bullseye-prod bullseye main" > /etc/apt/sources.list.d/microsoft.list && \
apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends \
# (build-essential) Dependency for installation of InSpec
build-essential \
curl \
git \
jq \
# (locales) Dependency for InSpec
locales \
make \
netcat-openbsd \
# (npm) Dependency for Gitea Actions
npm \
openssh-client \
powershell \
powershell-lts \
# (python3-*) Dependency for installation of Ansible
python3-pip \
python3-setuptools \
python3-wheel \
# (qemu-utils) Dependency for Packer (conversion to raw disk format)
qemu-utils \
# (sshpass) Dependency for Packer (non-interactive password authentication)
sshpass \
# (sshpass,xorriso) Dependency for Packer (generating isofs image)
# (unzip) Dependency for Gitea Actions
unzip \
# (xorriso) Dependency for Packer (generating isofs image)
xorriso \
yamllint && \
sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen && \
curl https://omnitruck.chef.io/install.sh | bash -s -- -P inspec && \
gem update --system && gem update && \
npm install npm@latest -g && \
npm install n -g && \
n latest && \
pip3 install --upgrade pip && \
pip3 install ansible-core && \
pwsh -Command "Set-PSRepository -Name 'PSGallery' -InstallationPolicy 'Trusted' -Verbose" && \
pwsh -Command "Install-Module -Name 'powershell-yaml','VMware.PowerCLI' -Verbose" && \
pip3 install \
ansible-core~=2.14.0 \
# (jmespath) Dependency for Ansible 'json_query' filter
jmespath \
# (netaddr) Dependency for Ansible 'ipaddr' filter
netaddr \
# (pyvmomi & requests) Dependency for Ansible 'vmware_guest' module
pyvmomi \
requests && \
update-ca-certificates --fresh && \
pwsh -Command "Set-PSRepository -Name 'PSGallery' -InstallationPolicy 'Trusted'" && \
pwsh -Command "Install-Module -Name 'powershell-yaml','VMware.PowerCLI'" && \
pwsh -Command "Set-PowerCLIConfiguration -Scope User -ParticipateInCEIP \$False -Confirm:\$False" && \
sh /tmp/ovftool-installer --console --eulas-agreed --required && \
apt-get remove -y \
apt-transport-https \
build-essential \
curl && \
# ca-certificates \
gnupg && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/* && \
rm -f /tmp/ovftool-installer

6814
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

9
package.json Normal file
View File

@@ -0,0 +1,9 @@
{
"dependencies": {
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/commit-analyzer": "^13.0.0",
"@semantic-release/git": "^10.0.1",
"@semantic-release/release-notes-generator": "^14.0.0",
"semantic-release": "^24.0.0"
}
}