Skip to content

Commit 930d4b9

Browse files
authored
Merge branch 'v3' into added-manifest-file
2 parents 00336d9 + d3b6b69 commit 930d4b9

File tree

107 files changed

+8228
-2932
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+8228
-2932
lines changed

.github/workflows/release-branch.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ on:
3535
description: 'Release branch to build & publish from'
3636
required: true
3737
type: string
38+
uploadUrl:
39+
description: 'Location to publish packages to'
40+
required: false
41+
default: "https://up-ap.nginx.com"
3842
workflow_call:
3943
inputs:
4044
githubRelease:
@@ -61,6 +65,9 @@ on:
6165
releaseBranch:
6266
type: string
6367
required: true
68+
uploadUrl:
69+
type: string
70+
default: "https://up-ap.nginx.com"
6471

6572
env:
6673
NFPM_VERSION: 'v2.35.3'
@@ -222,7 +229,7 @@ jobs:
222229
223230
upload-packages:
224231
name: Upload packages
225-
runs-on: ubuntu-22.04
232+
runs-on: ubuntu-22.04-amd64
226233
needs: [vars,release-draft,tag-release]
227234
permissions:
228235
id-token: write
@@ -314,7 +321,7 @@ jobs:
314321
if: ${{ inputs.publishPackages == true }}
315322
env:
316323
TOKEN: ${{ steps.idtoken.outputs.id_token }}
317-
UPLOAD_URL: ${{ secrets.UPLOAD_URL }}
324+
UPLOAD_URL: ${{ inputs.uploadUrl }}
318325
run: |
319326
make release
320327

.nfpm.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,20 @@ contents:
1818
mode: 0640
1919
- src: ./scripts/packages/nginx-agent.service
2020
dst: /etc/systemd/system/nginx-agent.service
21+
- src: ./scripts/packages/nginx-agent.openrc
22+
dst: /etc/init.d/nginx-agent
23+
packager: apk
2124
- src: ./scripts/nginx-agent.logrotate
2225
dst: /etc/logrotate.d/nginx-agent
26+
- src: ./scripts/selinux/nginx_agent_selinux.8
27+
dst: /usr/share/man/man8/nginx_agent_selinux.8
28+
packager: rpm
29+
- src: ./scripts/selinux/nginx_agent.if
30+
dst: /usr/share/selinux/devel/include/contrib/nginx_agent.if
31+
packager: rpm
32+
- src: ./scripts/selinux/nginx_agent.pp
33+
dst: /usr/share/selinux/packages/nginx_agent.pp
34+
packager: rpm
2335
- dst: /var/log/nginx-agent
2436
type: dir
2537
- dst: /var/lib/nginx-agent
@@ -38,6 +50,8 @@ rpm:
3850
apk:
3951
signature:
4052
key_file: ".key.rsa"
53+
scripts:
54+
postupgrade: "./scripts/packages/postupgrade.sh"
4155
scripts:
4256
preinstall: "./scripts/packages/preinstall.sh"
4357
postinstall: "./scripts/packages/postinstall.sh"

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ GOBIN ?= $$(go env GOPATH)/bin
2222
# | redhatenterprise | 8, 9 | |
2323
# | rockylinux | 8, 9 | |
2424
# | almalinux | 8, 9 | |
25-
# | alpine | 3.17, 3.18, 3.19, 3.20 | |
25+
# | alpine | 3.17, 3.18, 3.19, 3.20, 3.21 | |
2626
# | oraclelinux | 8, 9 | |
2727
# | suse | sles12sp5, sle15 | |
2828
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
@@ -205,7 +205,7 @@ build-test-nginx-plus-and-nap-image:
205205
.PHONY: build-test-plus-image
206206
build-test-plus-image:
207207
$(CONTAINER_BUILDENV) $(CONTAINER_CLITOOL) build -t nginx_plus_$(IMAGE_TAG) . \
208-
--no-cache -f ./test/docker/nginx-plus/deb/Dockerfile \
208+
--no-cache -f ./test/docker/nginx-plus/$(CONTAINER_OS_TYPE)/Dockerfile \
209209
--secret id=nginx-crt,src=$(CERTS_DIR)/nginx-repo.crt \
210210
--secret id=nginx-key,src=$(CERTS_DIR)/nginx-repo.key \
211211
--build-arg PACKAGE_NAME=$(PACKAGE_NAME) \
@@ -216,7 +216,7 @@ build-test-plus-image:
216216
.PHONY: build-test-oss-image
217217
build-test-oss-image:
218218
$(CONTAINER_BUILDENV) $(CONTAINER_CLITOOL) build -t nginx_oss_$(IMAGE_TAG) . \
219-
--no-cache -f ./test/docker/nginx-oss/deb/Dockerfile \
219+
--no-cache -f ./test/docker/nginx-oss/$(CONTAINER_OS_TYPE)/Dockerfile \
220220
--target install-agent-local \
221221
--build-arg PACKAGE_NAME=$(PACKAGE_NAME) \
222222
--build-arg PACKAGES_REPO=$(OSS_PACKAGES_REPO) \

Makefile.packaging

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ REDHAT_ARCHS ?= aarch64 x86_64
2222
ROCKY_VERSIONS ?= rocky-8 rocky-9
2323
ROCKY_ARCHS ?= aarch64 x86_64
2424
FREEBSD_DISTROS ?= "FreeBSD:13:amd64" "FreeBSD:14:amd64"
25-
APK_VERSIONS ?= 3.17 3.18 3.19 3.20
25+
APK_VERSIONS ?= 3.17 3.18 3.19 3.20 3.21
2626
APK_ARCHS ?= aarch64 x86_64
2727
ALMA_VERSIONS ?= almalinux-8 almalinux-9
2828
ALMA_ARCHS ?= aarch64 x86_64
@@ -158,7 +158,7 @@ package: gpg-key $(PACKAGES_DIR) $(GITHUB_PACKAGES_DIR) $(AZURE_PACKAGES_DIR) ##
158158
GOWORK=off CGO_ENABLED=0 GOARCH=$${goarch} GOOS=linux go build -pgo=auto -ldflags=${LDFLAGS} -o $(BINARY_PATH) $(PROJECT_DIR)/$(PROJECT_FILE); \
159159
for version in $(APK_VERSIONS); do \
160160
if [ ! -d "$(PACKAGES_DIR)/apk/v$${version}/$${arch}" ]; then mkdir -p $(PACKAGES_DIR)/apk/v$${version}/$${arch}; fi; \
161-
VERSION=$(PACKAGE_VERSION) ARCH=$${arch} nfpm pkg --config .nfpm.yaml --packager apk --target $(PACKAGES_DIR)/apk/v$${version}/$${arch}/${PACKAGE_PREFIX}-$(APK_PACKAGE_VERSION).apk; \
161+
VERSION=$(APK_PACKAGE_VERSION) ARCH=$${arch} nfpm pkg --config .nfpm.yaml --packager apk --target $(PACKAGES_DIR)/apk/v$${version}/$${arch}/${PACKAGE_PREFIX}-$(APK_PACKAGE_VERSION).apk; \
162162
cp $(PACKAGES_DIR)/apk/v$${version}/$${arch}/${PACKAGE_PREFIX}-$(APK_PACKAGE_VERSION).apk ${GITHUB_PACKAGES_DIR}/${PACKAGE_PREFIX}-$(APK_PACKAGE_VERSION)-v$${version}-$${arch}.apk; \
163163
cp $(PACKAGES_DIR)/apk/v$${version}/$${arch}/${PACKAGE_PREFIX}-$(APK_PACKAGE_VERSION).apk ${AZURE_PACKAGES_DIR}/${PACKAGE_PREFIX}-$(APK_PACKAGE_VERSION)-v$${version}-$${arch}.apk; \
164164
done; \

0 commit comments

Comments
 (0)