From 885b15017d355bc35aa4824d928a4052d38801f4 Mon Sep 17 00:00:00 2001 From: Ray Allan Date: Fri, 18 Mar 2022 20:00:29 +0000 Subject: [PATCH 1/3] Add amazon-linux-rpm-integrated and generic-rpm-integrated make targets. --- .gitignore | 1 + Makefile | 45 +- agent-container/agent-config.json | 2 +- agent-container/agent-manifest.json | 1 - agent/acs/client/acs_client_test.go | 1 + agent/acs/client/acs_error_test.go | 1 + agent/acs/handler/acs_handler_test.go | 1 + .../handler/attach_eni_handler_common_test.go | 1 + .../attach_instance_eni_handler_test.go | 1 + .../handler/attach_task_eni_handler_test.go | 1 + agent/acs/handler/heartbeat_handler_test.go | 1 + agent/acs/handler/payload_handler_test.go | 1 + .../refresh_credentials_handler_test.go | 1 + .../acs/handler/task_manifest_handler_test.go | 1 + agent/acs/update_handler/updater_test.go | 1 + agent/api/appmesh/appmesh_test.go | 1 + agent/api/container/container_test.go | 1 + agent/api/container/container_unix.go | 1 + agent/api/container/container_windows.go | 1 + agent/api/container/container_windows_test.go | 1 + .../api/container/containeroverrides_test.go | 1 + agent/api/container/containertype_test.go | 1 + agent/api/container/port_binding_test.go | 1 + .../container/status/containerstatus_test.go | 1 + .../status/managedagentstatus_test.go | 1 + .../container/transitiondependency_test.go | 1 + agent/api/container/transport_test.go | 1 + agent/api/ecsclient/client_test.go | 1 + agent/api/ecsclient/retry_handler_test.go | 1 + agent/api/ecsclient/utils_amd64_test.go | 1 + agent/api/ecsclient/utils_arm64_test.go | 1 + agent/api/eni/eni_test.go | 1 + agent/api/eni/eniattachment_test.go | 1 + agent/api/eni/enistatus_test.go | 1 + agent/api/statechange_test.go | 1 + agent/api/task/association_test.go | 1 + agent/api/task/status/statusmapping_test.go | 1 + agent/api/task/status/taskstatus_test.go | 1 + agent/api/task/task_linux.go | 1 + agent/api/task/task_linux_test.go | 1 + agent/api/task/task_test.go | 1 + agent/api/task/task_test_utils.go | 1 + agent/api/task/task_unsupported.go | 1 + agent/api/task/task_windows.go | 1 + agent/api/task/task_windows_test.go | 1 + agent/api/task/taskvolume_test.go | 1 + agent/api/task/taskvolume_windows_test.go | 1 + agent/api/task/types_unmarshal_test.go | 1 + agent/api/task/util_test.go | 1 + agent/api/testutils/container_equal_test.go | 1 + agent/api/testutils/task_equal_test.go | 1 + agent/app/agent_capability_test.go | 1 + agent/app/agent_capability_unix.go | 1 + agent/app/agent_capability_unix_test.go | 1 + agent/app/agent_capability_unspecified.go | 1 + agent/app/agent_capability_windows.go | 1 + agent/app/agent_capability_windows_test.go | 1 + agent/app/agent_compatibility_linux.go | 1 + agent/app/agent_compatibility_linux_test.go | 1 + agent/app/agent_compatibility_unspecified.go | 1 + agent/app/agent_integ_test.go | 1 + agent/app/agent_test.go | 1 + agent/app/agent_unix.go | 1 + agent/app/agent_unix_test.go | 1 + agent/app/agent_unspecified.go | 1 + agent/app/agent_windows.go | 1 + agent/app/agent_windows_test.go | 1 + agent/app/data_test.go | 1 + agent/asm/asm_test.go | 1 + agent/async/lru_cache_test.go | 1 + agent/config/conditional_test.go | 1 + agent/config/config_test.go | 1 + agent/config/config_unix.go | 1 + agent/config/config_unix_test.go | 1 + agent/config/config_windows.go | 1 + agent/config/config_windows_test.go | 1 + agent/config/const_linux.go | 1 + agent/config/const_unknown.go | 1 + agent/config/const_windows.go | 1 + agent/config/os_family_windows.go | 1 + agent/config/os_family_windows_test.go | 1 + agent/config/parse_linux.go | 1 + agent/config/parse_unsupported.go | 1 + agent/config/parse_windows.go | 1 + agent/config/parse_windows_test.go | 1 + agent/config/sensitive_test.go | 1 + agent/config/types_unix.go | 1 + agent/config/types_windows.go | 1 + agent/containermetadata/manager_test.go | 1 + agent/containermetadata/manager_unix_test.go | 1 + .../containermetadata/manager_windows_test.go | 1 + .../containermetadata/parse_metadata_test.go | 1 + agent/containermetadata/types_test.go | 1 + agent/containermetadata/utils_test.go | 1 + .../containermetadata/write_metadata_test.go | 1 + .../containermetadata/write_metadata_unix.go | 1 + .../write_metadata_unix_test.go | 1 + .../write_metadata_windows.go | 1 + .../write_metadata_windows_test.go | 1 + .../instancecreds/instancecreds_test.go | 1 + agent/credentials/manager_test.go | 1 + ...tating_shared_credentials_provider_test.go | 1 + agent/data/client_test.go | 1 + agent/data/container_client_test.go | 1 + agent/data/eniattachment_client_test.go | 1 + agent/data/helpers_test.go | 1 + agent/data/imagestate_client_test.go | 1 + agent/data/metadata_client_test.go | 1 + agent/data/task_client_test.go | 1 + .../dockerapi/docker_client_test.go | 1 + .../dockerapi/docker_events_buffer_test.go | 1 + agent/dockerclient/dockerapi/errors_test.go | 1 + .../inactivity_timeout_handler_test.go | 1 + .../dockerapi_compare_versions_test.go | 1 + .../dockerauth/dockerauth_test.go | 1 + agent/dockerclient/dockerauth/ecr_test.go | 1 + .../sdkclientfactory/sdkclientfactory_test.go | 1 + .../sdkclientfactory_unix_test.go | 1 + .../sdkclientfactory_windows_test.go | 1 + .../sdkclientfactory/versionsupport_unix.go | 1 + .../versionsupport_windows.go | 1 + agent/ec2/ec2_client_test.go | 1 + agent/ec2/ec2_metadata_client_test.go | 1 + agent/ecr/client_test.go | 1 + agent/ecr/factory_test.go | 1 + agent/ecscni/namespace_helper_linux.go | 1 + agent/ecscni/namespace_helper_unsupported.go | 1 + agent/ecscni/namespace_helper_windows.go | 1 + agent/ecscni/namespace_helper_windows_test.go | 1 + agent/ecscni/netconfig_linux.go | 1 + agent/ecscni/netconfig_windows.go | 1 + agent/ecscni/netconfig_windows_test.go | 1 + agent/ecscni/plugin_linux.go | 1 + agent/ecscni/plugin_linux_test.go | 1 + agent/ecscni/plugin_test.go | 1 + agent/ecscni/plugin_unsupported.go | 1 + agent/ecscni/plugin_windows.go | 1 + agent/ecscni/plugin_windows_test.go | 1 + agent/ecscni/types_linux.go | 1 + agent/ecscni/types_windows.go | 1 + agent/engine/common_integ_test.go | 1 + agent/engine/common_unix_integ_test.go | 2 + agent/engine/data_test.go | 1 + agent/engine/dependencygraph/graph_test.go | 1 + .../engine/dependencygraph/graph_unix_test.go | 1 + .../engine/docker_image_manager_data_test.go | 1 + .../engine/docker_image_manager_integ_test.go | 1 + agent/engine/docker_image_manager_test.go | 1 + .../docker_image_manager_unix_integ_test.go | 1 + ...docker_image_manager_windows_integ_test.go | 1 + agent/engine/docker_task_engine_linux.go | 1 + agent/engine/docker_task_engine_linux_test.go | 1 + agent/engine/docker_task_engine_test.go | 1 + .../engine/docker_task_engine_unsupported.go | 1 + agent/engine/docker_task_engine_windows.go | 1 + .../engine/docker_task_engine_windows_test.go | 1 + agent/engine/dockerstate/dockerstate_test.go | 1 + agent/engine/dockerstate/json_test.go | 1 + .../engine/dockerstate/testutils/json_test.go | 1 + agent/engine/engine_integ_test.go | 1 + agent/engine/engine_sudo_linux_integ_test.go | 1 + agent/engine/engine_unix_integ_test.go | 1 + agent/engine/engine_windows_integ_test.go | 1 + .../engine/execcmd/manager_init_task_linux.go | 1 + .../execcmd/manager_init_task_linux_test.go | 1 + agent/engine/execcmd/manager_start_linux.go | 1 + .../execcmd/manager_start_linux_test.go | 1 + agent/engine/execcmd/manager_unsupported.go | 1 + agent/engine/ordering_integ_test.go | 1 + agent/engine/ordering_integ_unix_test.go | 1 + agent/engine/ordering_integ_windows_test.go | 1 + agent/engine/task_manager_data_test.go | 1 + agent/engine/task_manager_test.go | 1 + agent/engine/task_manager_unix_test.go | 1 + agent/eni/iphelperwrapper/iphelper_windows.go | 1 + .../iphelperwrapper/iphelper_windows_test.go | 1 + .../mibIpInterfaceRow_windows.go | 1 + agent/eni/netlinkwrapper/netlink_linux.go | 1 + agent/eni/networkutils/utils_linux.go | 1 + agent/eni/networkutils/utils_linux_test.go | 1 + agent/eni/networkutils/utils_windows.go | 1 + agent/eni/networkutils/utils_windows_test.go | 1 + agent/eni/pause/error_test.go | 1 + agent/eni/pause/load_test.go | 1 + agent/eni/pause/pause_linux.go | 1 + agent/eni/pause/pause_linux_test.go | 1 + agent/eni/pause/pause_unsupported.go | 1 + agent/eni/pause/pause_windows.go | 1 + agent/eni/udevwrapper/udev_linux.go | 1 + agent/eni/udevwrapper/udev_unsupported.go | 1 + agent/eni/watcher/watcher_linux.go | 1 + agent/eni/watcher/watcher_linux_test.go | 1 + agent/eni/watcher/watcher_test.go | 1 + agent/eni/watcher/watcher_unsupported.go | 1 + agent/eni/watcher/watcher_windows.go | 1 + agent/eni/watcher/watcher_windows_test.go | 1 + agent/eventhandler/attachment_handler_test.go | 1 + agent/eventhandler/handler_test.go | 1 + agent/eventhandler/task_handler_test.go | 1 + agent/eventhandler/task_handler_types_test.go | 1 + agent/eventstream/eventstream_test.go | 1 + agent/fsx/fsx_test.go | 1 + agent/gogenerate/awssdk.go | 1 + agent/gpu/generate_mocks.go | 1 + agent/gpu/nvidia_gpu_manager_unix.go | 1 + agent/gpu/nvidia_gpu_manager_unix_test.go | 1 + .../introspection_server_setup_test.go | 1 + agent/handlers/task_server_setup_test.go | 1 + agent/handlers/utils/helpers_test.go | 1 + agent/handlers/v1/license_handler_test.go | 1 + agent/handlers/v1/response_test.go | 1 + agent/handlers/v2/response_test.go | 1 + agent/handlers/v2/stats_response_test.go | 1 + agent/handlers/v3/response_test.go | 1 + agent/handlers/v4/response_test.go | 1 + agent/httpclient/httpclient_test.go | 1 + agent/logger/audit/audit_log_test.go | 1 + agent/logger/buffer_pool_test.go | 1 + agent/logger/eventlog_windows.go | 1 + agent/logger/format_test.go | 1 + agent/logger/global_test.go | 1 + agent/logger/log_init_test.go | 1 + agent/logger/log_test.go | 1 + agent/logger/log_unix_test.go | 1 + agent/logger/log_windows_test.go | 1 + agent/logger/platform_unix.go | 1 + agent/logger/structured_logger_test.go | 1 + agent/metrics/metrics_test.go | 1 + agent/s3/s3_test.go | 1 + agent/sighandlers/debug_handler.go | 1 + agent/sighandlers/debug_handler_windows.go | 1 + agent/sighandlers/termination_handler_test.go | 1 + agent/ssm/ssm_test.go | 1 + .../dependencies/dependencies_windows.go | 1 + agent/statemanager/helper_unix_test.go | 1 + agent/statemanager/helper_windows_test.go | 1 + agent/statemanager/state_manager_test.go | 1 + agent/statemanager/state_manager_unix.go | 1 + agent/statemanager/state_manager_unix_test.go | 1 + agent/statemanager/state_manager_win_test.go | 1 + agent/statemanager/state_manager_windows.go | 1 + .../state_manager_windows_test.go | 1 + agent/stats/common_unix_test.go | 1 + agent/stats/common_windows_test.go | 1 + agent/stats/container_test.go | 1 + agent/stats/engine_integ_test.go | 1 + agent/stats/engine_test.go | 1 + agent/stats/engine_unix_integ_test.go | 1 + agent/stats/engine_unix_test.go | 1 + agent/stats/queue_test.go | 1 + agent/stats/task_linux.go | 1 + agent/stats/task_linux_test.go | 1 + agent/stats/task_unspecified.go | 1 + agent/stats/utils_test.go | 1 + agent/stats/utils_unix.go | 1 + agent/stats/utils_unix_test.go | 1 + agent/stats/utils_windows.go | 1 + agent/stats/utils_windows_test.go | 1 + agent/taskresource/asmauth/asmauth_test.go | 1 + .../asmauth/asmauthstatus_test.go | 1 + .../taskresource/asmsecret/asmsecret_test.go | 1 + .../asmsecret/asmsecretstatus_test.go | 1 + agent/taskresource/cgroup/cgroup.go | 1 + agent/taskresource/cgroup/cgroup_test.go | 1 + .../taskresource/cgroup/cgroup_unsupported.go | 1 + agent/taskresource/cgroup/cgroupstatus.go | 1 + .../taskresource/cgroup/cgroupstatus_test.go | 1 + .../cgroup/control/cgroup_controller_linux.go | 1 + .../control/cgroup_controller_linux_test.go | 1 + .../cgroup/control/factory/factory_linux.go | 1 + .../control/factory/generate_mocks_linux.go | 1 + .../cgroup/control/generate_mocks_linux.go | 1 + .../taskresource/cgroup/control/init_linux.go | 1 + .../cgroup/control/init_linux_test.go | 1 + .../cgroup/control/types_linux.go | 1 + .../credentialspec_unsupported.go | 1 + .../credentialspec/credentialspec_windows.go | 1 + .../credentialspec_windows_test.go | 1 + agent/taskresource/envFiles/envfile_test.go | 1 + .../envFiles/envfilestatus_test.go | 1 + .../firelens/firelens_unimplemented.go | 1 + agent/taskresource/firelens/firelens_unix.go | 1 + .../firelens/firelens_unix_test.go | 1 + .../firelens/firelensconfig_unix.go | 1 + .../firelens/firelensconfig_unix_test.go | 1 + .../firelens/firelensstatus_test.go | 1 + agent/taskresource/firelens/json_unix.go | 1 + agent/taskresource/firelens/json_unix_test.go | 1 + .../fsxwindowsfileserver_unsupported.go | 1 + .../fsxwindowsfileserver_windows.go | 1 + .../fsxwindowsfileserver_windows_test.go | 1 + .../fsxwindowsfileserverstatus_test.go | 1 + .../taskresource/ssmsecret/ssmsecret_test.go | 1 + .../ssmsecret/ssmsecretstatus_test.go | 1 + agent/taskresource/types/types_linux_test.go | 1 + agent/taskresource/types/types_test.go | 1 + agent/taskresource/types_unix.go | 1 + agent/taskresource/types_unsupported.go | 1 + agent/taskresource/types_windows.go | 1 + .../taskresource/volume/dockervolume_test.go | 1 + .../taskresource/volume/volumestatus_test.go | 1 + agent/tcs/client/client_test.go | 1 + agent/tcs/handler/handler_test.go | 1 + agent/tcs/handler/types_test.go | 1 + agent/tools.go | 1 + agent/utils/compare_versions_test.go | 1 + agent/utils/cpuinfo.go | 1 + agent/utils/cpuinfo_test.go | 1 + agent/utils/json_test.go | 1 + agent/utils/license_test.go | 1 + agent/utils/nswrapper/ns_linux.go | 1 + agent/utils/retry/backoff_test.go | 1 + agent/utils/retry/exponential_backoff_test.go | 1 + agent/utils/retry/retry.go | 3 +- agent/utils/retry/retry_test.go | 3 +- agent/utils/sync/sequential_waitgroup_test.go | 1 + agent/utils/ticker_test.go | 1 + agent/utils/utils_linux.go | 1 + agent/utils/utils_linux_test.go | 1 + agent/utils/utils_test.go | 1 + agent/utils/utils_unsupported.go | 1 + agent/utils/utils_windows.go | 1 + agent/utils/utils_windows_test.go | 1 + agent/wsclient/client_test.go | 1 + misc/pause-container/pause-config.json | 3 +- .../amazon-ecs-volume-plugin.conf | 22 + .../amazon-ecs-volume-plugin.service | 27 + .../amazon-ecs-volume-plugin.socket | 23 + .../amazon-linux-ami-integrated/ecs-init.spec | 716 +++++++++++++++ .../amazon-linux-ami-integrated/ecs.conf | 22 + .../amazon-linux-ami-integrated/ecs.service | 34 + .../debian/README.source | 23 + .../debian/amazon-ecs-init.install | 2 + .../debian/amazon-ecs-init.manpages | 1 + .../debian/amazon-ecs-volume-plugin.service | 27 + .../debian/amazon-ecs-volume-plugin.socket | 23 + .../generic-deb-integrated/debian/changelog | 820 ++++++++++++++++++ .../generic-deb-integrated/debian/compat | 1 + .../generic-deb-integrated/debian/control | 16 + .../generic-deb-integrated/debian/copyright | 66 ++ packaging/generic-deb-integrated/debian/dirs | 6 + packaging/generic-deb-integrated/debian/docs | 1 + .../generic-deb-integrated/debian/ecs.service | 33 + packaging/generic-deb-integrated/debian/rules | 23 + .../debian/source/format | 1 + .../debian/source/include-binaries | 1 + packaging/generic-rpm-integrated/README.md | 30 + .../amazon-ecs-init.spec | 543 ++++++++++++ .../amazon-ecs-volume-plugin.service | 27 + .../amazon-ecs-volume-plugin.socket | 23 + packaging/generic-rpm-integrated/ecs.service | 34 + packaging/generic-rpm/amazon-ecs-init.spec | 13 +- scripts/build | 11 + scripts/build-agent-image | 19 + scripts/build-cni-plugins | 39 +- scripts/gobuild-agent-init | 54 ++ scripts/repobuild-pause | 31 + 357 files changed, 3062 insertions(+), 27 deletions(-) create mode 100644 packaging/amazon-linux-ami-integrated/amazon-ecs-volume-plugin.conf create mode 100644 packaging/amazon-linux-ami-integrated/amazon-ecs-volume-plugin.service create mode 100644 packaging/amazon-linux-ami-integrated/amazon-ecs-volume-plugin.socket create mode 100644 packaging/amazon-linux-ami-integrated/ecs-init.spec create mode 100755 packaging/amazon-linux-ami-integrated/ecs.conf create mode 100644 packaging/amazon-linux-ami-integrated/ecs.service create mode 100644 packaging/generic-deb-integrated/debian/README.source create mode 100644 packaging/generic-deb-integrated/debian/amazon-ecs-init.install create mode 100644 packaging/generic-deb-integrated/debian/amazon-ecs-init.manpages create mode 100644 packaging/generic-deb-integrated/debian/amazon-ecs-volume-plugin.service create mode 100644 packaging/generic-deb-integrated/debian/amazon-ecs-volume-plugin.socket create mode 100644 packaging/generic-deb-integrated/debian/changelog create mode 100644 packaging/generic-deb-integrated/debian/compat create mode 100644 packaging/generic-deb-integrated/debian/control create mode 100644 packaging/generic-deb-integrated/debian/copyright create mode 100644 packaging/generic-deb-integrated/debian/dirs create mode 100644 packaging/generic-deb-integrated/debian/docs create mode 100644 packaging/generic-deb-integrated/debian/ecs.service create mode 100755 packaging/generic-deb-integrated/debian/rules create mode 100644 packaging/generic-deb-integrated/debian/source/format create mode 100644 packaging/generic-deb-integrated/debian/source/include-binaries create mode 100644 packaging/generic-rpm-integrated/README.md create mode 100644 packaging/generic-rpm-integrated/amazon-ecs-init.spec create mode 100644 packaging/generic-rpm-integrated/amazon-ecs-volume-plugin.service create mode 100644 packaging/generic-rpm-integrated/amazon-ecs-volume-plugin.socket create mode 100644 packaging/generic-rpm-integrated/ecs.service create mode 100755 scripts/gobuild-agent-init create mode 100755 scripts/repobuild-pause diff --git a/.gitignore b/.gitignore index 77d3f530b58..27f8b948468 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ _bin/ *.swp *.orig /agent/version/_version.go +/ecs-init/version/version.go .agignore *.sublime-* .DS_Store diff --git a/Makefile b/Makefile index f63d969606f..ff542fdde16 100644 --- a/Makefile +++ b/Makefile @@ -239,18 +239,19 @@ cni-plugins: get-cni-sources .out-stamp build-ecs-cni-plugins build-vpc-cni-plug # dockerfree build process will build the agent container image from scratch # and with minimal dependencies # requires glibc-static - +# dockerfree-pause works for both amd64 and arm64 dockerfree-pause: - GOOS=linux GOARCH=amd64 ./scripts/build-pause + ./scripts/build-pause +# dockerfree-certs works for both amd64 and arm64 dockerfree-certs: - GOOS=linux GOARCH=amd64 ./scripts/get-host-certs + ./scripts/get-host-certs dockerfree-cni-plugins: get-cni-sources - GOOS=linux GOARCH=amd64 ./scripts/build-cni-plugins + ./scripts/build-cni-plugins dockerfree-agent-image: dockerfree-pause dockerfree-certs dockerfree-cni-plugins static-with-pause - GOOS=linux GOARCH=amd64 ./scripts/build-agent-image + ./scripts/build-agent-image .PHONY: codebuild codebuild: .out-stamp @@ -356,6 +357,36 @@ get-deps-init: go get golang.org/x/tools/cmd/goimports go get honnef.co/go/tools/cmd/staticcheck +.amazon-linux-rpm-integrated-done: + ./scripts/update-version.sh + cp packaging/amazon-linux-ami-integrated/ecs-init.spec ecs-init.spec + cp packaging/amazon-linux-ami-integrated/ecs.conf ecs.conf + cp packaging/amazon-linux-ami-integrated/ecs.service ecs.service + cp packaging/amazon-linux-ami-integrated/amazon-ecs-volume-plugin.conf amazon-ecs-volume-plugin.conf + cp packaging/amazon-linux-ami-integrated/amazon-ecs-volume-plugin.service amazon-ecs-volume-plugin.service + cp packaging/amazon-linux-ami-integrated/amazon-ecs-volume-plugin.socket amazon-ecs-volume-plugin.socket + tar -czf ./sources.tgz ecs-init scripts misc agent amazon-ecs-cni-plugins amazon-vpc-cni-plugins agent-container VERSION + test -e SOURCES || ln -s . SOURCES + rpmbuild --define "%_topdir $(PWD)" -bb ecs-init.spec + find RPMS/ -type f -exec cp {} . \; + touch .amazon-linux-rpm-integrated-done + +amazon-linux-rpm-integrated: .amazon-linux-rpm-integrated-done + +.generic-rpm-integrated-done: + ./scripts/update-version.sh + cp packaging/generic-rpm-integrated/amazon-ecs-init.spec amazon-ecs-init.spec + cp packaging/generic-rpm-integrated/ecs.service ecs.service + cp packaging/generic-rpm-integrated/amazon-ecs-volume-plugin.service amazon-ecs-volume-plugin.service + cp packaging/generic-rpm-integrated/amazon-ecs-volume-plugin.socket amazon-ecs-volume-plugin.socket + tar -czf ./sources.tgz ecs-init scripts misc agent amazon-ecs-cni-plugins amazon-vpc-cni-plugins agent-container VERSION + test -e SOURCES || ln -s . SOURCES + rpmbuild --define "%_topdir $(PWD)" -bb amazon-ecs-init.spec + find RPMS/ -type f -exec cp {} . \; + touch .generic-rpm-integrated-done + +generic-rpm-integrated: .generic-rpm-integrated-done + .generic-rpm-done: ./scripts/update-version.sh cp packaging/generic-rpm/amazon-ecs-init.spec amazon-ecs-init.spec @@ -366,12 +397,10 @@ get-deps-init: test -e SOURCES || ln -s . SOURCES rpmbuild --define "%_topdir $(PWD)" -bb amazon-ecs-init.spec find RPMS/ -type f -exec cp {} . \; - touch .rpm-done + touch .generic-rpm-done generic-rpm: .generic-rpm-done -dockerfree-all: dockerfree-agent-image generic-rpm - .deb-done: BUILDROOT/ecs-agent.tar ./scripts/update-version.sh tar -czf ./amazon-ecs-init_${VERSION}.orig.tar.gz ecs-init scripts README.md diff --git a/agent-container/agent-config.json b/agent-container/agent-config.json index 30594914aac..fc3f1ed1492 100644 --- a/agent-container/agent-config.json +++ b/agent-container/agent-config.json @@ -1 +1 @@ -{"author":"Amazon Web Services, Inc.","config":{"Cmd":["/agent"],"ArgsEscaped":true},"created":"~~timestamp~~","history":[{"created":"~~timestamp~~","author":"Amazon Web Services, Inc.","created_by":"[] + [] === \"\"","empty_layer":true}],"os":"linux","rootfs":{"type":"layers","diff_ids":["sha256:~~digest~~"]}} +{"author":"Amazon Web Services, Inc.","config":{"Cmd":["/agent"],"ArgsEscaped":true},"created":"~~timestamp~~","history":[{"created":"~~timestamp~~","author":"Amazon Web Services, Inc.","created_by":"°o°","empty_layer":true}],"os":"linux","rootfs":{"type":"layers","diff_ids":["sha256:~~digest~~"]}} diff --git a/agent-container/agent-manifest.json b/agent-container/agent-manifest.json index 01681945ec2..840d0392d65 100644 --- a/agent-container/agent-manifest.json +++ b/agent-container/agent-manifest.json @@ -1,2 +1 @@ [{"Config":"config.json","RepoTags":["amazon/amazon-ecs-agent:~~agentversion~~"],"Layers":["rootfs/layer.tar"]}] - diff --git a/agent/acs/client/acs_client_test.go b/agent/acs/client/acs_client_test.go index 6e56e84f55f..9efa8abe454 100644 --- a/agent/acs/client/acs_client_test.go +++ b/agent/acs/client/acs_client_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/acs/client/acs_error_test.go b/agent/acs/client/acs_error_test.go index c8c631040bf..1ba77736245 100644 --- a/agent/acs/client/acs_error_test.go +++ b/agent/acs/client/acs_error_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/acs/handler/acs_handler_test.go b/agent/acs/handler/acs_handler_test.go index b086a86a869..ed25e268d55 100644 --- a/agent/acs/handler/acs_handler_test.go +++ b/agent/acs/handler/acs_handler_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/acs/handler/attach_eni_handler_common_test.go b/agent/acs/handler/attach_eni_handler_common_test.go index 6453ebc002a..fddbf3f8e68 100644 --- a/agent/acs/handler/attach_eni_handler_common_test.go +++ b/agent/acs/handler/attach_eni_handler_common_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/acs/handler/attach_instance_eni_handler_test.go b/agent/acs/handler/attach_instance_eni_handler_test.go index 0a51baefaa3..b834eddbde4 100644 --- a/agent/acs/handler/attach_instance_eni_handler_test.go +++ b/agent/acs/handler/attach_instance_eni_handler_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/acs/handler/attach_task_eni_handler_test.go b/agent/acs/handler/attach_task_eni_handler_test.go index fbe240e7441..cdcda4bdad3 100644 --- a/agent/acs/handler/attach_task_eni_handler_test.go +++ b/agent/acs/handler/attach_task_eni_handler_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/acs/handler/heartbeat_handler_test.go b/agent/acs/handler/heartbeat_handler_test.go index ac3a7eb7343..176de61acb1 100644 --- a/agent/acs/handler/heartbeat_handler_test.go +++ b/agent/acs/handler/heartbeat_handler_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/acs/handler/payload_handler_test.go b/agent/acs/handler/payload_handler_test.go index b265efb9c10..5f96f911bcf 100644 --- a/agent/acs/handler/payload_handler_test.go +++ b/agent/acs/handler/payload_handler_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/acs/handler/refresh_credentials_handler_test.go b/agent/acs/handler/refresh_credentials_handler_test.go index d7fa8f88892..a87df989a20 100644 --- a/agent/acs/handler/refresh_credentials_handler_test.go +++ b/agent/acs/handler/refresh_credentials_handler_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/acs/handler/task_manifest_handler_test.go b/agent/acs/handler/task_manifest_handler_test.go index 545bb46cf5d..cce4b9c24dc 100644 --- a/agent/acs/handler/task_manifest_handler_test.go +++ b/agent/acs/handler/task_manifest_handler_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/acs/update_handler/updater_test.go b/agent/acs/update_handler/updater_test.go index adeff4458ef..48d536215d5 100644 --- a/agent/acs/update_handler/updater_test.go +++ b/agent/acs/update_handler/updater_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/api/appmesh/appmesh_test.go b/agent/api/appmesh/appmesh_test.go index 846c9036988..9061499609b 100644 --- a/agent/api/appmesh/appmesh_test.go +++ b/agent/api/appmesh/appmesh_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/api/container/container_test.go b/agent/api/container/container_test.go index 76d248b1446..5aa8f2a701c 100644 --- a/agent/api/container/container_test.go +++ b/agent/api/container/container_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/api/container/container_unix.go b/agent/api/container/container_unix.go index a105be71284..defdaf30970 100644 --- a/agent/api/container/container_unix.go +++ b/agent/api/container/container_unix.go @@ -1,4 +1,5 @@ //go:build !windows +// +build !windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/api/container/container_windows.go b/agent/api/container/container_windows.go index 3b81dbb58a6..f481aaabeab 100644 --- a/agent/api/container/container_windows.go +++ b/agent/api/container/container_windows.go @@ -1,4 +1,5 @@ //go:build windows +// +build windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/api/container/container_windows_test.go b/agent/api/container/container_windows_test.go index 89aa2f08a43..669019ad850 100644 --- a/agent/api/container/container_windows_test.go +++ b/agent/api/container/container_windows_test.go @@ -1,4 +1,5 @@ //go:build windows && unit +// +build windows,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/api/container/containeroverrides_test.go b/agent/api/container/containeroverrides_test.go index c7479c7dc8a..da40ea00c98 100644 --- a/agent/api/container/containeroverrides_test.go +++ b/agent/api/container/containeroverrides_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/api/container/containertype_test.go b/agent/api/container/containertype_test.go index 41298acfc1c..5681df63a8b 100644 --- a/agent/api/container/containertype_test.go +++ b/agent/api/container/containertype_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/api/container/port_binding_test.go b/agent/api/container/port_binding_test.go index 5648e4f0c8f..603490dd7e1 100644 --- a/agent/api/container/port_binding_test.go +++ b/agent/api/container/port_binding_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/api/container/status/containerstatus_test.go b/agent/api/container/status/containerstatus_test.go index 10cd9b94783..0016f1cf19f 100644 --- a/agent/api/container/status/containerstatus_test.go +++ b/agent/api/container/status/containerstatus_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/api/container/status/managedagentstatus_test.go b/agent/api/container/status/managedagentstatus_test.go index 151312367a6..332c11d1899 100644 --- a/agent/api/container/status/managedagentstatus_test.go +++ b/agent/api/container/status/managedagentstatus_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/api/container/transitiondependency_test.go b/agent/api/container/transitiondependency_test.go index 093f8dbc331..e4466988d1f 100644 --- a/agent/api/container/transitiondependency_test.go +++ b/agent/api/container/transitiondependency_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/api/container/transport_test.go b/agent/api/container/transport_test.go index 5e230054b6b..2f21240ee8d 100644 --- a/agent/api/container/transport_test.go +++ b/agent/api/container/transport_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/api/ecsclient/client_test.go b/agent/api/ecsclient/client_test.go index 21fedd0ba82..bd65af02213 100644 --- a/agent/api/ecsclient/client_test.go +++ b/agent/api/ecsclient/client_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/api/ecsclient/retry_handler_test.go b/agent/api/ecsclient/retry_handler_test.go index 24f523a0065..2194355ffb9 100644 --- a/agent/api/ecsclient/retry_handler_test.go +++ b/agent/api/ecsclient/retry_handler_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/api/ecsclient/utils_amd64_test.go b/agent/api/ecsclient/utils_amd64_test.go index 7ecd0e2b17c..5bb95300c54 100644 --- a/agent/api/ecsclient/utils_amd64_test.go +++ b/agent/api/ecsclient/utils_amd64_test.go @@ -1,4 +1,5 @@ //go:build amd64 && unit +// +build amd64,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/api/ecsclient/utils_arm64_test.go b/agent/api/ecsclient/utils_arm64_test.go index 37d680ad1b0..1a46f13425b 100644 --- a/agent/api/ecsclient/utils_arm64_test.go +++ b/agent/api/ecsclient/utils_arm64_test.go @@ -1,4 +1,5 @@ //go:build arm64 && unit +// +build arm64,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/api/eni/eni_test.go b/agent/api/eni/eni_test.go index 11b4a3fe52a..2ed2f0b3b15 100644 --- a/agent/api/eni/eni_test.go +++ b/agent/api/eni/eni_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/api/eni/eniattachment_test.go b/agent/api/eni/eniattachment_test.go index 4c188fd56b5..6f46caecabd 100644 --- a/agent/api/eni/eniattachment_test.go +++ b/agent/api/eni/eniattachment_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/api/eni/enistatus_test.go b/agent/api/eni/enistatus_test.go index c76acc3b4b1..1f42345ae06 100644 --- a/agent/api/eni/enistatus_test.go +++ b/agent/api/eni/enistatus_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/api/statechange_test.go b/agent/api/statechange_test.go index 72ed57f027e..42657e16b78 100644 --- a/agent/api/statechange_test.go +++ b/agent/api/statechange_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/api/task/association_test.go b/agent/api/task/association_test.go index a3056eae414..0544af0aab6 100644 --- a/agent/api/task/association_test.go +++ b/agent/api/task/association_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/api/task/status/statusmapping_test.go b/agent/api/task/status/statusmapping_test.go index a4f345f34bc..0d5c757bc92 100644 --- a/agent/api/task/status/statusmapping_test.go +++ b/agent/api/task/status/statusmapping_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/api/task/status/taskstatus_test.go b/agent/api/task/status/taskstatus_test.go index 270223bee9c..4a9938581d6 100644 --- a/agent/api/task/status/taskstatus_test.go +++ b/agent/api/task/status/taskstatus_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/api/task/task_linux.go b/agent/api/task/task_linux.go index 605cb7ab214..d85a52ea613 100644 --- a/agent/api/task/task_linux.go +++ b/agent/api/task/task_linux.go @@ -1,4 +1,5 @@ //go:build linux +// +build linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/api/task/task_linux_test.go b/agent/api/task/task_linux_test.go index a241ee5d42f..de1c38e9667 100644 --- a/agent/api/task/task_linux_test.go +++ b/agent/api/task/task_linux_test.go @@ -1,4 +1,5 @@ //go:build linux && unit +// +build linux,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/api/task/task_test.go b/agent/api/task/task_test.go index f25a11f2c16..2e557d868ef 100644 --- a/agent/api/task/task_test.go +++ b/agent/api/task/task_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/api/task/task_test_utils.go b/agent/api/task/task_test_utils.go index 66707a2b5c1..d8c3ec97012 100644 --- a/agent/api/task/task_test_utils.go +++ b/agent/api/task/task_test_utils.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/api/task/task_unsupported.go b/agent/api/task/task_unsupported.go index 33c3636e9ff..8ea6cb31cfe 100644 --- a/agent/api/task/task_unsupported.go +++ b/agent/api/task/task_unsupported.go @@ -1,4 +1,5 @@ //go:build !linux && !windows +// +build !linux,!windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/api/task/task_windows.go b/agent/api/task/task_windows.go index 766a48555d8..178049dac56 100644 --- a/agent/api/task/task_windows.go +++ b/agent/api/task/task_windows.go @@ -1,4 +1,5 @@ //go:build windows +// +build windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/api/task/task_windows_test.go b/agent/api/task/task_windows_test.go index cde35b42024..78e8122f933 100644 --- a/agent/api/task/task_windows_test.go +++ b/agent/api/task/task_windows_test.go @@ -1,4 +1,5 @@ //go:build windows && unit +// +build windows,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/api/task/taskvolume_test.go b/agent/api/task/taskvolume_test.go index dac7a2bffaf..737dd8e1342 100644 --- a/agent/api/task/taskvolume_test.go +++ b/agent/api/task/taskvolume_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/api/task/taskvolume_windows_test.go b/agent/api/task/taskvolume_windows_test.go index b85bcb44489..2d02669b15d 100644 --- a/agent/api/task/taskvolume_windows_test.go +++ b/agent/api/task/taskvolume_windows_test.go @@ -1,4 +1,5 @@ //go:build windows && unit +// +build windows,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/api/task/types_unmarshal_test.go b/agent/api/task/types_unmarshal_test.go index 04890be8890..bd2c3d069a8 100644 --- a/agent/api/task/types_unmarshal_test.go +++ b/agent/api/task/types_unmarshal_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/api/task/util_test.go b/agent/api/task/util_test.go index 1b17240e443..8c440971b8b 100644 --- a/agent/api/task/util_test.go +++ b/agent/api/task/util_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/api/testutils/container_equal_test.go b/agent/api/testutils/container_equal_test.go index b1162560bb0..5e7a90e58b8 100644 --- a/agent/api/testutils/container_equal_test.go +++ b/agent/api/testutils/container_equal_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/api/testutils/task_equal_test.go b/agent/api/testutils/task_equal_test.go index 069e583e0bf..68300334d30 100644 --- a/agent/api/testutils/task_equal_test.go +++ b/agent/api/testutils/task_equal_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/app/agent_capability_test.go b/agent/app/agent_capability_test.go index 0753f3910c7..a0e558e6dae 100644 --- a/agent/app/agent_capability_test.go +++ b/agent/app/agent_capability_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/app/agent_capability_unix.go b/agent/app/agent_capability_unix.go index b7fed896c07..f7c2b318f5c 100644 --- a/agent/app/agent_capability_unix.go +++ b/agent/app/agent_capability_unix.go @@ -1,4 +1,5 @@ //go:build linux +// +build linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/app/agent_capability_unix_test.go b/agent/app/agent_capability_unix_test.go index 98f281d7c39..fc476506f68 100644 --- a/agent/app/agent_capability_unix_test.go +++ b/agent/app/agent_capability_unix_test.go @@ -1,4 +1,5 @@ //go:build linux && unit +// +build linux,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/app/agent_capability_unspecified.go b/agent/app/agent_capability_unspecified.go index 28cfb80d45a..de0c37f8858 100644 --- a/agent/app/agent_capability_unspecified.go +++ b/agent/app/agent_capability_unspecified.go @@ -1,4 +1,5 @@ //go:build !linux && !windows +// +build !linux,!windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/app/agent_capability_windows.go b/agent/app/agent_capability_windows.go index 99225922e2a..749b0c3a6a5 100644 --- a/agent/app/agent_capability_windows.go +++ b/agent/app/agent_capability_windows.go @@ -1,4 +1,5 @@ //go:build windows +// +build windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/app/agent_capability_windows_test.go b/agent/app/agent_capability_windows_test.go index 747a4db32f1..c5568537c95 100644 --- a/agent/app/agent_capability_windows_test.go +++ b/agent/app/agent_capability_windows_test.go @@ -1,4 +1,5 @@ //go:build windows && unit +// +build windows,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/app/agent_compatibility_linux.go b/agent/app/agent_compatibility_linux.go index 4c493ff1b14..716b91f8db9 100644 --- a/agent/app/agent_compatibility_linux.go +++ b/agent/app/agent_compatibility_linux.go @@ -1,4 +1,5 @@ //go:build linux +// +build linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/app/agent_compatibility_linux_test.go b/agent/app/agent_compatibility_linux_test.go index f20c4af0f9f..d1ef20e9032 100644 --- a/agent/app/agent_compatibility_linux_test.go +++ b/agent/app/agent_compatibility_linux_test.go @@ -1,4 +1,5 @@ //go:build linux && unit +// +build linux,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/app/agent_compatibility_unspecified.go b/agent/app/agent_compatibility_unspecified.go index dce18e76689..0911e725f29 100644 --- a/agent/app/agent_compatibility_unspecified.go +++ b/agent/app/agent_compatibility_unspecified.go @@ -1,4 +1,5 @@ //go:build !linux +// +build !linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/app/agent_integ_test.go b/agent/app/agent_integ_test.go index a158a739b88..416b10771b7 100644 --- a/agent/app/agent_integ_test.go +++ b/agent/app/agent_integ_test.go @@ -1,4 +1,5 @@ //go:build integration +// +build integration // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/app/agent_test.go b/agent/app/agent_test.go index 79210cb8569..8b488c3c18d 100644 --- a/agent/app/agent_test.go +++ b/agent/app/agent_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/app/agent_unix.go b/agent/app/agent_unix.go index 9dda0d1bf50..8858bcee32d 100644 --- a/agent/app/agent_unix.go +++ b/agent/app/agent_unix.go @@ -1,4 +1,5 @@ //go:build linux +// +build linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/app/agent_unix_test.go b/agent/app/agent_unix_test.go index 25933a72653..e67d49f321d 100644 --- a/agent/app/agent_unix_test.go +++ b/agent/app/agent_unix_test.go @@ -1,4 +1,5 @@ //go:build linux && unit +// +build linux,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/app/agent_unspecified.go b/agent/app/agent_unspecified.go index 34bf5d351fa..876bfefd6a5 100644 --- a/agent/app/agent_unspecified.go +++ b/agent/app/agent_unspecified.go @@ -1,4 +1,5 @@ //go:build !linux && !windows +// +build !linux,!windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/app/agent_windows.go b/agent/app/agent_windows.go index 5f1421e5221..673736a1c04 100644 --- a/agent/app/agent_windows.go +++ b/agent/app/agent_windows.go @@ -1,4 +1,5 @@ //go:build windows +// +build windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/app/agent_windows_test.go b/agent/app/agent_windows_test.go index 55952d01cd6..fa71c244cc1 100644 --- a/agent/app/agent_windows_test.go +++ b/agent/app/agent_windows_test.go @@ -1,4 +1,5 @@ //go:build windows && unit +// +build windows,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/app/data_test.go b/agent/app/data_test.go index d201f49e2f5..db9c88be865 100644 --- a/agent/app/data_test.go +++ b/agent/app/data_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/asm/asm_test.go b/agent/asm/asm_test.go index d3e18bfd12a..95bb3cfc0cf 100644 --- a/agent/asm/asm_test.go +++ b/agent/asm/asm_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/async/lru_cache_test.go b/agent/async/lru_cache_test.go index 12591307ffc..7e863acd00d 100644 --- a/agent/async/lru_cache_test.go +++ b/agent/async/lru_cache_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/config/conditional_test.go b/agent/config/conditional_test.go index 601bf94e1fb..e9cda03b300 100644 --- a/agent/config/conditional_test.go +++ b/agent/config/conditional_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/config/config_test.go b/agent/config/config_test.go index c2d14738364..f6b92f0c036 100644 --- a/agent/config/config_test.go +++ b/agent/config/config_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/config/config_unix.go b/agent/config/config_unix.go index 506c67f7fa8..f70efc0d0b3 100644 --- a/agent/config/config_unix.go +++ b/agent/config/config_unix.go @@ -1,4 +1,5 @@ //go:build !windows +// +build !windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/config/config_unix_test.go b/agent/config/config_unix_test.go index d39a0966082..e35d9bbf0e3 100644 --- a/agent/config/config_unix_test.go +++ b/agent/config/config_unix_test.go @@ -1,4 +1,5 @@ //go:build !windows && unit +// +build !windows,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/config/config_windows.go b/agent/config/config_windows.go index 181c9545af9..d35ec9606f4 100644 --- a/agent/config/config_windows.go +++ b/agent/config/config_windows.go @@ -1,4 +1,5 @@ //go:build windows +// +build windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/config/config_windows_test.go b/agent/config/config_windows_test.go index f4ad9898178..f2c4a323678 100644 --- a/agent/config/config_windows_test.go +++ b/agent/config/config_windows_test.go @@ -1,4 +1,5 @@ //go:build windows && unit +// +build windows,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/config/const_linux.go b/agent/config/const_linux.go index 2b9289e1dde..1ea8885bbbd 100644 --- a/agent/config/const_linux.go +++ b/agent/config/const_linux.go @@ -1,4 +1,5 @@ //go:build linux +// +build linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/config/const_unknown.go b/agent/config/const_unknown.go index 37f31d03e76..53841f47eec 100644 --- a/agent/config/const_unknown.go +++ b/agent/config/const_unknown.go @@ -1,4 +1,5 @@ //go:build !windows && !linux +// +build !windows,!linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/config/const_windows.go b/agent/config/const_windows.go index 71ab60ced9c..3606476fbaf 100644 --- a/agent/config/const_windows.go +++ b/agent/config/const_windows.go @@ -1,4 +1,5 @@ //go:build windows +// +build windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/config/os_family_windows.go b/agent/config/os_family_windows.go index 5bc773a7ce9..d7b2218d849 100644 --- a/agent/config/os_family_windows.go +++ b/agent/config/os_family_windows.go @@ -1,4 +1,5 @@ //go:build windows +// +build windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/config/os_family_windows_test.go b/agent/config/os_family_windows_test.go index 68e14f16f5c..9b6208cd9bb 100644 --- a/agent/config/os_family_windows_test.go +++ b/agent/config/os_family_windows_test.go @@ -1,4 +1,5 @@ //go:build windows && unit +// +build windows,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/config/parse_linux.go b/agent/config/parse_linux.go index 255163decb8..5ab45d3cf1e 100644 --- a/agent/config/parse_linux.go +++ b/agent/config/parse_linux.go @@ -1,4 +1,5 @@ //go:build linux +// +build linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/config/parse_unsupported.go b/agent/config/parse_unsupported.go index 732fae352b3..45d711563a8 100644 --- a/agent/config/parse_unsupported.go +++ b/agent/config/parse_unsupported.go @@ -1,4 +1,5 @@ //go:build !linux && !windows +// +build !linux,!windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/config/parse_windows.go b/agent/config/parse_windows.go index fbdc2ade0ec..6040cb5d27c 100644 --- a/agent/config/parse_windows.go +++ b/agent/config/parse_windows.go @@ -1,4 +1,5 @@ //go:build windows +// +build windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/config/parse_windows_test.go b/agent/config/parse_windows_test.go index 618ae726d0a..d4604840555 100644 --- a/agent/config/parse_windows_test.go +++ b/agent/config/parse_windows_test.go @@ -1,4 +1,5 @@ //go:build windows && unit +// +build windows,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/config/sensitive_test.go b/agent/config/sensitive_test.go index a5c00fe66da..f0f13b2a01b 100644 --- a/agent/config/sensitive_test.go +++ b/agent/config/sensitive_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/config/types_unix.go b/agent/config/types_unix.go index 887e35ea535..164fa4aaaf2 100644 --- a/agent/config/types_unix.go +++ b/agent/config/types_unix.go @@ -1,4 +1,5 @@ //go:build !windows +// +build !windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/config/types_windows.go b/agent/config/types_windows.go index 90ca8b250c6..df04eedac0f 100644 --- a/agent/config/types_windows.go +++ b/agent/config/types_windows.go @@ -1,4 +1,5 @@ //go:build windows +// +build windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/containermetadata/manager_test.go b/agent/containermetadata/manager_test.go index cfb1f7b1bed..737dbf55042 100644 --- a/agent/containermetadata/manager_test.go +++ b/agent/containermetadata/manager_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/containermetadata/manager_unix_test.go b/agent/containermetadata/manager_unix_test.go index 2c787e401a0..ad3399ccf35 100644 --- a/agent/containermetadata/manager_unix_test.go +++ b/agent/containermetadata/manager_unix_test.go @@ -1,4 +1,5 @@ //go:build unit && !windows +// +build unit,!windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/containermetadata/manager_windows_test.go b/agent/containermetadata/manager_windows_test.go index 8174b4a0e07..296f5621341 100644 --- a/agent/containermetadata/manager_windows_test.go +++ b/agent/containermetadata/manager_windows_test.go @@ -1,4 +1,5 @@ //go:build unit && windows +// +build unit,windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/containermetadata/parse_metadata_test.go b/agent/containermetadata/parse_metadata_test.go index 73770de927d..7a3357f7b9b 100644 --- a/agent/containermetadata/parse_metadata_test.go +++ b/agent/containermetadata/parse_metadata_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/containermetadata/types_test.go b/agent/containermetadata/types_test.go index 12b25486d12..5aebbd84bbf 100644 --- a/agent/containermetadata/types_test.go +++ b/agent/containermetadata/types_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/containermetadata/utils_test.go b/agent/containermetadata/utils_test.go index dba39d36984..df3ad60c291 100644 --- a/agent/containermetadata/utils_test.go +++ b/agent/containermetadata/utils_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/containermetadata/write_metadata_test.go b/agent/containermetadata/write_metadata_test.go index b3ab5e0b745..adeeb1c8378 100644 --- a/agent/containermetadata/write_metadata_test.go +++ b/agent/containermetadata/write_metadata_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/containermetadata/write_metadata_unix.go b/agent/containermetadata/write_metadata_unix.go index d3b32ddef94..1c9e799034f 100644 --- a/agent/containermetadata/write_metadata_unix.go +++ b/agent/containermetadata/write_metadata_unix.go @@ -1,4 +1,5 @@ //go:build !windows +// +build !windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/containermetadata/write_metadata_unix_test.go b/agent/containermetadata/write_metadata_unix_test.go index 9603e71f8fa..5d6eb54e90d 100644 --- a/agent/containermetadata/write_metadata_unix_test.go +++ b/agent/containermetadata/write_metadata_unix_test.go @@ -1,4 +1,5 @@ //go:build unit && !windows +// +build unit,!windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/containermetadata/write_metadata_windows.go b/agent/containermetadata/write_metadata_windows.go index 357ff630657..85efa3c672a 100644 --- a/agent/containermetadata/write_metadata_windows.go +++ b/agent/containermetadata/write_metadata_windows.go @@ -1,4 +1,5 @@ //go:build windows +// +build windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/containermetadata/write_metadata_windows_test.go b/agent/containermetadata/write_metadata_windows_test.go index 2e86c31bf3d..3a906b3d768 100644 --- a/agent/containermetadata/write_metadata_windows_test.go +++ b/agent/containermetadata/write_metadata_windows_test.go @@ -1,4 +1,5 @@ //go:build unit && windows +// +build unit,windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/credentials/instancecreds/instancecreds_test.go b/agent/credentials/instancecreds/instancecreds_test.go index 4c4f6428645..7632faa2480 100644 --- a/agent/credentials/instancecreds/instancecreds_test.go +++ b/agent/credentials/instancecreds/instancecreds_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/credentials/manager_test.go b/agent/credentials/manager_test.go index b30284c0980..40f3ca75fc1 100644 --- a/agent/credentials/manager_test.go +++ b/agent/credentials/manager_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/credentials/providers/rotating_shared_credentials_provider_test.go b/agent/credentials/providers/rotating_shared_credentials_provider_test.go index 404701cfec3..246adc669bc 100644 --- a/agent/credentials/providers/rotating_shared_credentials_provider_test.go +++ b/agent/credentials/providers/rotating_shared_credentials_provider_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/data/client_test.go b/agent/data/client_test.go index 27b8a399139..ab5d0d918cb 100644 --- a/agent/data/client_test.go +++ b/agent/data/client_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/data/container_client_test.go b/agent/data/container_client_test.go index 9d1c325cbe8..cd11908adf8 100644 --- a/agent/data/container_client_test.go +++ b/agent/data/container_client_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/data/eniattachment_client_test.go b/agent/data/eniattachment_client_test.go index 58fbd80a56b..cac248e8de1 100644 --- a/agent/data/eniattachment_client_test.go +++ b/agent/data/eniattachment_client_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/data/helpers_test.go b/agent/data/helpers_test.go index efae4878b04..fad4799a35b 100644 --- a/agent/data/helpers_test.go +++ b/agent/data/helpers_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/data/imagestate_client_test.go b/agent/data/imagestate_client_test.go index c5ddaacb5aa..696191314f6 100644 --- a/agent/data/imagestate_client_test.go +++ b/agent/data/imagestate_client_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/data/metadata_client_test.go b/agent/data/metadata_client_test.go index 6d5b32721a9..f9a6b754548 100644 --- a/agent/data/metadata_client_test.go +++ b/agent/data/metadata_client_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/data/task_client_test.go b/agent/data/task_client_test.go index 5134b1edad4..6d72782764c 100644 --- a/agent/data/task_client_test.go +++ b/agent/data/task_client_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/dockerclient/dockerapi/docker_client_test.go b/agent/dockerclient/dockerapi/docker_client_test.go index 49a09232e9f..2442e971266 100644 --- a/agent/dockerclient/dockerapi/docker_client_test.go +++ b/agent/dockerclient/dockerapi/docker_client_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/dockerclient/dockerapi/docker_events_buffer_test.go b/agent/dockerclient/dockerapi/docker_events_buffer_test.go index 1f9042fdda4..4ca0003f736 100644 --- a/agent/dockerclient/dockerapi/docker_events_buffer_test.go +++ b/agent/dockerclient/dockerapi/docker_events_buffer_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/dockerclient/dockerapi/errors_test.go b/agent/dockerclient/dockerapi/errors_test.go index 6aa593750bf..1bdd65a15fb 100644 --- a/agent/dockerclient/dockerapi/errors_test.go +++ b/agent/dockerclient/dockerapi/errors_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/dockerclient/dockerapi/inactivity_timeout_handler_test.go b/agent/dockerclient/dockerapi/inactivity_timeout_handler_test.go index 4fb9e5b2e06..eaea8ec1bfc 100644 --- a/agent/dockerclient/dockerapi/inactivity_timeout_handler_test.go +++ b/agent/dockerclient/dockerapi/inactivity_timeout_handler_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/dockerclient/dockerapi_compare_versions_test.go b/agent/dockerclient/dockerapi_compare_versions_test.go index 792e4b94992..46e077ef9a3 100644 --- a/agent/dockerclient/dockerapi_compare_versions_test.go +++ b/agent/dockerclient/dockerapi_compare_versions_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/dockerclient/dockerauth/dockerauth_test.go b/agent/dockerclient/dockerauth/dockerauth_test.go index f8fa5072537..f1d9fb01749 100644 --- a/agent/dockerclient/dockerauth/dockerauth_test.go +++ b/agent/dockerclient/dockerauth/dockerauth_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/dockerclient/dockerauth/ecr_test.go b/agent/dockerclient/dockerauth/ecr_test.go index 2f6ca9786a6..d394421dcbe 100644 --- a/agent/dockerclient/dockerauth/ecr_test.go +++ b/agent/dockerclient/dockerauth/ecr_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/dockerclient/sdkclientfactory/sdkclientfactory_test.go b/agent/dockerclient/sdkclientfactory/sdkclientfactory_test.go index e983af5fbe2..bc6664d6d77 100644 --- a/agent/dockerclient/sdkclientfactory/sdkclientfactory_test.go +++ b/agent/dockerclient/sdkclientfactory/sdkclientfactory_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/dockerclient/sdkclientfactory/sdkclientfactory_unix_test.go b/agent/dockerclient/sdkclientfactory/sdkclientfactory_unix_test.go index 82d4732fe93..4c88e87101a 100644 --- a/agent/dockerclient/sdkclientfactory/sdkclientfactory_unix_test.go +++ b/agent/dockerclient/sdkclientfactory/sdkclientfactory_unix_test.go @@ -1,4 +1,5 @@ //go:build unit && !windows +// +build unit,!windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/dockerclient/sdkclientfactory/sdkclientfactory_windows_test.go b/agent/dockerclient/sdkclientfactory/sdkclientfactory_windows_test.go index 3c0effd4137..23aba519006 100644 --- a/agent/dockerclient/sdkclientfactory/sdkclientfactory_windows_test.go +++ b/agent/dockerclient/sdkclientfactory/sdkclientfactory_windows_test.go @@ -1,4 +1,5 @@ //go:build unit && windows +// +build unit,windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/dockerclient/sdkclientfactory/versionsupport_unix.go b/agent/dockerclient/sdkclientfactory/versionsupport_unix.go index 884dc94c40b..9117a7d7290 100644 --- a/agent/dockerclient/sdkclientfactory/versionsupport_unix.go +++ b/agent/dockerclient/sdkclientfactory/versionsupport_unix.go @@ -1,4 +1,5 @@ //go:build !windows +// +build !windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/dockerclient/sdkclientfactory/versionsupport_windows.go b/agent/dockerclient/sdkclientfactory/versionsupport_windows.go index 5857b085295..afc83054a2b 100644 --- a/agent/dockerclient/sdkclientfactory/versionsupport_windows.go +++ b/agent/dockerclient/sdkclientfactory/versionsupport_windows.go @@ -1,4 +1,5 @@ //go:build windows +// +build windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/ec2/ec2_client_test.go b/agent/ec2/ec2_client_test.go index 089b487a06b..00ed5d5c92a 100644 --- a/agent/ec2/ec2_client_test.go +++ b/agent/ec2/ec2_client_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/ec2/ec2_metadata_client_test.go b/agent/ec2/ec2_metadata_client_test.go index ed87ad10064..d583e368d9b 100644 --- a/agent/ec2/ec2_metadata_client_test.go +++ b/agent/ec2/ec2_metadata_client_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/ecr/client_test.go b/agent/ecr/client_test.go index d56d833236d..17e729b6cac 100644 --- a/agent/ecr/client_test.go +++ b/agent/ecr/client_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/ecr/factory_test.go b/agent/ecr/factory_test.go index 5eac709a5f6..324ec90e8df 100644 --- a/agent/ecr/factory_test.go +++ b/agent/ecr/factory_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/ecscni/namespace_helper_linux.go b/agent/ecscni/namespace_helper_linux.go index ff508cfd274..7f4479ef012 100644 --- a/agent/ecscni/namespace_helper_linux.go +++ b/agent/ecscni/namespace_helper_linux.go @@ -1,4 +1,5 @@ //go:build linux +// +build linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/ecscni/namespace_helper_unsupported.go b/agent/ecscni/namespace_helper_unsupported.go index 19d5666de45..bc10fce10eb 100644 --- a/agent/ecscni/namespace_helper_unsupported.go +++ b/agent/ecscni/namespace_helper_unsupported.go @@ -1,4 +1,5 @@ //go:build !linux && !windows +// +build !linux,!windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/ecscni/namespace_helper_windows.go b/agent/ecscni/namespace_helper_windows.go index 763dcc4a306..a552e148738 100644 --- a/agent/ecscni/namespace_helper_windows.go +++ b/agent/ecscni/namespace_helper_windows.go @@ -1,4 +1,5 @@ //go:build windows +// +build windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/ecscni/namespace_helper_windows_test.go b/agent/ecscni/namespace_helper_windows_test.go index 8d4300178b7..a777d39a19b 100644 --- a/agent/ecscni/namespace_helper_windows_test.go +++ b/agent/ecscni/namespace_helper_windows_test.go @@ -1,4 +1,5 @@ //go:build windows && unit +// +build windows,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/ecscni/netconfig_linux.go b/agent/ecscni/netconfig_linux.go index b9596d97f5b..283e8a689db 100644 --- a/agent/ecscni/netconfig_linux.go +++ b/agent/ecscni/netconfig_linux.go @@ -1,4 +1,5 @@ //go:build linux +// +build linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/ecscni/netconfig_windows.go b/agent/ecscni/netconfig_windows.go index 2949379f78d..4d266d7e9a1 100644 --- a/agent/ecscni/netconfig_windows.go +++ b/agent/ecscni/netconfig_windows.go @@ -1,4 +1,5 @@ //go:build windows +// +build windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/ecscni/netconfig_windows_test.go b/agent/ecscni/netconfig_windows_test.go index 86a35953dd3..4f81fa9b6fa 100644 --- a/agent/ecscni/netconfig_windows_test.go +++ b/agent/ecscni/netconfig_windows_test.go @@ -1,4 +1,5 @@ //go:build windows && unit +// +build windows,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/ecscni/plugin_linux.go b/agent/ecscni/plugin_linux.go index df9f86c8c65..aa56d0a6f2a 100644 --- a/agent/ecscni/plugin_linux.go +++ b/agent/ecscni/plugin_linux.go @@ -1,4 +1,5 @@ //go:build linux +// +build linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/ecscni/plugin_linux_test.go b/agent/ecscni/plugin_linux_test.go index e7744fa6073..be2e0efcd9c 100644 --- a/agent/ecscni/plugin_linux_test.go +++ b/agent/ecscni/plugin_linux_test.go @@ -1,4 +1,5 @@ //go:build linux && unit +// +build linux,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/ecscni/plugin_test.go b/agent/ecscni/plugin_test.go index 963b5eebdd1..764220f3a94 100644 --- a/agent/ecscni/plugin_test.go +++ b/agent/ecscni/plugin_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/ecscni/plugin_unsupported.go b/agent/ecscni/plugin_unsupported.go index 67b2ba87548..e156b75c03e 100644 --- a/agent/ecscni/plugin_unsupported.go +++ b/agent/ecscni/plugin_unsupported.go @@ -1,4 +1,5 @@ //go:build !linux && !windows +// +build !linux,!windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/ecscni/plugin_windows.go b/agent/ecscni/plugin_windows.go index 948715e9542..4aed39d1b3e 100644 --- a/agent/ecscni/plugin_windows.go +++ b/agent/ecscni/plugin_windows.go @@ -1,4 +1,5 @@ //go:build windows +// +build windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/ecscni/plugin_windows_test.go b/agent/ecscni/plugin_windows_test.go index e82541f7ff5..04420ba7a7b 100644 --- a/agent/ecscni/plugin_windows_test.go +++ b/agent/ecscni/plugin_windows_test.go @@ -1,4 +1,5 @@ //go:build windows && unit +// +build windows,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/ecscni/types_linux.go b/agent/ecscni/types_linux.go index 1a07be23e0b..2ad65834acd 100644 --- a/agent/ecscni/types_linux.go +++ b/agent/ecscni/types_linux.go @@ -1,4 +1,5 @@ //go:build linux +// +build linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/ecscni/types_windows.go b/agent/ecscni/types_windows.go index 61871805a1b..4a2218f255b 100644 --- a/agent/ecscni/types_windows.go +++ b/agent/ecscni/types_windows.go @@ -1,4 +1,5 @@ //go:build windows +// +build windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/engine/common_integ_test.go b/agent/engine/common_integ_test.go index 1e6b65ec522..73d9c7e4893 100644 --- a/agent/engine/common_integ_test.go +++ b/agent/engine/common_integ_test.go @@ -1,4 +1,5 @@ //go:build sudo || integration +// +build sudo integration // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/engine/common_unix_integ_test.go b/agent/engine/common_unix_integ_test.go index 53d81706003..0b83295f7a6 100644 --- a/agent/engine/common_unix_integ_test.go +++ b/agent/engine/common_unix_integ_test.go @@ -1,4 +1,6 @@ //go:build linux && (sudo || integration) +// +build linux +// +build sudo integration // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/engine/data_test.go b/agent/engine/data_test.go index 7b29e975632..049c190d31e 100644 --- a/agent/engine/data_test.go +++ b/agent/engine/data_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/engine/dependencygraph/graph_test.go b/agent/engine/dependencygraph/graph_test.go index bf3fad7a446..af6d8d218f4 100644 --- a/agent/engine/dependencygraph/graph_test.go +++ b/agent/engine/dependencygraph/graph_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/engine/dependencygraph/graph_unix_test.go b/agent/engine/dependencygraph/graph_unix_test.go index b777d4bec77..0c173e59e0e 100644 --- a/agent/engine/dependencygraph/graph_unix_test.go +++ b/agent/engine/dependencygraph/graph_unix_test.go @@ -1,4 +1,5 @@ //go:build linux && unit +// +build linux,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/engine/docker_image_manager_data_test.go b/agent/engine/docker_image_manager_data_test.go index 05354ec8ae5..d322d52f16f 100644 --- a/agent/engine/docker_image_manager_data_test.go +++ b/agent/engine/docker_image_manager_data_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/engine/docker_image_manager_integ_test.go b/agent/engine/docker_image_manager_integ_test.go index 1cd64a07e1a..bea1debe9b3 100644 --- a/agent/engine/docker_image_manager_integ_test.go +++ b/agent/engine/docker_image_manager_integ_test.go @@ -1,4 +1,5 @@ //go:build integration +// +build integration // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/engine/docker_image_manager_test.go b/agent/engine/docker_image_manager_test.go index 06662ea9d59..91ca9a9e601 100644 --- a/agent/engine/docker_image_manager_test.go +++ b/agent/engine/docker_image_manager_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/engine/docker_image_manager_unix_integ_test.go b/agent/engine/docker_image_manager_unix_integ_test.go index 849b9127d04..b9871ebb01e 100644 --- a/agent/engine/docker_image_manager_unix_integ_test.go +++ b/agent/engine/docker_image_manager_unix_integ_test.go @@ -1,4 +1,5 @@ //go:build !windows && integration +// +build !windows,integration // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/engine/docker_image_manager_windows_integ_test.go b/agent/engine/docker_image_manager_windows_integ_test.go index cade220651e..77a53c7c735 100644 --- a/agent/engine/docker_image_manager_windows_integ_test.go +++ b/agent/engine/docker_image_manager_windows_integ_test.go @@ -1,4 +1,5 @@ //go:build windows && integration +// +build windows,integration // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/engine/docker_task_engine_linux.go b/agent/engine/docker_task_engine_linux.go index 1d27300f34a..56298a6bac1 100644 --- a/agent/engine/docker_task_engine_linux.go +++ b/agent/engine/docker_task_engine_linux.go @@ -1,4 +1,5 @@ //go:build linux +// +build linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/engine/docker_task_engine_linux_test.go b/agent/engine/docker_task_engine_linux_test.go index fb1efc4aded..798b5df04cf 100644 --- a/agent/engine/docker_task_engine_linux_test.go +++ b/agent/engine/docker_task_engine_linux_test.go @@ -1,4 +1,5 @@ //go:build linux && unit +// +build linux,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/engine/docker_task_engine_test.go b/agent/engine/docker_task_engine_test.go index d90fee5c2ed..023aea86f5b 100644 --- a/agent/engine/docker_task_engine_test.go +++ b/agent/engine/docker_task_engine_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/engine/docker_task_engine_unsupported.go b/agent/engine/docker_task_engine_unsupported.go index cebf298524d..c59db83fcfb 100644 --- a/agent/engine/docker_task_engine_unsupported.go +++ b/agent/engine/docker_task_engine_unsupported.go @@ -1,4 +1,5 @@ //go:build !linux && !windows +// +build !linux,!windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/engine/docker_task_engine_windows.go b/agent/engine/docker_task_engine_windows.go index a5f80f9a91b..9afadf22611 100644 --- a/agent/engine/docker_task_engine_windows.go +++ b/agent/engine/docker_task_engine_windows.go @@ -1,4 +1,5 @@ //go:build windows +// +build windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/engine/docker_task_engine_windows_test.go b/agent/engine/docker_task_engine_windows_test.go index e11e7e67cdf..4adbe809c75 100644 --- a/agent/engine/docker_task_engine_windows_test.go +++ b/agent/engine/docker_task_engine_windows_test.go @@ -1,4 +1,5 @@ //go:build windows && unit +// +build windows,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/engine/dockerstate/dockerstate_test.go b/agent/engine/dockerstate/dockerstate_test.go index fc5c94d5be8..7fe6a5ba7b8 100644 --- a/agent/engine/dockerstate/dockerstate_test.go +++ b/agent/engine/dockerstate/dockerstate_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/engine/dockerstate/json_test.go b/agent/engine/dockerstate/json_test.go index 7a1f26ee358..c584c35787a 100644 --- a/agent/engine/dockerstate/json_test.go +++ b/agent/engine/dockerstate/json_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/engine/dockerstate/testutils/json_test.go b/agent/engine/dockerstate/testutils/json_test.go index 6170683aaea..c05710f91fe 100644 --- a/agent/engine/dockerstate/testutils/json_test.go +++ b/agent/engine/dockerstate/testutils/json_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/engine/engine_integ_test.go b/agent/engine/engine_integ_test.go index b6d543a2648..09d4b3840c5 100644 --- a/agent/engine/engine_integ_test.go +++ b/agent/engine/engine_integ_test.go @@ -1,4 +1,5 @@ //go:build integration +// +build integration // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/engine/engine_sudo_linux_integ_test.go b/agent/engine/engine_sudo_linux_integ_test.go index e439b783cf5..3e434dfc879 100644 --- a/agent/engine/engine_sudo_linux_integ_test.go +++ b/agent/engine/engine_sudo_linux_integ_test.go @@ -1,4 +1,5 @@ //go:build linux && sudo +// +build linux,sudo // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/engine/engine_unix_integ_test.go b/agent/engine/engine_unix_integ_test.go index 9aa7a25ec09..4e771f3ebeb 100644 --- a/agent/engine/engine_unix_integ_test.go +++ b/agent/engine/engine_unix_integ_test.go @@ -1,4 +1,5 @@ //go:build !windows && integration +// +build !windows,integration // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/engine/engine_windows_integ_test.go b/agent/engine/engine_windows_integ_test.go index 59bae72ac6f..4f2635050ef 100644 --- a/agent/engine/engine_windows_integ_test.go +++ b/agent/engine/engine_windows_integ_test.go @@ -1,4 +1,5 @@ //go:build windows && integration +// +build windows,integration // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/engine/execcmd/manager_init_task_linux.go b/agent/engine/execcmd/manager_init_task_linux.go index 6398bf9bb1a..05af1582b1e 100644 --- a/agent/engine/execcmd/manager_init_task_linux.go +++ b/agent/engine/execcmd/manager_init_task_linux.go @@ -1,4 +1,5 @@ //go:build linux +// +build linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/engine/execcmd/manager_init_task_linux_test.go b/agent/engine/execcmd/manager_init_task_linux_test.go index cb242d995b2..564e58bada2 100644 --- a/agent/engine/execcmd/manager_init_task_linux_test.go +++ b/agent/engine/execcmd/manager_init_task_linux_test.go @@ -1,4 +1,5 @@ //go:build linux && unit +// +build linux,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/engine/execcmd/manager_start_linux.go b/agent/engine/execcmd/manager_start_linux.go index b98634c856d..774c3435bc7 100644 --- a/agent/engine/execcmd/manager_start_linux.go +++ b/agent/engine/execcmd/manager_start_linux.go @@ -1,4 +1,5 @@ //go:build linux +// +build linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/engine/execcmd/manager_start_linux_test.go b/agent/engine/execcmd/manager_start_linux_test.go index 2613f9ab2cd..061617a61c4 100644 --- a/agent/engine/execcmd/manager_start_linux_test.go +++ b/agent/engine/execcmd/manager_start_linux_test.go @@ -1,4 +1,5 @@ //go:build linux && unit +// +build linux,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/engine/execcmd/manager_unsupported.go b/agent/engine/execcmd/manager_unsupported.go index 4a8124c3b2b..3fed93585c4 100644 --- a/agent/engine/execcmd/manager_unsupported.go +++ b/agent/engine/execcmd/manager_unsupported.go @@ -1,4 +1,5 @@ //go:build !linux && !windows +// +build !linux,!windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/engine/ordering_integ_test.go b/agent/engine/ordering_integ_test.go index 25e787e3c85..31162998126 100644 --- a/agent/engine/ordering_integ_test.go +++ b/agent/engine/ordering_integ_test.go @@ -1,4 +1,5 @@ //go:build integration +// +build integration // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/engine/ordering_integ_unix_test.go b/agent/engine/ordering_integ_unix_test.go index 2f8d0a2b3cf..1878e4bdb54 100644 --- a/agent/engine/ordering_integ_unix_test.go +++ b/agent/engine/ordering_integ_unix_test.go @@ -1,4 +1,5 @@ //go:build integration && !windows +// +build integration,!windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/engine/ordering_integ_windows_test.go b/agent/engine/ordering_integ_windows_test.go index 89a1515cfa2..b411c377177 100644 --- a/agent/engine/ordering_integ_windows_test.go +++ b/agent/engine/ordering_integ_windows_test.go @@ -1,4 +1,5 @@ //go:build windows && integration +// +build windows,integration // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/engine/task_manager_data_test.go b/agent/engine/task_manager_data_test.go index a60ebaa64e6..f6726d7b3f2 100644 --- a/agent/engine/task_manager_data_test.go +++ b/agent/engine/task_manager_data_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/engine/task_manager_test.go b/agent/engine/task_manager_test.go index 1ab79ddfcc2..4b4f0838e6f 100644 --- a/agent/engine/task_manager_test.go +++ b/agent/engine/task_manager_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/engine/task_manager_unix_test.go b/agent/engine/task_manager_unix_test.go index abb0fb62f16..a3510571879 100644 --- a/agent/engine/task_manager_unix_test.go +++ b/agent/engine/task_manager_unix_test.go @@ -1,4 +1,5 @@ //go:build linux && unit +// +build linux,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/eni/iphelperwrapper/iphelper_windows.go b/agent/eni/iphelperwrapper/iphelper_windows.go index 1c77ff19154..6bf45de2096 100644 --- a/agent/eni/iphelperwrapper/iphelper_windows.go +++ b/agent/eni/iphelperwrapper/iphelper_windows.go @@ -1,4 +1,5 @@ //go:build windows +// +build windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/eni/iphelperwrapper/iphelper_windows_test.go b/agent/eni/iphelperwrapper/iphelper_windows_test.go index d0628291db5..adbd8aa42a5 100644 --- a/agent/eni/iphelperwrapper/iphelper_windows_test.go +++ b/agent/eni/iphelperwrapper/iphelper_windows_test.go @@ -1,4 +1,5 @@ //go:build windows && unit +// +build windows,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/eni/iphelperwrapper/mibIpInterfaceRow_windows.go b/agent/eni/iphelperwrapper/mibIpInterfaceRow_windows.go index c27c5beedd1..1112094b416 100644 --- a/agent/eni/iphelperwrapper/mibIpInterfaceRow_windows.go +++ b/agent/eni/iphelperwrapper/mibIpInterfaceRow_windows.go @@ -1,4 +1,5 @@ //go:build windows +// +build windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/eni/netlinkwrapper/netlink_linux.go b/agent/eni/netlinkwrapper/netlink_linux.go index 54f14be1baf..74713472d98 100644 --- a/agent/eni/netlinkwrapper/netlink_linux.go +++ b/agent/eni/netlinkwrapper/netlink_linux.go @@ -1,4 +1,5 @@ //go:build linux +// +build linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/eni/networkutils/utils_linux.go b/agent/eni/networkutils/utils_linux.go index 9a04d2c56dd..10a7a21262f 100644 --- a/agent/eni/networkutils/utils_linux.go +++ b/agent/eni/networkutils/utils_linux.go @@ -1,4 +1,5 @@ //go:build linux +// +build linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/eni/networkutils/utils_linux_test.go b/agent/eni/networkutils/utils_linux_test.go index f94e12426d5..39e5f771c4b 100644 --- a/agent/eni/networkutils/utils_linux_test.go +++ b/agent/eni/networkutils/utils_linux_test.go @@ -1,4 +1,5 @@ //go:build linux && unit +// +build linux,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/eni/networkutils/utils_windows.go b/agent/eni/networkutils/utils_windows.go index 402e4a39916..4c4e68d3d91 100644 --- a/agent/eni/networkutils/utils_windows.go +++ b/agent/eni/networkutils/utils_windows.go @@ -1,4 +1,5 @@ //go:build windows +// +build windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/eni/networkutils/utils_windows_test.go b/agent/eni/networkutils/utils_windows_test.go index 352cccc7a49..755ccb353cd 100644 --- a/agent/eni/networkutils/utils_windows_test.go +++ b/agent/eni/networkutils/utils_windows_test.go @@ -1,4 +1,5 @@ //go:build windows && unit +// +build windows,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/eni/pause/error_test.go b/agent/eni/pause/error_test.go index 5a7cad12aae..72de9f05460 100644 --- a/agent/eni/pause/error_test.go +++ b/agent/eni/pause/error_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/eni/pause/load_test.go b/agent/eni/pause/load_test.go index 32a88e0ccf0..3203a923922 100644 --- a/agent/eni/pause/load_test.go +++ b/agent/eni/pause/load_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/eni/pause/pause_linux.go b/agent/eni/pause/pause_linux.go index c983c24a9f9..cb983ccc9b0 100644 --- a/agent/eni/pause/pause_linux.go +++ b/agent/eni/pause/pause_linux.go @@ -1,4 +1,5 @@ //go:build linux +// +build linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/eni/pause/pause_linux_test.go b/agent/eni/pause/pause_linux_test.go index 6cb7725176a..00ad512fdbf 100644 --- a/agent/eni/pause/pause_linux_test.go +++ b/agent/eni/pause/pause_linux_test.go @@ -1,4 +1,5 @@ //go:build linux && unit +// +build linux,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/eni/pause/pause_unsupported.go b/agent/eni/pause/pause_unsupported.go index bc5eafd7bf2..8616f5fb8ae 100644 --- a/agent/eni/pause/pause_unsupported.go +++ b/agent/eni/pause/pause_unsupported.go @@ -1,4 +1,5 @@ //go:build !linux && !windows +// +build !linux,!windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/eni/pause/pause_windows.go b/agent/eni/pause/pause_windows.go index 9f640857e8d..05eac21383e 100644 --- a/agent/eni/pause/pause_windows.go +++ b/agent/eni/pause/pause_windows.go @@ -1,4 +1,5 @@ //go:build windows +// +build windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/eni/udevwrapper/udev_linux.go b/agent/eni/udevwrapper/udev_linux.go index 32cf01f4105..9d696c9fddc 100644 --- a/agent/eni/udevwrapper/udev_linux.go +++ b/agent/eni/udevwrapper/udev_linux.go @@ -1,4 +1,5 @@ //go:build linux +// +build linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/eni/udevwrapper/udev_unsupported.go b/agent/eni/udevwrapper/udev_unsupported.go index 09c70ab73ea..452edf7a639 100644 --- a/agent/eni/udevwrapper/udev_unsupported.go +++ b/agent/eni/udevwrapper/udev_unsupported.go @@ -1,4 +1,5 @@ //go:build !linux +// +build !linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/eni/watcher/watcher_linux.go b/agent/eni/watcher/watcher_linux.go index b5a1124f926..f055fec79d5 100644 --- a/agent/eni/watcher/watcher_linux.go +++ b/agent/eni/watcher/watcher_linux.go @@ -1,4 +1,5 @@ //go:build linux +// +build linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/eni/watcher/watcher_linux_test.go b/agent/eni/watcher/watcher_linux_test.go index ce17f13b8af..469555b4f55 100644 --- a/agent/eni/watcher/watcher_linux_test.go +++ b/agent/eni/watcher/watcher_linux_test.go @@ -1,4 +1,5 @@ //go:build linux && unit +// +build linux,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/eni/watcher/watcher_test.go b/agent/eni/watcher/watcher_test.go index 9fda7494e30..9bd90c170bb 100644 --- a/agent/eni/watcher/watcher_test.go +++ b/agent/eni/watcher/watcher_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/eni/watcher/watcher_unsupported.go b/agent/eni/watcher/watcher_unsupported.go index 222653c87ab..7adae3c5979 100644 --- a/agent/eni/watcher/watcher_unsupported.go +++ b/agent/eni/watcher/watcher_unsupported.go @@ -1,4 +1,5 @@ //go:build !linux && !windows +// +build !linux,!windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/eni/watcher/watcher_windows.go b/agent/eni/watcher/watcher_windows.go index 3a712955761..04e6a1fddba 100644 --- a/agent/eni/watcher/watcher_windows.go +++ b/agent/eni/watcher/watcher_windows.go @@ -1,4 +1,5 @@ //go:build windows +// +build windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/eni/watcher/watcher_windows_test.go b/agent/eni/watcher/watcher_windows_test.go index 97d5c772a0f..8313d07e8b2 100644 --- a/agent/eni/watcher/watcher_windows_test.go +++ b/agent/eni/watcher/watcher_windows_test.go @@ -1,4 +1,5 @@ //go:build windows && unit +// +build windows,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/eventhandler/attachment_handler_test.go b/agent/eventhandler/attachment_handler_test.go index 3ddadb7f8f5..3a5303e0cf4 100644 --- a/agent/eventhandler/attachment_handler_test.go +++ b/agent/eventhandler/attachment_handler_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/eventhandler/handler_test.go b/agent/eventhandler/handler_test.go index 1698b3724f1..1d85fa99e0e 100644 --- a/agent/eventhandler/handler_test.go +++ b/agent/eventhandler/handler_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/eventhandler/task_handler_test.go b/agent/eventhandler/task_handler_test.go index 4c9ded191f4..ba1277e0d83 100644 --- a/agent/eventhandler/task_handler_test.go +++ b/agent/eventhandler/task_handler_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/eventhandler/task_handler_types_test.go b/agent/eventhandler/task_handler_types_test.go index e745249ea43..b9bad21c6bb 100644 --- a/agent/eventhandler/task_handler_types_test.go +++ b/agent/eventhandler/task_handler_types_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/eventstream/eventstream_test.go b/agent/eventstream/eventstream_test.go index 032e10f39d1..1b9e5768ae3 100644 --- a/agent/eventstream/eventstream_test.go +++ b/agent/eventstream/eventstream_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/fsx/fsx_test.go b/agent/fsx/fsx_test.go index c298744337b..e7e9349bcc8 100644 --- a/agent/fsx/fsx_test.go +++ b/agent/fsx/fsx_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/gogenerate/awssdk.go b/agent/gogenerate/awssdk.go index fee08b8d51f..fbd8706aed7 100644 --- a/agent/gogenerate/awssdk.go +++ b/agent/gogenerate/awssdk.go @@ -1,4 +1,5 @@ //go:build codegen +// +build codegen // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/gpu/generate_mocks.go b/agent/gpu/generate_mocks.go index 26dadfa72b5..f609d8ff1a5 100644 --- a/agent/gpu/generate_mocks.go +++ b/agent/gpu/generate_mocks.go @@ -1,4 +1,5 @@ //go:build linux +// +build linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/gpu/nvidia_gpu_manager_unix.go b/agent/gpu/nvidia_gpu_manager_unix.go index 9c5b385e31c..c18d6d20140 100644 --- a/agent/gpu/nvidia_gpu_manager_unix.go +++ b/agent/gpu/nvidia_gpu_manager_unix.go @@ -1,4 +1,5 @@ //go:build linux +// +build linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/gpu/nvidia_gpu_manager_unix_test.go b/agent/gpu/nvidia_gpu_manager_unix_test.go index 70b674a8e3e..ededb252214 100644 --- a/agent/gpu/nvidia_gpu_manager_unix_test.go +++ b/agent/gpu/nvidia_gpu_manager_unix_test.go @@ -1,4 +1,5 @@ //go:build linux && unit +// +build linux,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/handlers/introspection_server_setup_test.go b/agent/handlers/introspection_server_setup_test.go index d8a90bbf5b9..e6d0b4c3dee 100644 --- a/agent/handlers/introspection_server_setup_test.go +++ b/agent/handlers/introspection_server_setup_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/handlers/task_server_setup_test.go b/agent/handlers/task_server_setup_test.go index 46ae12d87d4..b0e62e07ec5 100644 --- a/agent/handlers/task_server_setup_test.go +++ b/agent/handlers/task_server_setup_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/handlers/utils/helpers_test.go b/agent/handlers/utils/helpers_test.go index 1b691a8297b..7be7c9c5d0d 100644 --- a/agent/handlers/utils/helpers_test.go +++ b/agent/handlers/utils/helpers_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/handlers/v1/license_handler_test.go b/agent/handlers/v1/license_handler_test.go index 51c7b94e373..13812bd9cb0 100644 --- a/agent/handlers/v1/license_handler_test.go +++ b/agent/handlers/v1/license_handler_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/handlers/v1/response_test.go b/agent/handlers/v1/response_test.go index 34bfff87431..2d6ac6def6b 100644 --- a/agent/handlers/v1/response_test.go +++ b/agent/handlers/v1/response_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/handlers/v2/response_test.go b/agent/handlers/v2/response_test.go index 798e51356f5..19d89f2c573 100644 --- a/agent/handlers/v2/response_test.go +++ b/agent/handlers/v2/response_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/handlers/v2/stats_response_test.go b/agent/handlers/v2/stats_response_test.go index b3ca475b097..b1d2635dbc8 100644 --- a/agent/handlers/v2/stats_response_test.go +++ b/agent/handlers/v2/stats_response_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/handlers/v3/response_test.go b/agent/handlers/v3/response_test.go index 3039a57aff5..38d5b27845b 100644 --- a/agent/handlers/v3/response_test.go +++ b/agent/handlers/v3/response_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/handlers/v4/response_test.go b/agent/handlers/v4/response_test.go index e99b52435df..103eaf6a3bc 100644 --- a/agent/handlers/v4/response_test.go +++ b/agent/handlers/v4/response_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/httpclient/httpclient_test.go b/agent/httpclient/httpclient_test.go index 362722da25c..e8967718c28 100644 --- a/agent/httpclient/httpclient_test.go +++ b/agent/httpclient/httpclient_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/logger/audit/audit_log_test.go b/agent/logger/audit/audit_log_test.go index f2a6b53045d..c88ea4ee643 100644 --- a/agent/logger/audit/audit_log_test.go +++ b/agent/logger/audit/audit_log_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/logger/buffer_pool_test.go b/agent/logger/buffer_pool_test.go index 9cca77e8e66..9eeb97971b2 100644 --- a/agent/logger/buffer_pool_test.go +++ b/agent/logger/buffer_pool_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/logger/eventlog_windows.go b/agent/logger/eventlog_windows.go index f920da0c26f..f72539c1271 100644 --- a/agent/logger/eventlog_windows.go +++ b/agent/logger/eventlog_windows.go @@ -1,4 +1,5 @@ //go:build windows +// +build windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/logger/format_test.go b/agent/logger/format_test.go index 80e43d58d3a..91445da5f1b 100644 --- a/agent/logger/format_test.go +++ b/agent/logger/format_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/logger/global_test.go b/agent/logger/global_test.go index 032a9691afe..05435114080 100644 --- a/agent/logger/global_test.go +++ b/agent/logger/global_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/logger/log_init_test.go b/agent/logger/log_init_test.go index 0148f1dbd09..496c1b07757 100644 --- a/agent/logger/log_init_test.go +++ b/agent/logger/log_init_test.go @@ -1,4 +1,5 @@ //go:build unit || integration +// +build unit integration // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/logger/log_test.go b/agent/logger/log_test.go index 61e6747a1f6..8d25cd434ea 100644 --- a/agent/logger/log_test.go +++ b/agent/logger/log_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/logger/log_unix_test.go b/agent/logger/log_unix_test.go index 64be35cff4a..0b063d1837b 100644 --- a/agent/logger/log_unix_test.go +++ b/agent/logger/log_unix_test.go @@ -1,4 +1,5 @@ //go:build !windows && unit +// +build !windows,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/logger/log_windows_test.go b/agent/logger/log_windows_test.go index 9f2fe12ce78..c763d595ac8 100644 --- a/agent/logger/log_windows_test.go +++ b/agent/logger/log_windows_test.go @@ -1,4 +1,5 @@ //go:build windows && unit +// +build windows,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/logger/platform_unix.go b/agent/logger/platform_unix.go index 8b8ef812649..85cb4385906 100644 --- a/agent/logger/platform_unix.go +++ b/agent/logger/platform_unix.go @@ -1,4 +1,5 @@ //go:build !windows +// +build !windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/logger/structured_logger_test.go b/agent/logger/structured_logger_test.go index d51c2a76178..94e1bd8dd3c 100644 --- a/agent/logger/structured_logger_test.go +++ b/agent/logger/structured_logger_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/metrics/metrics_test.go b/agent/metrics/metrics_test.go index 6f454da97f2..e9271853db8 100644 --- a/agent/metrics/metrics_test.go +++ b/agent/metrics/metrics_test.go @@ -1,4 +1,5 @@ //go:build linux && unit +// +build linux,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/s3/s3_test.go b/agent/s3/s3_test.go index 636bd8cc146..b44a221651c 100644 --- a/agent/s3/s3_test.go +++ b/agent/s3/s3_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/sighandlers/debug_handler.go b/agent/sighandlers/debug_handler.go index cdb15a47704..790e61b11a9 100644 --- a/agent/sighandlers/debug_handler.go +++ b/agent/sighandlers/debug_handler.go @@ -1,4 +1,5 @@ //go:build !windows +// +build !windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/sighandlers/debug_handler_windows.go b/agent/sighandlers/debug_handler_windows.go index 27f383055ca..2c414848ad1 100644 --- a/agent/sighandlers/debug_handler_windows.go +++ b/agent/sighandlers/debug_handler_windows.go @@ -1,4 +1,5 @@ //go:build windows +// +build windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/sighandlers/termination_handler_test.go b/agent/sighandlers/termination_handler_test.go index 86369e272fb..610ae69b327 100644 --- a/agent/sighandlers/termination_handler_test.go +++ b/agent/sighandlers/termination_handler_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/ssm/ssm_test.go b/agent/ssm/ssm_test.go index 4028b8c5450..2699083beac 100644 --- a/agent/ssm/ssm_test.go +++ b/agent/ssm/ssm_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/statemanager/dependencies/dependencies_windows.go b/agent/statemanager/dependencies/dependencies_windows.go index 7d920a24f01..709bcf0d021 100644 --- a/agent/statemanager/dependencies/dependencies_windows.go +++ b/agent/statemanager/dependencies/dependencies_windows.go @@ -1,4 +1,5 @@ //go:build windows +// +build windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/statemanager/helper_unix_test.go b/agent/statemanager/helper_unix_test.go index f141753b8ea..9c164e1f26f 100644 --- a/agent/statemanager/helper_unix_test.go +++ b/agent/statemanager/helper_unix_test.go @@ -1,4 +1,5 @@ //go:build !windows && unit +// +build !windows,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/statemanager/helper_windows_test.go b/agent/statemanager/helper_windows_test.go index 4d4539c71f9..178cc6b03cc 100644 --- a/agent/statemanager/helper_windows_test.go +++ b/agent/statemanager/helper_windows_test.go @@ -1,4 +1,5 @@ //go:build windows && unit +// +build windows,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/statemanager/state_manager_test.go b/agent/statemanager/state_manager_test.go index bec7cec51d7..b4d297ca26a 100644 --- a/agent/statemanager/state_manager_test.go +++ b/agent/statemanager/state_manager_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/statemanager/state_manager_unix.go b/agent/statemanager/state_manager_unix.go index 7bd207fec03..ddf9ebfebd9 100644 --- a/agent/statemanager/state_manager_unix.go +++ b/agent/statemanager/state_manager_unix.go @@ -1,4 +1,5 @@ //go:build !windows +// +build !windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/statemanager/state_manager_unix_test.go b/agent/statemanager/state_manager_unix_test.go index 209422b4e87..0b72687df03 100644 --- a/agent/statemanager/state_manager_unix_test.go +++ b/agent/statemanager/state_manager_unix_test.go @@ -1,4 +1,5 @@ //go:build linux && unit +// +build linux,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/statemanager/state_manager_win_test.go b/agent/statemanager/state_manager_win_test.go index 68bf2a182e9..33abcdccac3 100644 --- a/agent/statemanager/state_manager_win_test.go +++ b/agent/statemanager/state_manager_win_test.go @@ -1,4 +1,5 @@ //go:build windows && unit +// +build windows,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/statemanager/state_manager_windows.go b/agent/statemanager/state_manager_windows.go index cc79d16007f..09362c5fe25 100644 --- a/agent/statemanager/state_manager_windows.go +++ b/agent/statemanager/state_manager_windows.go @@ -1,4 +1,5 @@ //go:build windows +// +build windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/statemanager/state_manager_windows_test.go b/agent/statemanager/state_manager_windows_test.go index b347501f404..0d31c4b8f76 100644 --- a/agent/statemanager/state_manager_windows_test.go +++ b/agent/statemanager/state_manager_windows_test.go @@ -1,4 +1,5 @@ //go:build windows && unit +// +build windows,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/stats/common_unix_test.go b/agent/stats/common_unix_test.go index fe488de2613..928364211d6 100644 --- a/agent/stats/common_unix_test.go +++ b/agent/stats/common_unix_test.go @@ -1,4 +1,5 @@ //go:build !windows +// +build !windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/stats/common_windows_test.go b/agent/stats/common_windows_test.go index 349aec3fa61..e818904ad6e 100644 --- a/agent/stats/common_windows_test.go +++ b/agent/stats/common_windows_test.go @@ -1,4 +1,5 @@ //go:build windows +// +build windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/stats/container_test.go b/agent/stats/container_test.go index 9adfb90e9ea..bba649b0f62 100644 --- a/agent/stats/container_test.go +++ b/agent/stats/container_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/stats/engine_integ_test.go b/agent/stats/engine_integ_test.go index fa344c9bcbc..05918a3b40f 100644 --- a/agent/stats/engine_integ_test.go +++ b/agent/stats/engine_integ_test.go @@ -1,4 +1,5 @@ //go:build integration +// +build integration // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/stats/engine_test.go b/agent/stats/engine_test.go index 00a03076eaf..cafe17ea461 100644 --- a/agent/stats/engine_test.go +++ b/agent/stats/engine_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/stats/engine_unix_integ_test.go b/agent/stats/engine_unix_integ_test.go index 578e571979c..152b1d918d3 100644 --- a/agent/stats/engine_unix_integ_test.go +++ b/agent/stats/engine_unix_integ_test.go @@ -1,4 +1,5 @@ //go:build !windows && integration +// +build !windows,integration // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/stats/engine_unix_test.go b/agent/stats/engine_unix_test.go index 657c9999ec5..073f51951a3 100644 --- a/agent/stats/engine_unix_test.go +++ b/agent/stats/engine_unix_test.go @@ -1,4 +1,5 @@ //go:build linux && unit +// +build linux,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/stats/queue_test.go b/agent/stats/queue_test.go index d727b7746ee..919c5a35032 100644 --- a/agent/stats/queue_test.go +++ b/agent/stats/queue_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/stats/task_linux.go b/agent/stats/task_linux.go index b7374a6f4bd..7baa4a0fdda 100644 --- a/agent/stats/task_linux.go +++ b/agent/stats/task_linux.go @@ -1,4 +1,5 @@ //go:build linux +// +build linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/stats/task_linux_test.go b/agent/stats/task_linux_test.go index 05997589126..1ebedf665dd 100644 --- a/agent/stats/task_linux_test.go +++ b/agent/stats/task_linux_test.go @@ -1,4 +1,5 @@ //go:build linux && unit +// +build linux,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/stats/task_unspecified.go b/agent/stats/task_unspecified.go index bdb6e442468..cd96cdeb47c 100644 --- a/agent/stats/task_unspecified.go +++ b/agent/stats/task_unspecified.go @@ -1,4 +1,5 @@ //go:build !linux && !windows +// +build !linux,!windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/stats/utils_test.go b/agent/stats/utils_test.go index 3210c0eed8e..bdca0e169a4 100644 --- a/agent/stats/utils_test.go +++ b/agent/stats/utils_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/stats/utils_unix.go b/agent/stats/utils_unix.go index c89bf5af6cf..28dbcc5fa0e 100644 --- a/agent/stats/utils_unix.go +++ b/agent/stats/utils_unix.go @@ -1,4 +1,5 @@ //go:build !windows +// +build !windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/stats/utils_unix_test.go b/agent/stats/utils_unix_test.go index 84fa3a83a8e..414554cb7fd 100644 --- a/agent/stats/utils_unix_test.go +++ b/agent/stats/utils_unix_test.go @@ -1,4 +1,5 @@ //go:build !windows && unit +// +build !windows,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/stats/utils_windows.go b/agent/stats/utils_windows.go index b8b202ffa6f..9e0545720ea 100644 --- a/agent/stats/utils_windows.go +++ b/agent/stats/utils_windows.go @@ -1,4 +1,5 @@ //go:build windows +// +build windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/stats/utils_windows_test.go b/agent/stats/utils_windows_test.go index 792c500e8e4..6d611bb2fe9 100644 --- a/agent/stats/utils_windows_test.go +++ b/agent/stats/utils_windows_test.go @@ -1,4 +1,5 @@ //go:build windows && unit +// +build windows,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/asmauth/asmauth_test.go b/agent/taskresource/asmauth/asmauth_test.go index 09c032e9a60..73f14fbae36 100644 --- a/agent/taskresource/asmauth/asmauth_test.go +++ b/agent/taskresource/asmauth/asmauth_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/asmauth/asmauthstatus_test.go b/agent/taskresource/asmauth/asmauthstatus_test.go index 54882cb7940..e35218bfcdf 100644 --- a/agent/taskresource/asmauth/asmauthstatus_test.go +++ b/agent/taskresource/asmauth/asmauthstatus_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/asmsecret/asmsecret_test.go b/agent/taskresource/asmsecret/asmsecret_test.go index 59fbd0128ff..d1b093a53a6 100644 --- a/agent/taskresource/asmsecret/asmsecret_test.go +++ b/agent/taskresource/asmsecret/asmsecret_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/asmsecret/asmsecretstatus_test.go b/agent/taskresource/asmsecret/asmsecretstatus_test.go index dac469c84fe..b779aea9785 100644 --- a/agent/taskresource/asmsecret/asmsecretstatus_test.go +++ b/agent/taskresource/asmsecret/asmsecretstatus_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/cgroup/cgroup.go b/agent/taskresource/cgroup/cgroup.go index e4ebcdc78ee..6fe0a82054f 100644 --- a/agent/taskresource/cgroup/cgroup.go +++ b/agent/taskresource/cgroup/cgroup.go @@ -1,4 +1,5 @@ //go:build linux +// +build linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/cgroup/cgroup_test.go b/agent/taskresource/cgroup/cgroup_test.go index 7aa409a5e33..f37accd6a5c 100644 --- a/agent/taskresource/cgroup/cgroup_test.go +++ b/agent/taskresource/cgroup/cgroup_test.go @@ -1,4 +1,5 @@ //go:build linux && unit +// +build linux,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/cgroup/cgroup_unsupported.go b/agent/taskresource/cgroup/cgroup_unsupported.go index 6208687b7b0..544130a606c 100644 --- a/agent/taskresource/cgroup/cgroup_unsupported.go +++ b/agent/taskresource/cgroup/cgroup_unsupported.go @@ -1,4 +1,5 @@ //go:build !linux +// +build !linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/cgroup/cgroupstatus.go b/agent/taskresource/cgroup/cgroupstatus.go index 156e7ac6788..6e6e0df8c50 100644 --- a/agent/taskresource/cgroup/cgroupstatus.go +++ b/agent/taskresource/cgroup/cgroupstatus.go @@ -1,4 +1,5 @@ //go:build linux +// +build linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/cgroup/cgroupstatus_test.go b/agent/taskresource/cgroup/cgroupstatus_test.go index 482e4535104..065b3df2456 100644 --- a/agent/taskresource/cgroup/cgroupstatus_test.go +++ b/agent/taskresource/cgroup/cgroupstatus_test.go @@ -1,4 +1,5 @@ //go:build linux && unit +// +build linux,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/cgroup/control/cgroup_controller_linux.go b/agent/taskresource/cgroup/control/cgroup_controller_linux.go index 915363b1a6f..18542c35174 100644 --- a/agent/taskresource/cgroup/control/cgroup_controller_linux.go +++ b/agent/taskresource/cgroup/control/cgroup_controller_linux.go @@ -1,4 +1,5 @@ //go:build linux +// +build linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/cgroup/control/cgroup_controller_linux_test.go b/agent/taskresource/cgroup/control/cgroup_controller_linux_test.go index 027f5912e29..9e46dfa3ead 100644 --- a/agent/taskresource/cgroup/control/cgroup_controller_linux_test.go +++ b/agent/taskresource/cgroup/control/cgroup_controller_linux_test.go @@ -1,4 +1,5 @@ //go:build linux && unit +// +build linux,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/cgroup/control/factory/factory_linux.go b/agent/taskresource/cgroup/control/factory/factory_linux.go index 6e9e3f895d3..6ce587e7ec5 100644 --- a/agent/taskresource/cgroup/control/factory/factory_linux.go +++ b/agent/taskresource/cgroup/control/factory/factory_linux.go @@ -1,4 +1,5 @@ //go:build linux +// +build linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/cgroup/control/factory/generate_mocks_linux.go b/agent/taskresource/cgroup/control/factory/generate_mocks_linux.go index 31143cc3e8b..e36c74e54f7 100644 --- a/agent/taskresource/cgroup/control/factory/generate_mocks_linux.go +++ b/agent/taskresource/cgroup/control/factory/generate_mocks_linux.go @@ -1,4 +1,5 @@ //go:build linux +// +build linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/cgroup/control/generate_mocks_linux.go b/agent/taskresource/cgroup/control/generate_mocks_linux.go index 38219dc0189..7b7a341acaa 100644 --- a/agent/taskresource/cgroup/control/generate_mocks_linux.go +++ b/agent/taskresource/cgroup/control/generate_mocks_linux.go @@ -1,4 +1,5 @@ //go:build linux +// +build linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/cgroup/control/init_linux.go b/agent/taskresource/cgroup/control/init_linux.go index a29da1df472..a3380896e15 100644 --- a/agent/taskresource/cgroup/control/init_linux.go +++ b/agent/taskresource/cgroup/control/init_linux.go @@ -1,4 +1,5 @@ //go:build linux +// +build linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/cgroup/control/init_linux_test.go b/agent/taskresource/cgroup/control/init_linux_test.go index fc218362e8a..6d0a3d27095 100644 --- a/agent/taskresource/cgroup/control/init_linux_test.go +++ b/agent/taskresource/cgroup/control/init_linux_test.go @@ -1,4 +1,5 @@ //go:build linux && unit +// +build linux,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/cgroup/control/types_linux.go b/agent/taskresource/cgroup/control/types_linux.go index d6c0842609a..50a6a6df5bd 100644 --- a/agent/taskresource/cgroup/control/types_linux.go +++ b/agent/taskresource/cgroup/control/types_linux.go @@ -1,4 +1,5 @@ //go:build linux +// +build linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/credentialspec/credentialspec_unsupported.go b/agent/taskresource/credentialspec/credentialspec_unsupported.go index fc48ea5ecdb..62ac255561e 100644 --- a/agent/taskresource/credentialspec/credentialspec_unsupported.go +++ b/agent/taskresource/credentialspec/credentialspec_unsupported.go @@ -1,4 +1,5 @@ //go:build !windows +// +build !windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/credentialspec/credentialspec_windows.go b/agent/taskresource/credentialspec/credentialspec_windows.go index 72ac9d2216c..b7b69d92267 100644 --- a/agent/taskresource/credentialspec/credentialspec_windows.go +++ b/agent/taskresource/credentialspec/credentialspec_windows.go @@ -1,4 +1,5 @@ //go:build windows +// +build windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/credentialspec/credentialspec_windows_test.go b/agent/taskresource/credentialspec/credentialspec_windows_test.go index dfe6a49aa8c..3741dca27e9 100644 --- a/agent/taskresource/credentialspec/credentialspec_windows_test.go +++ b/agent/taskresource/credentialspec/credentialspec_windows_test.go @@ -1,4 +1,5 @@ //go:build windows && unit +// +build windows,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/envFiles/envfile_test.go b/agent/taskresource/envFiles/envfile_test.go index ad7943c14e4..6e15702de62 100644 --- a/agent/taskresource/envFiles/envfile_test.go +++ b/agent/taskresource/envFiles/envfile_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/envFiles/envfilestatus_test.go b/agent/taskresource/envFiles/envfilestatus_test.go index 1bbbb7a0ad8..2c87ad70c39 100644 --- a/agent/taskresource/envFiles/envfilestatus_test.go +++ b/agent/taskresource/envFiles/envfilestatus_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/firelens/firelens_unimplemented.go b/agent/taskresource/firelens/firelens_unimplemented.go index b6a69a67485..36adcf28a68 100644 --- a/agent/taskresource/firelens/firelens_unimplemented.go +++ b/agent/taskresource/firelens/firelens_unimplemented.go @@ -1,4 +1,5 @@ //go:build !linux +// +build !linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/firelens/firelens_unix.go b/agent/taskresource/firelens/firelens_unix.go index 1646ed71eb3..7c53139fdf8 100644 --- a/agent/taskresource/firelens/firelens_unix.go +++ b/agent/taskresource/firelens/firelens_unix.go @@ -1,4 +1,5 @@ //go:build linux +// +build linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/firelens/firelens_unix_test.go b/agent/taskresource/firelens/firelens_unix_test.go index a4573152c24..d7cf8624897 100644 --- a/agent/taskresource/firelens/firelens_unix_test.go +++ b/agent/taskresource/firelens/firelens_unix_test.go @@ -1,4 +1,5 @@ //go:build linux && unit +// +build linux,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/firelens/firelensconfig_unix.go b/agent/taskresource/firelens/firelensconfig_unix.go index 1ed4d75be95..dbc1709d98c 100644 --- a/agent/taskresource/firelens/firelensconfig_unix.go +++ b/agent/taskresource/firelens/firelensconfig_unix.go @@ -1,4 +1,5 @@ //go:build linux +// +build linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/firelens/firelensconfig_unix_test.go b/agent/taskresource/firelens/firelensconfig_unix_test.go index 9fed0fae327..1a18f0cf49c 100644 --- a/agent/taskresource/firelens/firelensconfig_unix_test.go +++ b/agent/taskresource/firelens/firelensconfig_unix_test.go @@ -1,4 +1,5 @@ //go:build linux && unit +// +build linux,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/firelens/firelensstatus_test.go b/agent/taskresource/firelens/firelensstatus_test.go index d128f54af82..5a171aa56db 100644 --- a/agent/taskresource/firelens/firelensstatus_test.go +++ b/agent/taskresource/firelens/firelensstatus_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/firelens/json_unix.go b/agent/taskresource/firelens/json_unix.go index 8ee89d2c55d..ba3d8c6be24 100644 --- a/agent/taskresource/firelens/json_unix.go +++ b/agent/taskresource/firelens/json_unix.go @@ -1,4 +1,5 @@ //go:build linux +// +build linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/firelens/json_unix_test.go b/agent/taskresource/firelens/json_unix_test.go index 4cd5ba12775..dec3cdbfed1 100644 --- a/agent/taskresource/firelens/json_unix_test.go +++ b/agent/taskresource/firelens/json_unix_test.go @@ -1,4 +1,5 @@ //go:build linux && unit +// +build linux,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/fsxwindowsfileserver/fsxwindowsfileserver_unsupported.go b/agent/taskresource/fsxwindowsfileserver/fsxwindowsfileserver_unsupported.go index 6d45f55dc8b..1e2bee5ea2f 100644 --- a/agent/taskresource/fsxwindowsfileserver/fsxwindowsfileserver_unsupported.go +++ b/agent/taskresource/fsxwindowsfileserver/fsxwindowsfileserver_unsupported.go @@ -1,4 +1,5 @@ //go:build !windows +// +build !windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/fsxwindowsfileserver/fsxwindowsfileserver_windows.go b/agent/taskresource/fsxwindowsfileserver/fsxwindowsfileserver_windows.go index 1350d52098b..cd2175c5d26 100644 --- a/agent/taskresource/fsxwindowsfileserver/fsxwindowsfileserver_windows.go +++ b/agent/taskresource/fsxwindowsfileserver/fsxwindowsfileserver_windows.go @@ -1,4 +1,5 @@ //go:build windows +// +build windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/fsxwindowsfileserver/fsxwindowsfileserver_windows_test.go b/agent/taskresource/fsxwindowsfileserver/fsxwindowsfileserver_windows_test.go index 0d369c76509..e55116ad3ed 100644 --- a/agent/taskresource/fsxwindowsfileserver/fsxwindowsfileserver_windows_test.go +++ b/agent/taskresource/fsxwindowsfileserver/fsxwindowsfileserver_windows_test.go @@ -1,4 +1,5 @@ //go:build windows && unit +// +build windows,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/fsxwindowsfileserver/fsxwindowsfileserverstatus_test.go b/agent/taskresource/fsxwindowsfileserver/fsxwindowsfileserverstatus_test.go index 276d29e326e..0f9e0bce848 100644 --- a/agent/taskresource/fsxwindowsfileserver/fsxwindowsfileserverstatus_test.go +++ b/agent/taskresource/fsxwindowsfileserver/fsxwindowsfileserverstatus_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/ssmsecret/ssmsecret_test.go b/agent/taskresource/ssmsecret/ssmsecret_test.go index 8c530bc0be2..de1f13f4c22 100644 --- a/agent/taskresource/ssmsecret/ssmsecret_test.go +++ b/agent/taskresource/ssmsecret/ssmsecret_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/ssmsecret/ssmsecretstatus_test.go b/agent/taskresource/ssmsecret/ssmsecretstatus_test.go index 3e1722fb906..4a86aea20e1 100644 --- a/agent/taskresource/ssmsecret/ssmsecretstatus_test.go +++ b/agent/taskresource/ssmsecret/ssmsecretstatus_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/types/types_linux_test.go b/agent/taskresource/types/types_linux_test.go index 7f3a683a482..a5facfa1a0e 100644 --- a/agent/taskresource/types/types_linux_test.go +++ b/agent/taskresource/types/types_linux_test.go @@ -1,4 +1,5 @@ //go:build linux && unit +// +build linux,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/types/types_test.go b/agent/taskresource/types/types_test.go index f90c47540c1..98553b83905 100644 --- a/agent/taskresource/types/types_test.go +++ b/agent/taskresource/types/types_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/types_unix.go b/agent/taskresource/types_unix.go index bf9489b828f..a509a9d99ef 100644 --- a/agent/taskresource/types_unix.go +++ b/agent/taskresource/types_unix.go @@ -1,4 +1,5 @@ //go:build linux +// +build linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/types_unsupported.go b/agent/taskresource/types_unsupported.go index 106d78d493c..749ff5b85d9 100644 --- a/agent/taskresource/types_unsupported.go +++ b/agent/taskresource/types_unsupported.go @@ -1,4 +1,5 @@ //go:build !linux && !windows +// +build !linux,!windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/types_windows.go b/agent/taskresource/types_windows.go index f189f2318ed..810f57f39ad 100644 --- a/agent/taskresource/types_windows.go +++ b/agent/taskresource/types_windows.go @@ -1,4 +1,5 @@ //go:build windows +// +build windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/volume/dockervolume_test.go b/agent/taskresource/volume/dockervolume_test.go index 2b7b5f2990b..952c0774346 100644 --- a/agent/taskresource/volume/dockervolume_test.go +++ b/agent/taskresource/volume/dockervolume_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/taskresource/volume/volumestatus_test.go b/agent/taskresource/volume/volumestatus_test.go index f2bbc093f23..4fb1fc92132 100644 --- a/agent/taskresource/volume/volumestatus_test.go +++ b/agent/taskresource/volume/volumestatus_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/tcs/client/client_test.go b/agent/tcs/client/client_test.go index 883b8c82add..17a6110ead5 100644 --- a/agent/tcs/client/client_test.go +++ b/agent/tcs/client/client_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/tcs/handler/handler_test.go b/agent/tcs/handler/handler_test.go index e815b148530..3d5278fadc0 100644 --- a/agent/tcs/handler/handler_test.go +++ b/agent/tcs/handler/handler_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/tcs/handler/types_test.go b/agent/tcs/handler/types_test.go index 98ac4a09a58..6879f5c1bff 100644 --- a/agent/tcs/handler/types_test.go +++ b/agent/tcs/handler/types_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/tools.go b/agent/tools.go index bb248e6b6dc..4a6061cdfdd 100644 --- a/agent/tools.go +++ b/agent/tools.go @@ -1,4 +1,5 @@ //go:build tools +// +build tools // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/utils/compare_versions_test.go b/agent/utils/compare_versions_test.go index d9b7883d467..b00b10b1889 100644 --- a/agent/utils/compare_versions_test.go +++ b/agent/utils/compare_versions_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/utils/cpuinfo.go b/agent/utils/cpuinfo.go index 390768043d5..0fa8f845de9 100644 --- a/agent/utils/cpuinfo.go +++ b/agent/utils/cpuinfo.go @@ -1,4 +1,5 @@ //go:build linux +// +build linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/utils/cpuinfo_test.go b/agent/utils/cpuinfo_test.go index bf86ee282d6..d629ec94ca3 100644 --- a/agent/utils/cpuinfo_test.go +++ b/agent/utils/cpuinfo_test.go @@ -1,4 +1,5 @@ //go:build linux && unit +// +build linux,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/utils/json_test.go b/agent/utils/json_test.go index 6e4c6803835..b9746c2e677 100644 --- a/agent/utils/json_test.go +++ b/agent/utils/json_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/utils/license_test.go b/agent/utils/license_test.go index d66f674db4c..7403ce2747a 100644 --- a/agent/utils/license_test.go +++ b/agent/utils/license_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/utils/nswrapper/ns_linux.go b/agent/utils/nswrapper/ns_linux.go index 03e7b2f6285..630adfc5666 100644 --- a/agent/utils/nswrapper/ns_linux.go +++ b/agent/utils/nswrapper/ns_linux.go @@ -1,4 +1,5 @@ //go:build linux +// +build linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/utils/retry/backoff_test.go b/agent/utils/retry/backoff_test.go index 232349650ce..d68ccde8aef 100644 --- a/agent/utils/retry/backoff_test.go +++ b/agent/utils/retry/backoff_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/utils/retry/exponential_backoff_test.go b/agent/utils/retry/exponential_backoff_test.go index 7583eb9f2ef..5571f49051b 100644 --- a/agent/utils/retry/exponential_backoff_test.go +++ b/agent/utils/retry/exponential_backoff_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/utils/retry/retry.go b/agent/utils/retry/retry.go index f8acac21a17..bbb77cbf4d2 100644 --- a/agent/utils/retry/retry.go +++ b/agent/utils/retry/retry.go @@ -14,9 +14,10 @@ package retry import ( + "context" + apierrors "github.com/aws/amazon-ecs-agent/agent/api/errors" "github.com/aws/amazon-ecs-agent/agent/utils/ttime" - "golang.org/x/net/context" ) var _time ttime.Time = &ttime.DefaultTime{} diff --git a/agent/utils/retry/retry_test.go b/agent/utils/retry/retry_test.go index 4a5546bc7e7..ae602f787e5 100644 --- a/agent/utils/retry/retry_test.go +++ b/agent/utils/retry/retry_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // @@ -16,6 +17,7 @@ package retry import ( + "context" "errors" "testing" "time" @@ -25,7 +27,6 @@ import ( mock_ttime "github.com/aws/amazon-ecs-agent/agent/utils/ttime/mocks" "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" - "golang.org/x/net/context" ) func TestRetryWithBackoff(t *testing.T) { diff --git a/agent/utils/sync/sequential_waitgroup_test.go b/agent/utils/sync/sequential_waitgroup_test.go index 31f713e2395..ff289f364c6 100644 --- a/agent/utils/sync/sequential_waitgroup_test.go +++ b/agent/utils/sync/sequential_waitgroup_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/utils/ticker_test.go b/agent/utils/ticker_test.go index 535eb629b5e..6dc65e89b9e 100644 --- a/agent/utils/ticker_test.go +++ b/agent/utils/ticker_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/utils/utils_linux.go b/agent/utils/utils_linux.go index 281f413527d..aaa2931a15e 100644 --- a/agent/utils/utils_linux.go +++ b/agent/utils/utils_linux.go @@ -1,4 +1,5 @@ //go:build linux +// +build linux // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/utils/utils_linux_test.go b/agent/utils/utils_linux_test.go index 73b24be11e0..ea369097c94 100644 --- a/agent/utils/utils_linux_test.go +++ b/agent/utils/utils_linux_test.go @@ -1,4 +1,5 @@ //go:build linux && unit +// +build linux,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/utils/utils_test.go b/agent/utils/utils_test.go index 1e477b6bfd9..6ed9a076bdd 100644 --- a/agent/utils/utils_test.go +++ b/agent/utils/utils_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/utils/utils_unsupported.go b/agent/utils/utils_unsupported.go index 6109dff49d1..cc93b15e9bd 100644 --- a/agent/utils/utils_unsupported.go +++ b/agent/utils/utils_unsupported.go @@ -1,4 +1,5 @@ //go:build !linux && !windows +// +build !linux,!windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/utils/utils_windows.go b/agent/utils/utils_windows.go index 072df48b470..938db186bf8 100644 --- a/agent/utils/utils_windows.go +++ b/agent/utils/utils_windows.go @@ -1,4 +1,5 @@ //go:build windows +// +build windows // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/utils/utils_windows_test.go b/agent/utils/utils_windows_test.go index ad22e500fc3..6b09d902bce 100644 --- a/agent/utils/utils_windows_test.go +++ b/agent/utils/utils_windows_test.go @@ -1,4 +1,5 @@ //go:build windows && unit +// +build windows,unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/agent/wsclient/client_test.go b/agent/wsclient/client_test.go index 8f66140be33..54ee2aa7274 100644 --- a/agent/wsclient/client_test.go +++ b/agent/wsclient/client_test.go @@ -1,4 +1,5 @@ //go:build unit +// +build unit // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // diff --git a/misc/pause-container/pause-config.json b/misc/pause-container/pause-config.json index f59eee6a7ef..8e745cdda9d 100644 --- a/misc/pause-container/pause-config.json +++ b/misc/pause-container/pause-config.json @@ -1,2 +1 @@ -{"author":"Amazon Web Services, Inc.","config":{"Cmd":["/pause"],"ArgsEscaped":true},"created":"2014-12-12T01:12:53.332832423Z","history":[{"created":"2014-12-12T01:12:53.332832423Z","author":"Amazon Web Services, Inc.","created_by":"[] + [] === \"\"","empty_layer":true}],"os":"linux","rootfs":{"type":"layers","diff_ids":["sha256:~~digest~~"]}} - +{"author":"Amazon Web Services, Inc.","config":{"Cmd":["/pause"],"ArgsEscaped":true},"created":"2014-12-12T01:12:53.332832423Z","history":[{"created":"2014-12-12T01:12:53.332832423Z","author":"Amazon Web Services, Inc.","created_by":"°o°","empty_layer":true}],"os":"linux","rootfs":{"type":"layers","diff_ids":["sha256:~~digest~~"]}} diff --git a/packaging/amazon-linux-ami-integrated/amazon-ecs-volume-plugin.conf b/packaging/amazon-linux-ami-integrated/amazon-ecs-volume-plugin.conf new file mode 100644 index 00000000000..3a19905ffc9 --- /dev/null +++ b/packaging/amazon-linux-ami-integrated/amazon-ecs-volume-plugin.conf @@ -0,0 +1,22 @@ +# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the +# "License"). You may not use this file except in compliance +# with the License. A copy of the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and +# limitations under the License. + +description "Amazon Elastic Container Service Volume Plugin" +author "Amazon Web Services" +start on stopped rc RUNLEVEL=[345] + +respawn +respawn limit 10 15 + +exec /usr/libexec/amazon-ecs-volume-plugin diff --git a/packaging/amazon-linux-ami-integrated/amazon-ecs-volume-plugin.service b/packaging/amazon-linux-ami-integrated/amazon-ecs-volume-plugin.service new file mode 100644 index 00000000000..10eb4743f37 --- /dev/null +++ b/packaging/amazon-linux-ami-integrated/amazon-ecs-volume-plugin.service @@ -0,0 +1,27 @@ +# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the +# "License"). You may not use this file except in compliance +# with the License. A copy of the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and +# limitations under the License + +[Unit] +Description=Amazon Elastic Container Service Volume Plugin +After=network.target amazon-ecs-volume-plugin.socket +Requires=amazon-ecs-volume-plugin.socket + +[Service] +Type=simple +Restart=on-failure +RestartSec=10s +ExecStart=/usr/libexec/amazon-ecs-volume-plugin + +[Install] +WantedBy=multi-user.target diff --git a/packaging/amazon-linux-ami-integrated/amazon-ecs-volume-plugin.socket b/packaging/amazon-linux-ami-integrated/amazon-ecs-volume-plugin.socket new file mode 100644 index 00000000000..c42342fea7f --- /dev/null +++ b/packaging/amazon-linux-ami-integrated/amazon-ecs-volume-plugin.socket @@ -0,0 +1,23 @@ +# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the +# "License"). You may not use this file except in compliance +# with the License. A copy of the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and +# limitations under the License + +[Unit] +Description=Amazon Elastic Container Service Volume Plugin +PartOf=amazon-ecs-volume-plugin.service + +[Socket] +ListenStream=/var/run/docker/plugins/amazon-ecs-volume-plugin.sock + +[Install] +WantedBy=sockets.target diff --git a/packaging/amazon-linux-ami-integrated/ecs-init.spec b/packaging/amazon-linux-ami-integrated/ecs-init.spec new file mode 100644 index 00000000000..e8cf2fd239f --- /dev/null +++ b/packaging/amazon-linux-ami-integrated/ecs-init.spec @@ -0,0 +1,716 @@ +# Copyright 2014-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the +# "License"). You may not use this file except in compliance +# with the License. A copy of the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and +# limitations under the License. + +%if 0%{?amzn} >= 2 +%bcond_without systemd # with +%global gobuild_tag al2 +%else +%bcond_with systemd # without +%global running_semaphore %{_localstatedir}/run/ecs-init.was-running +%global gobuild_tag %{nil} +%endif +%global _cachedir %{_localstatedir}/cache +%global bundled_agent_version %{version} +%global no_exec_perm 644 +%global debug_package %{nil} +%global agent_image ecs-agent-v%{version}.tar + +Name: ecs-init +Version: 1.60.0 +Release: 1%{?dist} +License: Apache 2.0 +Summary: Amazon Elastic Container Service initialization application +ExclusiveArch: x86_64 aarch64 + +Source0: sources.tgz +Source1: ecs.conf +Source2: ecs.service +Source3: amazon-ecs-volume-plugin.service +Source4: amazon-ecs-volume-plugin.socket +Source5: amazon-ecs-volume-plugin.conf + +%if %{with systemd} +BuildRequires: systemd +Requires: systemd +%else +Requires: upstart +%endif +Requires: iptables +Requires: docker >= 17.06.2ce +Requires: procps + +# The following 'Provides' lists the vendored dependencies bundled in +# and used to produce the ecs-init package. As dependencies are added +# or removed, this list should also be updated accordingly. +# +# You can use this to generate a list of the appropriate Provides +# statements by reading out the vendor directory: +# +# find ../../ecs-init/vendor -name \*.go -exec dirname {} \; | sort | uniq | sed 's,^.*ecs-init/vendor/,,; s/^/bundled(golang(/; s/$/))/;' | sed 's/^/Provides:\t/' | expand - +Provides: bundled(golang(github.com/Azure/go-ansiterm)) +Provides: bundled(golang(github.com/Azure/go-ansiterm/winterm)) +Provides: bundled(golang(github.com/Microsoft/go-winio)) +Provides: bundled(golang(github.com/NVIDIA/gpu-monitoring-tools/bindings/go/nvml)) +Provides: bundled(golang(github.com/Nvveen/Gotty)) +Provides: bundled(golang(github.com/Sirupsen/logrus)) +Provides: bundled(golang(github.com/aws/aws-sdk-go/aws)) +Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/awserr)) +Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/awsutil)) +Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/client)) +Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/client/metadata)) +Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/corehandlers)) +Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/credentials)) +Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds)) +Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/credentials/endpointcreds)) +Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/credentials/stscreds)) +Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/defaults)) +Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/ec2metadata)) +Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/endpoints)) +Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/request)) +Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/session)) +Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/signer/v4)) +Provides: bundled(golang(github.com/aws/aws-sdk-go/internal/sdkio)) +Provides: bundled(golang(github.com/aws/aws-sdk-go/internal/sdkrand)) +Provides: bundled(golang(github.com/aws/aws-sdk-go/internal/shareddefaults)) +Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol)) +Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol/query)) +Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol/query/queryutil)) +Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol/rest)) +Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol/restxml)) +Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil)) +Provides: bundled(golang(github.com/aws/aws-sdk-go/service/s3)) +Provides: bundled(golang(github.com/aws/aws-sdk-go/service/s3/s3iface)) +Provides: bundled(golang(github.com/aws/aws-sdk-go/service/s3/s3manager)) +Provides: bundled(golang(github.com/aws/aws-sdk-go/service/sts)) +Provides: bundled(golang(github.com/cihub/seelog)) +Provides: bundled(golang(github.com/cihub/seelog/archive)) +Provides: bundled(golang(github.com/cihub/seelog/archive/gzip)) +Provides: bundled(golang(github.com/cihub/seelog/archive/tar)) +Provides: bundled(golang(github.com/cihub/seelog/archive/zip)) +Provides: bundled(golang(github.com/coreos/go-systemd/activation)) +Provides: bundled(golang(github.com/davecgh/go-spew/spew)) +Provides: bundled(golang(github.com/docker/docker/api/types)) +Provides: bundled(golang(github.com/docker/docker/api/types/blkiodev)) +Provides: bundled(golang(github.com/docker/docker/api/types/container)) +Provides: bundled(golang(github.com/docker/docker/api/types/filters)) +Provides: bundled(golang(github.com/docker/docker/api/types/mount)) +Provides: bundled(golang(github.com/docker/docker/api/types/network)) +Provides: bundled(golang(github.com/docker/docker/api/types/registry)) +Provides: bundled(golang(github.com/docker/docker/api/types/strslice)) +Provides: bundled(golang(github.com/docker/docker/api/types/swarm)) +Provides: bundled(golang(github.com/docker/docker/api/types/versions)) +Provides: bundled(golang(github.com/docker/docker/opts)) +Provides: bundled(golang(github.com/docker/docker/pkg/archive)) +Provides: bundled(golang(github.com/docker/docker/pkg/fileutils)) +Provides: bundled(golang(github.com/docker/docker/pkg/homedir)) +Provides: bundled(golang(github.com/docker/docker/pkg/idtools)) +Provides: bundled(golang(github.com/docker/docker/pkg/ioutils)) +Provides: bundled(golang(github.com/docker/docker/pkg/jsonlog)) +Provides: bundled(golang(github.com/docker/docker/pkg/jsonmessage)) +Provides: bundled(golang(github.com/docker/docker/pkg/longpath)) +Provides: bundled(golang(github.com/docker/docker/pkg/mount)) +Provides: bundled(golang(github.com/docker/docker/pkg/pools)) +Provides: bundled(golang(github.com/docker/docker/pkg/promise)) +Provides: bundled(golang(github.com/docker/docker/pkg/stdcopy)) +Provides: bundled(golang(github.com/docker/docker/pkg/system)) +Provides: bundled(golang(github.com/docker/docker/pkg/term)) +Provides: bundled(golang(github.com/docker/docker/pkg/term/windows)) +Provides: bundled(golang(github.com/docker/go-connections/nat)) +Provides: bundled(golang(github.com/docker/go-connections/sockets)) +Provides: bundled(golang(github.com/docker/go-plugins-helpers/sdk)) +Provides: bundled(golang(github.com/docker/go-plugins-helpers/volume)) +Provides: bundled(golang(github.com/docker/go-units)) +Provides: bundled(golang(github.com/fsouza/go-dockerclient)) +Provides: bundled(golang(github.com/go-ini/ini)) +Provides: bundled(golang(github.com/golang/mock/gomock)) +Provides: bundled(golang(github.com/jmespath/go-jmespath)) +Provides: bundled(golang(github.com/opencontainers/go-digest)) +Provides: bundled(golang(github.com/opencontainers/image-spec/specs-go)) +Provides: bundled(golang(github.com/opencontainers/image-spec/specs-go/v1)) +Provides: bundled(golang(github.com/opencontainers/runc/libcontainer/system)) +Provides: bundled(golang(github.com/opencontainers/runc/libcontainer/user)) +Provides: bundled(golang(github.com/pkg/errors)) +Provides: bundled(golang(github.com/pmezard/go-difflib/difflib)) +Provides: bundled(golang(github.com/stretchr/testify/assert)) +Provides: bundled(golang(golang.org/x/net/context)) +Provides: bundled(golang(golang.org/x/net/context/ctxhttp)) +Provides: bundled(golang(golang.org/x/net/proxy)) +Provides: bundled(golang(golang.org/x/sys/unix)) +Provides: bundled(golang(golang.org/x/sys/windows)) + +%description +ecs-init supports the initialization and supervision of the Amazon ECS +container agent, including configuration of cgroups, iptables, and +required routes among its preparation steps. + +%prep +%setup -c + +%build +# each of these should build for arm and amd arch +./scripts/build-pause +./scripts/get-host-certs +./scripts/build-cni-plugins +./scripts/build true "" false true +./scripts/build-agent-image +./scripts/gobuild.sh + +%install +install -D amazon-ecs-init %{buildroot}%{_libexecdir}/amazon-ecs-init +install -D amazon-ecs-volume-plugin %{buildroot}%{_libexecdir}/amazon-ecs-volume-plugin +install -m %{no_exec_perm} -D scripts/amazon-ecs-init.1 %{buildroot}%{_mandir}/man1/amazon-ecs-init.1 + +mkdir -p %{buildroot}%{_sysconfdir}/ecs +touch %{buildroot}%{_sysconfdir}/ecs/ecs.config +touch %{buildroot}%{_sysconfdir}/ecs/ecs.config.json + +# Configure ecs-init to reload the bundled ECS container agent image. +mkdir -p %{buildroot}%{_cachedir}/ecs +echo 2 > %{buildroot}%{_cachedir}/ecs/state +install -m %{no_exec_perm} %{agent_image} %{buildroot}%{_cachedir}/ecs/ecs-agent.tar + +mkdir -p %{buildroot}%{_sharedstatedir}/ecs/data + +%if %{with systemd} +install -m %{no_exec_perm} -D %{SOURCE2} $RPM_BUILD_ROOT/%{_unitdir}/ecs.service +install -m %{no_exec_perm} -D %{SOURCE3} $RPM_BUILD_ROOT/%{_unitdir}/amazon-ecs-volume-plugin.service +install -m %{no_exec_perm} -D %{SOURCE4} $RPM_BUILD_ROOT/%{_unitdir}/amazon-ecs-volume-plugin.socket +%else +install -m %{no_exec_perm} -D %{SOURCE1} %{buildroot}%{_sysconfdir}/init/ecs.conf +install -m %{no_exec_perm} -D %{SOURCE5} %{buildroot}%{_sysconfdir}/init/amazon-ecs-volume-plugin.conf +%endif + +%files +%{_libexecdir}/amazon-ecs-init +%{_mandir}/man1/amazon-ecs-init.1* +%{_libexecdir}/amazon-ecs-volume-plugin +%config(noreplace) %ghost %{_sysconfdir}/ecs/ecs.config +%config(noreplace) %ghost %{_sysconfdir}/ecs/ecs.config.json +%{_cachedir}/ecs/ecs-agent.tar +%{_cachedir}/ecs/state +%dir %{_sharedstatedir}/ecs/data + +%if %{with systemd} +%{_unitdir}/ecs.service +%{_unitdir}/amazon-ecs-volume-plugin.service +%{_unitdir}/amazon-ecs-volume-plugin.socket +%else +%{_sysconfdir}/init/ecs.conf +%{_sysconfdir}/init/amazon-ecs-volume-plugin.conf +%endif + +%post +# Symlink the bundled ECS Agent at loadable path. +ln -sf %{basename:%{agent_image}} %{_cachedir}/ecs/ecs-agent.tar +%if %{with systemd} +%systemd_post ecs +%systemd_post amazon-ecs-volume-plugin.service + +%postun +%systemd_postun ecs +%systemd_postun_with_restart amazon-ecs-volume-plugin + +%else +%triggerun -- docker +# record whether or not our service was running when docker is upgraded +ecs_status=$(/sbin/status ecs 2>/dev/null || :) +if grep -qF "start/" <<< "${ecs_status}"; then + /sbin/stop ecs >/dev/null 2>&1 || : + if [ "$1" -ge 1 ]; then + # write semaphore if this package is still installed + touch %{running_semaphore} >/dev/null 2>&1 || : + fi +fi + +%triggerpostun -- docker +# ensures that ecs-init is restarted after docker or ecs-init is upgraded +if [ "$1" -ge 1 ] && [ -e %{running_semaphore} ]; then + /sbin/start ecs >/dev/null 2>&1 || : + rm %{running_semaphore} >/dev/null 2>&1 ||: +fi + +%postun +# record whether or not our service was running when ecs-init is upgraded +ecs_status=$(/sbin/status ecs 2>/dev/null || :) +if grep -qF "start/" <<< "${ecs_status}"; then + /sbin/stop ecs >/dev/null 2>&1 || : + if [ "$1" -ge 1 ]; then + # write semaphore if this package is upgraded + touch %{running_semaphore} >/dev/null 2>&1 || : + fi +fi +# remove semaphore if this package is erased +if [ "$1" -eq 0 ]; then + rm %{running_semaphore} >/dev/null 2>&1 || : +fi + +%triggerun -- ecs-init <= 1.0-3 +# handle old ecs-init package that does not properly stop +ecs_status=$(/sbin/status ecs 2>/dev/null || :) +if grep -qF "start/" <<< "${ecs_status}"; then + /sbin/stop ecs >/dev/null 2>&1 || : + touch %{running_semaphore} >/dev/null 2>&1 || : +fi + +%posttrans +# ensure that we restart after the transaction +if [ -e %{running_semaphore} ]; then + /sbin/start ecs >/dev/null 2>&1 || : + rm %{running_semaphore} >/dev/null 2>&1 || : +fi +%endif + +%changelog +* Wed Mar 02 2022 Chien Han Lin - 1.60.0-1 +- Cache Agent version 1.60.0 +- Add volume plugin to rpm/deb package + +* Fri Feb 04 2022 Yash Kulshrestha - 1.59.0-1 +- Cache Agent version 1.59.0 +- Log what pre-start is doing + +* Fri Jan 14 2022 Utsa Bhattacharjya - 1.58.0-2 +- Cache Agent version 1.58.0 +- Add exec prerequisites to ecs-anywhere installation script + +* Fri Dec 03 2021 Mythri Garaga Mannjunatha - 1.57.1-1 +- Cache Agent version 1.57.1 +- Enable AL2 support for ECS-A +- Initialize docker client lazily + +* Wed Nov 03 2021 Feng Xiong - 1.57.0-1 +- Cache Agent version 1.57.0 + +* Thu Oct 21 2021 Cameron Sparr - 1.56.0-1 +- Cache Agent version 1.56.0 + +* Wed Oct 13 2021 Utsa Bhattacharjya - 1.55.5-1 +- Cache Agent version 1.55.5 + +* Thu Sep 30 2021 Ray Allan - 1.55.4-1 +- Cache Agent version 1.55.4 +- GPU updates for ECS Anywhere +- Introduce new configuration variable ECS_OFFHOST_INTROSPECTION_NAME to specify the primary network interface name to block offhost agent introspection port access. + +* Thu Sep 16 2021 Mythri Garaga Manjunatha - 1.55.3-1 +- Cache Agent version 1.55.3 + +* Thu Sep 02 2021 Yinyi Chen - 1.55.2-1 +- Cache Agent version 1.55.2 + +* Thu Aug 19 2021 Meghna Srivastav - 1.55.1-1 +- Cache Agent version 1.55.1 + +* Thu Aug 05 2021 Heming Han - 1.55.0-1 +- Cache Agent version 1.55.0 + +* Mon Jul 26 2021 Utsa Bhattacharjya - 1.54.1-1 +- Cache Agent version 1.54.1 + +* Wed Jul 07 2021 Ray Allan - 1.54.0-1 +- Cache Agent version 1.54.0 + +* Wed Jun 23 2021 Mythri Garaga Manjunatha - 1.53.1-1 +- Cache Agent version 1.53.1 + +* Wed Jun 09 2021 Angel Velazquez - 1.53.0-1 +- Cache Agent version 1.53.0 + +* Tue May 25 2021 Feng Xiong - 1.52.2-2 +- Cache Agent version 1.52.2 +- ecs-anywhere-install: fix incorrect download url when running in cn region + +* Thu May 20 2021 Feng Xiong - 1.52.2-1 +- Cache Agent version 1.52.2 +- ecs-anywhere-install: remove dependency on gpg key server +- ecs-anywhere-install: allow sandboxed apt installations + +* Fri May 14 2021 Feng Xiong - 1.52.1-1 +- Cache Agent version 1.52.1 + +* Wed Apr 28 2021 Ray Allan - 1.52.0-1 +- Cache Agent version 1.52.0 +- Add support for ECS EXTERNAL launch type (ECS Anywhere) + +* Wed Mar 31 2021 Shubham Goyal - 1.51.0-1 +- Cache Agent version 1.51.0 + +* Wed Mar 17 2021 Mythri Garaga Manjunatha - 1.50.3-1 +- Cache Agent version 1.50.3 + +* Fri Feb 19 2021 Meghna Srivastav - 1.50.2-1 +- Cache Agent version 1.50.2 + +* Wed Feb 10 2021 Shubham Goyal - 1.50.1-1 +- Cache Agent version 1.50.1 +- Does not restart ECS Agent when it exits with exit code 5 + +* Fri Jan 22 2021 Utsa Bhattacharjya - 1.50.0-1 +- Cache Agent version 1.50.0 +- Allows ECS customers to execute interactive commands inside containers. + +* Wed Jan 06 2021 Shubham Goyal - 1.49.0-1 +- Cache Agent version 1.49.0 +- Removes iptable rule that drops packets to port 51678 unconditionally on ecs service stop + +* Mon Nov 23 2020 Shubham Goyal - 1.48.1-1 +- Cache Agent version 1.48.1 + +* Thu Nov 19 2020 Shubham Goyal - 1.48.0-2 +- Cache Agent version 1.48.0 + +* Fri Oct 30 2020 Mythri Garaga Manjunatha - 1.47.0-1 +- Cache Agent version 1.47.0 + +* Fri Oct 16 2020 Meghna Srivastav - 1.46.0-1 +- Cache Agent version 1.46.0 + +* Wed Sep 30 2020 Cam Sparr - 1.45.0-1 +- Cache Agent version 1.45.0 +- Block offhost access to agent's introspection port by default. Configurable via env ECS_ALLOW_OFFHOST_INTROSPECTION_ACCESS + +* Tue Sep 15 2020 Ray Allan - 1.44.4-1 +- Cache Agent version 1.44.4 + +* Wed Sep 02 2020 Meghna Srivastav - 1.44.3-1 +- Cache Agent version 1.44.3 + +* Wed Aug 26 2020 Utsa Bhattacharjya - 1.44.2-1 +- Cache Agent version 1.44.2 + +* Thu Aug 20 2020 Shubham Goyal - 1.44.1-1 +- Cache Agent version 1.44.1 + +* Thu Aug 13 2020 Shubham Goyal - 1.44.0-1 +- Cache Agent version 1.44.0 +- Add support for configuring Agent container logs + +* Tue Aug 04 2020 Feng Xiong - 1.43.0-2 +- Cache Agent version 1.43.0 + +* Thu Jul 23 2020 Yunhee Lee - 1.42.0-1 +- Cache Agent version 1.42.0 +- Add a flag ECS_SKIP_LOCALHOST_TRAFFIC_FILTER to allow skipping local traffic filtering + +* Thu Jul 09 2020 Feng Xiong - 1.41.1-2 +- Drop traffic to 127.0.0.1 that isn't originated from the host + +* Mon Jul 06 2020 Yajie Chu - 1.41.1-1 +- Cache Agent version 1.41.1 + +* Mon Jun 22 2020 Meghna Srivastav - 1.41.0-1 +- Cache Agent version 1.41.0 + +* Tue Jun 02 2020 Meghna Srivastav - 1.40.0-1 +- Cache Agent version 1.40.0 + +* Fri Apr 03 2020 Yunhee Lee - 1.39.0-2 +- Cache Agent version 1.39.0 +- Ignore IPv6 disable failure if already disabled + +* Thu Mar 19 2020 Sharanya Devaraj - 1.38.0-1 +- Cache Agent version 1.38.0 +- Adds support for ECS volume plugin +- Disable ipv6 router advertisements for optimization + +* Sat Feb 22 2020 Jessie Young - 1.37.0-2 +- Cache Agent version 1.37.0 +- Add '/etc/alternatives' to mounts + +* Tue Feb 04 2020 Ray Allan - 1.36.2-1 +- Cache Agent version 1.36.2 +- update sbin mount point to avoid conflict with Docker >= 19.03.5 + +* Fri Jan 10 2020 Yunhee Lee - 1.36.1-1 +- Cache Agent version 1.36.1 + +* Wed Jan 08 2020 Cameron Sparr - 1.36.0-1 +- Cache Agent version 1.36.0 +- capture a fixed tail of container logs when removing a container + +* Thu Dec 12 2019 Derek Petersen - 1.35.0-1 +- Cache Agent version 1.35.0 +- Fix bug where stopping agent gracefully would still restart ecs-init + +* Mon Nov 11 2019 Shubham Goyal - 1.33.0-1 +- Cache Agent version 1.33.0 +- Fix destination path in docker socket bind mount to match the one specified using DOCKER_HOST on Amazon Linux 2 + +* Mon Oct 28 2019 Shubham Goyal - 1.32.1-1 +- Cache Agent version 1.32.1 +- Add the ability to set Agent container's labels + +* Wed Sep 25 2019 Cameron Sparr - 1.32.0-1 +- Cache Agent version 1.32.0 + +* Fri Sep 13 2019 Yajie Chu - 1.31.0-1 +- Cache Agent version 1.31.0 + +* Thu Aug 15 2019 Feng Xiong - 1.30.0-1 +- Cache Agent version 1.30.0 + +* Mon Jul 08 2019 Shubham Goyal - 1.29.1-1 +- Cache Agent version 1.29.1 + +* Thu Jun 06 2019 Yumeng Xie - 1.29.0-1 +- Cache Agent version 1.29.0 + +* Fri May 31 2019 Feng Xiong - 1.28.1-2 +- Cache Agent version 1.28.1 +- Use exponential backoff when restarting agent + +* Thu May 09 2019 Feng Xiong - 1.28.0-1 +- Cache Agent version 1.28.0 + +* Thu Mar 28 2019 Shaobo Han - 1.27.0-1 +- Cache Agent version 1.27.0 + +* Thu Mar 21 2019 Derek Petersen - 1.26.1-1 +- Cache Agent version 1.26.1 + +* Thu Feb 28 2019 Derek Petersen - 1.26.0-1 +- Cache Agent version 1.26.0 +- Add support for running iptables within agent container + +* Fri Feb 15 2019 Ray Allan - 1.25.3-1 +- Cache Agent version 1.25.3 + +* Thu Jan 31 2019 Shaobo Han - 1.25.2-1 +- Cache Agent version 1.25.2 + +* Sat Jan 26 2019 Adnan Khan - 1.25.1-1 +- Cache Agent version 1.25.1 +- Update ecr models for private link support + +* Thu Jan 17 2019 Eric Sun - 1.25.0-1 +- Cache Agent version 1.25.0 +- Add Nvidia GPU support for p2 and p3 instances + +* Fri Jan 04 2019 Eric Sun - 1.24.0-1 +- Cache Agent version 1.24.0 + +* Fri Nov 16 2018 Jacob Vallejo - 1.22.0-4 +- Cache ECS agent version 1.22.0 for x86_64 & ARM +- Support ARM architecture builds + +* Thu Nov 15 2018 Jacob Vallejo - 1.22.0-3 +- Rebuild + +* Fri Nov 02 2018 Yunhee Lee - 1.22.0-2 +- Cache Agent version 1.22.0 + +* Thu Oct 11 2018 Sharanya Devaraj - 1.21.0-1 +- Cache Agent version 1.21.0 +- Support configurable logconfig for Agent container to reduce disk usage +- ECS Agent will use the host's cert store on the Amazon Linux platform + +* Fri Sep 14 2018 Yumeng Xie - 1.20.3-1 +- Cache Agent version 1.20.3 + +* Fri Aug 31 2018 Feng Xiong - 1.20.2-1 +- Cache Agent version 1.20.2 + +* Thu Aug 09 2018 Peng Yin - 1.20.1-1 +- Cache Agent version 1.20.1 + +* Wed Aug 01 2018 Haikuo Liu - 1.20.0-1 +- Cache Agent version 1.20.0 + +* Thu Jul 26 2018 Haikuo Liu - 1.19.1-1 +- Cache Agent version 1.19.1 + +* Thu Jul 19 2018 Feng Xiong - 1.19.0-1 +- Cache Agent version 1.19.0 + +* Wed May 23 2018 iliana weller - 1.18.0-2 +- Spec file cleanups +- Enable builds for both AL1 and AL2 + +* Fri May 04 2018 Haikuo Liu - 1.18.0-1 +- Cache Agent version 1.18.0 +- Add support for regional buckets +- Bundle ECS Agent tarball in package +- Download agent based on the partition +- Mount Docker plugin files dir + +* Fri Mar 30 2018 Justin Haynes - 1.17.3-1 +- Cache Agent version 1.17.3 +- Use s3client instead of httpclient when downloading + +* Mon Mar 05 2018 Jacob Vallejo - 1.17.2-1 +- Cache Agent version 1.17.2 + +* Mon Feb 19 2018 Justin Haynes - 1.17.1-1 +- Cache Agent version 1.17.1 + +* Mon Feb 05 2018 Justin Haynes - 1.17.0-2 +- Cache Agent version 1.17.0 + +* Tue Jan 16 2018 Derek Petersen - 1.16.2-1 +- Cache Agent version 1.16.2 +- Add GovCloud endpoint + +* Wed Jan 03 2018 Noah Meyerhans - 1.16.1-1 +- Cache Agent version 1.16.1 +- Improve startup behavior when Docker socket doesn't exist yet + +* Tue Nov 21 2017 Noah Meyerhans - 1.16.0-1 +- Cache Agent version 1.16.0 + +* Wed Nov 15 2017 Noah Meyerhans - 1.15.2-1 +- Cache Agent version 1.15.2 + +* Tue Oct 17 2017 Jacob Vallejo - 1.15.1-1 +- Update ECS Agent version + +* Sat Oct 07 2017 Justin Haynes - 1.15.0-1 +- Update ECS Agent version + +* Sat Sep 30 2017 Justin Haynes - 1.14.5-1 +- Update ECS Agent version + +* Tue Aug 22 2017 Justin Haynes - 1.14.4-1 +- Update ECS Agent version + +* Thu Jun 01 2017 Adnan Khan - 1.14.2-2 +- Cache Agent version 1.14.2 +- Add functionality for running agent with userns=host when Docker has userns-remap enabled +- Add support for Docker 17.03.1ce + +* Mon Mar 06 2017 Adnan Khan - 1.14.1-1 +- Cache Agent version 1.14.1 + +* Wed Jan 25 2017 Anirudh Aithal - 1.14.0-2 +- Add retry-backoff for pinging the Docker socket when creating the Docker client + +* Mon Jan 16 2017 Derek Petersen - 1.14.0-1 +- Cache Agent version 1.14.0 + +* Fri Jan 06 2017 Noah Meyerhans - 1.13.1-2 +- Update Requires to indicate support for docker <= 1.12.6 + +* Mon Nov 14 2016 Peng Yin - 1.13.1-1 +- Cache Agent version 1.13.1 + +* Tue Sep 27 2016 Noah Meyerhans - 1.13.0-1 +- Cache Agent version 1.13.0 + +* Tue Sep 13 2016 Anirudh Aithal - 1.12.2-1 +- Cache Agent version 1.12.2 + +* Wed Aug 17 2016 Peng Yin - 1.12.1-1 +- Cache Agent version 1.12.1 + +* Wed Aug 10 2016 Anirudh Aithal - 1.12.0-1 +- Cache Agent version 1.12.0 +- Add netfilter rules to support host network reaching credentials proxy + +* Wed Aug 03 2016 Samuel Karp - 1.11.1-1 +- Cache Agent version 1.11.1 + +* Tue Jul 05 2016 Samuel Karp - 1.11.0-1 +- Cache Agent version 1.11.0 +- Add support for Docker 1.11.2 +- Modify iptables and netfilter to support credentials proxy +- Eliminate requirement that /tmp and /var/cache be on the same filesystem +- Start agent with host network mode + +* Mon May 23 2016 Peng Yin - 1.10.0-1 +- Cache Agent version 1.10.0 +- Add support for Docker 1.11.1 + +* Tue Apr 26 2016 Peng Yin - 1.9.0-1 +- Cache Agent version 1.9.0 +- Make awslogs driver available by default + +* Thu Mar 24 2016 Juan Rhenals - 1.8.2-1 +- Cache Agent version 1.8.2 + +* Mon Feb 29 2016 Juan Rhenals - 1.8.1-1 +- Cache Agent version 1.8.1 + +* Wed Feb 10 2016 Juan Rhenals - 1.8.0-1 +- Cache Agent version 1.8.0 + +* Fri Jan 08 2016 Samuel Karp - 1.7.1-1 +- Cache Agent version 1.7.1 + +* Tue Dec 08 2015 Samuel Karp - 1.7.0-1 +- Cache Agent version 1.7.0 +- Add support for Docker 1.9.1 + +* Wed Oct 21 2015 Samuel Karp - 1.6.0-1 +- Cache Agent version 1.6.0 +- Updated source dependencies + +* Wed Sep 23 2015 Samuel Karp - 1.5.0-1 +- Cache Agent version 1.5.0 +- Improved merge strategy for user-supplied environment variables +- Add default supported logging drivers + +* Wed Aug 26 2015 Samuel Karp - 1.4.0-2 +- Add support for Docker 1.7.1 + +* Tue Aug 11 2015 Samuel Karp - 1.4.0-1 +- Cache Agent version 1.4.0 + +* Thu Jul 30 2015 Samuel Karp - 1.3.1-1 +- Cache Agent version 1.3.1 +- Read Docker endpoint from environment variable DOCKER_HOST if present + +* Thu Jul 02 2015 Samuel Karp - 1.3.0-1 +- Cache Agent version 1.3.0 + +* Fri Jun 19 2015 Euan Kemp - 1.2.1-2 +- Cache Agent version 1.2.1 + +* Tue Jun 02 2015 Samuel Karp - 1.2.0-1 +- Update versioning scheme to match Agent version +- Cache Agent version 1.2.0 +- Mount cgroup and execdriver directories for Telemetry feature + +* Mon Jun 01 2015 Samuel Karp - 1.0-5 +- Add support for Docker 1.6.2 + +* Mon May 11 2015 Samuel Karp - 1.0-4 +- Properly restart if the ecs-init package is upgraded in isolation + +* Wed May 06 2015 Samuel Karp - 1.0-3 +- Restart on upgrade if already running + +* Tue May 05 2015 Samuel Karp - 1.0-2 +- Cache Agent version 1.1.0 +- Add support for Docker 1.6.0 +- Force cache load on install/upgrade +- Add man page + +* Thu Mar 26 2015 Samuel Karp - 1.0-1 +- Re-start Agent on non-terminal exit codes +- Enable Agent self-updates +- Cache Agent version 1.0.0 +- Added rollback to cached Agent version for failed updates + +* Mon Mar 16 2015 Samuel Karp - 0.3-0 +- Migrate to statically-compiled Go binary + +* Tue Feb 17 2015 Eric Nordlund - 0.2-3 +- Test for existing container agent and force remove it + +* Thu Jan 15 2015 Samuel Karp - 0.2-2 +- Mount data directory for state persistence +- Enable JSON-based configuration + +* Mon Dec 15 2014 Samuel Karp - 0.2-1 +- Naive update functionality + diff --git a/packaging/amazon-linux-ami-integrated/ecs.conf b/packaging/amazon-linux-ami-integrated/ecs.conf new file mode 100755 index 00000000000..b8961951a02 --- /dev/null +++ b/packaging/amazon-linux-ami-integrated/ecs.conf @@ -0,0 +1,22 @@ +# Copyright 2014-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the +# "License"). You may not use this file except in compliance +# with the License. A copy of the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and +# limitations under the License. + +description "Amazon Elastic Container Service init" +author "Amazon Web Services" +start on stopped rc RUNLEVEL=[345] + +pre-start exec /usr/libexec/amazon-ecs-init pre-start +exec /usr/libexec/amazon-ecs-init start +pre-stop exec /usr/libexec/amazon-ecs-init pre-stop +post-stop exec /usr/libexec/amazon-ecs-init post-stop diff --git a/packaging/amazon-linux-ami-integrated/ecs.service b/packaging/amazon-linux-ami-integrated/ecs.service new file mode 100644 index 00000000000..c5aa3c3b7dc --- /dev/null +++ b/packaging/amazon-linux-ami-integrated/ecs.service @@ -0,0 +1,34 @@ +# Copyright 2014-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the +# "License"). You may not use this file except in compliance +# with the License. A copy of the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and +# limitations under the License. + +[Unit] +Description=Amazon Elastic Container Service - container agent +Documentation=https://aws.amazon.com/documentation/ecs/ +Requires=docker.service +After=docker.service +After=cloud-final.service + +[Service] +Type=simple +Restart=on-failure +RestartPreventExitStatus=5 +RestartSec=10s +EnvironmentFile=-/etc/ecs/ecs.config +ExecStartPre=/usr/libexec/amazon-ecs-init pre-start +ExecStart=/usr/libexec/amazon-ecs-init start +ExecStop=/usr/libexec/amazon-ecs-init stop +ExecStopPost=/usr/libexec/amazon-ecs-init post-stop + +[Install] +WantedBy=multi-user.target diff --git a/packaging/generic-deb-integrated/debian/README.source b/packaging/generic-deb-integrated/debian/README.source new file mode 100644 index 00000000000..b2473adde25 --- /dev/null +++ b/packaging/generic-deb-integrated/debian/README.source @@ -0,0 +1,23 @@ +Steps to build and install package: + +1. Install build dependencies + sudo apt-get update -y && sudo apt-get install -y devscripts build-essential lintian git curl golang-go debhelper + +2. Build the package by running + make clean deb + +3. Install docker + sudo apt-get install docker.io -y # or via docker repos: https://docs.docker.com/engine/install/ + +4. Install Amazon EFS Utils + Install Amazon EFS Utils either from your distribution's repositories, or manually as described in + https://docs.aws.amazon.com/efs/latest/ug/installing-amazon-efs-utils.html#installing-other-distro + +5. Install the package with + sudo apt install -y ./amazon-ecs-init_1.45.0-1_amd64.deb + +6. Install docker and start and enable ecs service + sudo systemctl enable --now ecs + +7. Start and enable amazon-ecs-volume-plugin + sudo systemctl enable --now amazon-ecs-volume-plugin diff --git a/packaging/generic-deb-integrated/debian/amazon-ecs-init.install b/packaging/generic-deb-integrated/debian/amazon-ecs-init.install new file mode 100644 index 00000000000..76dcc19f7a1 --- /dev/null +++ b/packaging/generic-deb-integrated/debian/amazon-ecs-init.install @@ -0,0 +1,2 @@ +amazon-ecs-init usr/libexec/ +amazon-ecs-volume-plugin usr/libexec/ diff --git a/packaging/generic-deb-integrated/debian/amazon-ecs-init.manpages b/packaging/generic-deb-integrated/debian/amazon-ecs-init.manpages new file mode 100644 index 00000000000..5986828716d --- /dev/null +++ b/packaging/generic-deb-integrated/debian/amazon-ecs-init.manpages @@ -0,0 +1 @@ +scripts/amazon-ecs-init.1 diff --git a/packaging/generic-deb-integrated/debian/amazon-ecs-volume-plugin.service b/packaging/generic-deb-integrated/debian/amazon-ecs-volume-plugin.service new file mode 100644 index 00000000000..abce249d262 --- /dev/null +++ b/packaging/generic-deb-integrated/debian/amazon-ecs-volume-plugin.service @@ -0,0 +1,27 @@ +# Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the +# "License"). You may not use this file except in compliance +# with the License. A copy of the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and +# limitations under the License + +[Unit] +Description=Amazon Elastic Container Service Volume Plugin +After=network.target amazon-ecs-volume-plugin.socket +Requires=amazon-ecs-volume-plugin.socket + +[Service] +Type=simple +Restart=on-failure +RestartSec=10s +ExecStart=/usr/libexec/amazon-ecs-volume-plugin + +[Install] +WantedBy=multi-user.target diff --git a/packaging/generic-deb-integrated/debian/amazon-ecs-volume-plugin.socket b/packaging/generic-deb-integrated/debian/amazon-ecs-volume-plugin.socket new file mode 100644 index 00000000000..4b0d76a6dfc --- /dev/null +++ b/packaging/generic-deb-integrated/debian/amazon-ecs-volume-plugin.socket @@ -0,0 +1,23 @@ +# Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the +# "License"). You may not use this file except in compliance +# with the License. A copy of the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and +# limitations under the License + +[Unit] +Description=Amazon Elastic Container Service Volume Plugin +PartOf=amazon-ecs-volume-plugin.service + +[Socket] +ListenStream=/var/run/docker/plugins/amazon-ecs-volume-plugin.sock + +[Install] +WantedBy=sockets.target diff --git a/packaging/generic-deb-integrated/debian/changelog b/packaging/generic-deb-integrated/debian/changelog new file mode 100644 index 00000000000..e1d3332b22e --- /dev/null +++ b/packaging/generic-deb-integrated/debian/changelog @@ -0,0 +1,820 @@ +amazon-ecs-init (1.60.0-1) stable; urgency=medium + + * Cache Agent version 1.60.0 + * Add volume plugin to rpm/deb package + + -- Chien Han Lin Wed, 02 Mar 2022 19:00:00 +0000 + +amazon-ecs-init (1.59.0-1) stable; urgency=medium + + * Cache Agent version 1.59.0 + * Log what pre-start is doing + + -- Yash Kulshrestha Fri, 04 Feb 2022 19:00:00 +0000 + +amazon-ecs-init (1.58.0-2) stable; urgency=medium + + * Cache Agent version 1.58.0 + * Add exec prerequisites to ecs-anywhere installation script + + -- Utsa Bhattacharjya Fri, 14 Jan 2022 18:00:00 +0000 + +amazon-ecs-init (1.57.1-1) stable; urgency=medium + + * Cache Agent version 1.57.1 + * Enable AL2 support for ECS-A + * Initialize docker client lazily + + -- Mythri Garaga Mannjunatha Fri, 03 Dec 2021 18:00:00 +0000 + +amazon-ecs-init (1.57.0-1) stable; urgency=medium + + * Cache Agent version 1.57.0 + + -- Feng Xiong Wed, 03 Nov 2021 18:00:00 +0000 + +amazon-ecs-init (1.56.0-1) stable; urgency=medium + + * Cache Agent version 1.56.0 + + -- Cameron Sparr Thu, 21 Oct 2021 18:00:00 +0000 + +amazon-ecs-init (1.55.5-1) stable; urgency=medium + + * Cache Agent version 1.55.5 + + -- Utsa Bhattacharjya Wed, 13 Oct 2021 18:00:00 +0000 + +amazon-ecs-init (1.55.4-1) stable; urgency=medium + + * Cache Agent version 1.55.4 + * GPU updates for ECS Anywhere + * Introduce new configuration variable ECS_OFFHOST_INTROSPECTION_NAME to specify the primary network interface name to block offhost agent introspection port access. + + -- Ray Allan Thu, 30 Sep 2021 12:00:00 +0000 + +amazon-ecs-init (1.55.3-1) stable; urgency=medium + + * Cache Agent version 1.55.3 + + -- Mythri Garaga Manjunatha Thu, 16 Sep 2021 20:10:00 +0000 + +amazon-ecs-init (1.55.2-1) stable; urgency=medium + + * Cache Agent version 1.55.2 + + -- Yinyi Chen Thu, 02 Sep 2021 22:10:00 +0000 + +amazon-ecs-init (1.55.1-1) stable; urgency=medium + + * Cache Agent version 1.55.1 + + -- Meghna Srivastav Thu, 19 Aug 2021 19:03:32 +0000 + +amazon-ecs-init (1.55.0-1) stable; urgency=medium + + * Cache Agent version 1.55.0 + + -- Heming Han Thu, 05 Aug 2021 18:30:00 +0000 + +amazon-ecs-init (1.54.1-1) stable; urgency=medium + + * Cache Agent version 1.54.1 + + -- Utsa Bhattacharjya Mon, 26 Jul 2021 16:35:00 +0000 + +amazon-ecs-init (1.54.0-1) stable; urgency=medium + + * Cache Agent version 1.54.0 + + -- Ray Allan Wed, 07 Jul 2021 17:30:00 +0000 + +amazon-ecs-init (1.53.1-1) stable; urgency=medium + + * Cache Agent version 1.53.1 + + -- Mythri Garaga Manjunatha Wed, 23 Jun 2021 17:30:00 +0000 + +amazon-ecs-init (1.53.0-1) stable; urgency=medium + + * Cache Agent version 1.53.0 + + -- Angel Velazquez Wed, 09 Jun 2021 22:30:00 +0000 + +amazon-ecs-init (1.52.2-2) stable; urgency=medium + + * Cache Agent version 1.52.2 + * ecs-anywhere-install: fix incorrect download url when running in cn region + + -- Feng Xiong Tue, 25 May 2021 19:30:00 +0000 + +amazon-ecs-init (1.52.2-1) stable; urgency=medium + + * Cache Agent version 1.52.2 + * ecs-anywhere-install: remove dependency on gpg key server + * ecs-anywhere-install: allow sandboxed apt installations + + -- Feng Xiong Thu, 20 May 2021 01:00:00 +0000 + +amazon-ecs-init (1.52.1-1) stable; urgency=medium + + * Cache Agent version 1.52.1 + + -- Feng Xiong Fri, 14 May 2021 18:40:00 +0000 + +amazon-ecs-init (1.52.0-1) stable; urgency=medium + + * Cache Agent version 1.52.0 + * Add support for ECS EXTERNAL launch type (ECS Anywhere) + + -- Ray Allan Wed, 28 Apr 2021 20:05:00 +0000 + +amazon-ecs-init (1.51.0-1) stable; urgency=medium + + * Cache Agent version 1.51.0 + + -- Shubham Goyal Wed, 31 Mar 2021 09:32:00 +0000 + +amazon-ecs-init (1.50.3-1) stable; urgency=medium + + * Cache Agent version 1.50.3 + + -- Mythri Garaga Manjunatha Wed, 17 Mar 2021 18:02:00 +0000 + +amazon-ecs-init (1.50.2-1) stable; urgency=medium + + * Cache Agent version 1.50.2 + + -- Meghna Srivastav Fri, 19 Feb 2021 19:03:32 +0000 + +amazon-ecs-init (1.50.1-1) stable; urgency=medium + + * Cache Agent version 1.50.1 + * Does not restart ECS Agent when it exits with exit code 5 + + -- Shubham Goyal Wed, 10 Feb 2021 20:43:00 +0000 + +amazon-ecs-init (1.50.0-1) stable; urgency=medium + + * Cache Agent version 1.50.0 + * Allows ECS customers to execute interactive commands inside containers. + + -- Utsa Bhattacharjya Fri, 22 Jan 2021 11:54:00 +0000 + +amazon-ecs-init (1.49.0-1) stable; urgency=medium + + * Cache Agent version 1.49.0 + * Removes iptable rule that drops packets to port 51678 unconditionally on ecs service stop + + -- Shubham Goyal Wed, 06 Jan 2021 11:54:00 +0000 + +amazon-ecs-init (1.48.1-1) stable; urgency=medium + + * Cache Agent version 1.48.1 + + -- Shubham Goyal Mon, 23 Nov 2020 11:54:00 +0000 + +amazon-ecs-init (1.48.0-2) stable; urgency=medium + + * Cache Agent version 1.48.0 + + -- Shubham Goyal Thu, 19 Nov 2020 20:19:00 +0000 + +amazon-ecs-init (1.47.0-1) stable; urgency=medium + + * Cache Agent version 1.47.0 + + -- Mythri Garaga Manjunatha Fri, 30 Oct 2020 19:00:00 +0000 + +amazon-ecs-init (1.46.0-1) stable; urgency=medium + + * Cache Agent version 1.46.0 + + -- Meghna Srivastav Fri, 16 Oct 2020 19:03:32 +0000 + +amazon-ecs-init (1.45.0-1) stable; urgency=medium + + * Cache Agent version 1.45.0 + * Block offhost access to agent's introspection port by default. Configurable via env ECS_ALLOW_OFFHOST_INTROSPECTION_ACCESS + + -- Cam Sparr Wed, 30 Sep 2020 19:00:00 +0000 + +amazon-ecs-init (1.44.4-1) stable; urgency=medium + + * Cache Agent version 1.44.4 + + -- Ray Allan Tue, 15 Sep 2020 19:34:32 +0000 + +amazon-ecs-init (1.44.3-1) stable; urgency=medium + + * Cache Agent version 1.44.3 + + -- Meghna Srivastav Wed, 02 Sep 2020 19:03:32 +0000 + +amazon-ecs-init (1.44.2-1) stable; urgency=medium + + * Cache Agent version 1.44.2 + + -- Utsa Bhattacharjya Wed, 26 Aug 2020 19:03:32 +0000 + +amazon-ecs-init (1.44.1-1) stable; urgency=medium + + * Cache Agent version 1.44.1 + + -- Shubham Goyal Thu, 20 Aug 2020 18:35:32 +0000 + +amazon-ecs-init (1.44.0-1) stable; urgency=medium + + * Cache Agent version 1.44.0 + * Add support for configuring Agent container logs + + -- Shubham Goyal Thu, 13 Aug 2020 20:39:32 +0000 + +amazon-ecs-init (1.43.0-2) stable; urgency=medium + + * Cache Agent version 1.43.0 + + -- Feng Xiong Tue, 04 Aug 2020 17:22:32 +0000 + +amazon-ecs-init (1.42.0-1) stable; urgency=medium + + * Cache Agent version 1.42.0 + * Add a flag ECS_SKIP_LOCALHOST_TRAFFIC_FILTER to allow skipping local traffic filtering + + -- Yunhee Lee Thu, 23 Jul 2020 17:55:00 +0000 + +amazon-ecs-init (1.41.1-2) stable; urgency=medium + + * Drop traffic to 127.0.0.1 that isn't originated from the host + + -- Feng Xiong Thu, 09 Jul 2020 00:46:00 +0000 + +amazon-ecs-init (1.41.1-1) stable; urgency=medium + + * Cache Agent version 1.41.1 + + -- Yajie Chu Mon, 06 Jul 2020 23:45:00 +0000 + +amazon-ecs-init (1.41.0-1) stable; urgency=medium + + * Cache Agent version 1.41.0 + + -- Meghna Srivastav Mon, 22 Jun 2020 23:45:00 +0000 + +amazon-ecs-init (1.40.0-1) stable; urgency=medium + + * Cache Agent version 1.40.0 + + -- Meghna Srivastav Tue, 02 Jun 2020 23:45:00 +0000 + +amazon-ecs-init (1.39.0-2) stable; urgency=medium + + * Cache Agent version 1.39.0 + * Ignore IPv6 disable failure if already disabled + + -- Yunhee Lee Fri, 03 Apr 2020 19:04:00 +0000 + +amazon-ecs-init (1.38.0-1) stable; urgency=medium + + * Cache Agent version 1.38.0 + * Adds support for ECS volume plugin + * Disable ipv6 router advertisements for optimization + + -- Sharanya Devaraj Thu, 19 Mar 2020 21:42:00 +0000 + +amazon-ecs-init (1.37.0-2) stable; urgency=medium + + * Cache Agent version 1.37.0 + * Add '/etc/alternatives' to mounts + + -- Jessie Young Sat, 22 Feb 2020 01:40:00 +0000 + +amazon-ecs-init (1.36.2-1) stable; urgency=medium + + * Cache Agent version 1.36.2 + * update sbin mount point to avoid conflict with Docker >= 19.03.5 + + -- Ray Allan Tue, 04 Feb 2020 22:32:00 +0000 + +amazon-ecs-init (1.36.1-1) stable; urgency=medium + + * Cache Agent version 1.36.1 + + -- Yunhee Lee Fri, 10 Jan 2020 19:00:00 +0000 + +amazon-ecs-init (1.36.0-1) stable; urgency=medium + + * Cache Agent version 1.36.0 + * capture a fixed tail of container logs when removing a container + + -- Cameron Sparr Wed, 08 Jan 2020 19:00:00 +0000 + +amazon-ecs-init (1.35.0-1) stable; urgency=medium + + * Cache Agent version 1.35.0 + * Fix bug where stopping agent gracefully would still restart ecs-init + + -- Derek Petersen Thu, 12 Dec 2019 17:00:00 +0000 + +amazon-ecs-init (1.33.0-1) stable; urgency=medium + + * Cache Agent version 1.33.0 + * Fix destination path in docker socket bind mount to match the one specified using DOCKER_HOST on Amazon Linux 2 + + -- Shubham Goyal Mon, 11 Nov 2019 17:00:00 +0000 + +amazon-ecs-init (1.32.1-1) stable; urgency=medium + + * Cache Agent version 1.32.1 + * Add the ability to set Agent container's labels + + -- Shubham Goyal Mon, 28 Oct 2019 17:00:00 +0000 + +amazon-ecs-init (1.32.0-1) stable; urgency=medium + + * Cache Agent version 1.32.0 + + -- Cameron Sparr Wed, 25 Sep 2019 18:00:00 +0000 + +amazon-ecs-init (1.31.0-1) stable; urgency=medium + + * Cache Agent version 1.31.0 + + -- Yajie Chu Fri, 13 Sep 2019 18:00:00 +0000 + +amazon-ecs-init (1.30.0-1) stable; urgency=medium + + * Cache Agent version 1.30.0 + + -- Feng Xiong Thu, 15 Aug 2019 18:00:00 +0000 + +amazon-ecs-init (1.29.1-1) stable; urgency=medium + + * Cache Agent version 1.29.1 + + -- Shubham Goyal Mon, 08 Jul 2019 19:06:00 +0000 + +amazon-ecs-init (1.29.0-1) stable; urgency=medium + + * Cache Agent version 1.29.0 + + -- Yumeng Xie Thu, 06 Jun 2019 22:47:00 +0000 + +amazon-ecs-init (1.28.1-2) stable; urgency=medium + + * Cache Agent version 1.28.1 + * Use exponential backoff when restarting agent + + -- Feng Xiong Fri, 31 May 2019 18:00:00 +0000 + +amazon-ecs-init (1.28.0-1) stable; urgency=medium + + * Cache Agent version 1.28.0 + + -- Feng Xiong Thu, 09 May 2019 18:00:00 +0000 + +amazon-ecs-init (1.27.0-1) stable; urgency=medium + + * Cache Agent version 1.27.0 + + -- Shaobo Han Thu, 28 Mar 2019 22:00:00 +0000 + +amazon-ecs-init (1.26.1-1) stable; urgency=medium + + * Cache Agent version 1.26.1 + + -- Derek Petersen Thu, 21 Mar 2019 21:30:00 +0000 + +amazon-ecs-init (1.26.0-1) stable; urgency=medium + + * Cache Agent version 1.26.0 + * Add support for running iptables within agent container + + -- Derek Petersen Thu, 28 Feb 2019 21:30:00 +0000 + +amazon-ecs-init (1.25.3-1) stable; urgency=medium + + * Cache Agent version 1.25.3 + + -- Ray Allan Fri, 15 Feb 2019 19:30:00 +0000 + +amazon-ecs-init (1.25.2-1) stable; urgency=medium + + * Cache Agent version 1.25.2 + + -- Shaobo Han Thu, 31 Jan 2019 19:53:00 +0000 + +amazon-ecs-init (1.25.1-1) stable; urgency=medium + + * Cache Agent version 1.25.1 + * Update ecr models for private link support + + -- Adnan Khan Sat, 26 Jan 2019 04:39:00 +0000 + +amazon-ecs-init (1.25.0-1) stable; urgency=medium + + * Cache Agent version 1.25.0 + * Add Nvidia GPU support for p2 and p3 instances + + -- Eric Sun Thu, 17 Jan 2019 18:32:18 +0000 + +amazon-ecs-init (1.24.0-1) stable; urgency=medium + + * Cache Agent version 1.24.0 + + -- Eric Sun Fri, 04 Jan 2019 18:16:18 +0000 + +amazon-ecs-init (1.22.0-4) stable; urgency=medium + + * Cache ECS agent version 1.22.0 for x86_64 & ARM + * Support ARM architecture builds + + -- Jacob Vallejo Fri, 16 Nov 2018 19:00:00 +0000 + +amazon-ecs-init (1.22.0-3) stable; urgency=medium + + * Rebuild + + -- Jacob Vallejo Thu, 15 Nov 2018 19:00:00 +0000 + +amazon-ecs-init (1.22.0-2) stable; urgency=medium + + * Cache Agent version 1.22.0 + + -- Yunhee Lee Fri, 02 Nov 2018 17:51:28 +0000 + +amazon-ecs-init (1.21.0-1) stable; urgency=medium + + * Cache Agent version 1.21.0 + * Support configurable logconfig for Agent container to reduce disk usage + * ECS Agent will use the host's cert store on the Amazon Linux platform + + -- Sharanya Devaraj Thu, 11 Oct 2018 18:49:28 +0000 + +amazon-ecs-init (1.20.3-1) stable; urgency=medium + + * Cache Agent version 1.20.3 + + -- Yumeng Xie Fri, 14 Sep 2018 00:38:10 +0000 + +amazon-ecs-init (1.20.2-1) stable; urgency=medium + + * Cache Agent version 1.20.2 + + -- Feng Xiong Fri, 31 Aug 2018 00:43:01 +0000 + +amazon-ecs-init (1.20.1-1) stable; urgency=medium + + * Cache Agent version 1.20.1 + + -- Peng Yin Thu, 09 Aug 2018 00:04:01 +0000 + +amazon-ecs-init (1.20.0-1) stable; urgency=medium + + * Cache Agent version 1.20.0 + + -- Haikuo Liu Wed, 01 Aug 2018 23:44:01 +0000 + +amazon-ecs-init (1.19.1-1) stable; urgency=medium + + * Cache Agent version 1.19.1 + + -- Haikuo Liu Thu, 26 Jul 2018 21:31:24 +0000 + +amazon-ecs-init (1.19.0-1) stable; urgency=medium + + * Cache Agent version 1.19.0 + + -- Feng Xiong Thu, 19 Jul 2018 23:09:41 +0000 + +amazon-ecs-init (1.18.0-2) stable; urgency=medium + + * Spec file cleanups + * Enable builds for both AL1 and AL2 + + -- iliana weller Wed, 23 May 2018 19:00:00 +0000 + +amazon-ecs-init (1.18.0-1) stable; urgency=medium + + * Cache Agent version 1.18.0 + * Add support for regional buckets + * Bundle ECS Agent tarball in package + * Download agent based on the partition + * Mount Docker plugin files dir + + -- Haikuo Liu Fri, 04 May 2018 21:30:22 +0000 + +amazon-ecs-init (1.17.3-1) stable; urgency=medium + + * Cache Agent version 1.17.3 + * Use s3client instead of httpclient when downloading + + -- Justin Haynes Fri, 30 Mar 2018 20:20:41 +0000 + +amazon-ecs-init (1.17.2-1) stable; urgency=medium + + * Cache Agent version 1.17.2 + + -- Jacob Vallejo Mon, 05 Mar 2018 18:31:19 +0000 + +amazon-ecs-init (1.17.1-1) stable; urgency=medium + + * Cache Agent version 1.17.1 + + -- Justin Haynes Mon, 19 Feb 2018 18:57:33 +0000 + +amazon-ecs-init (1.17.0-2) stable; urgency=medium + + * Cache Agent version 1.17.0 + + -- Justin Haynes Mon, 05 Feb 2018 18:03:33 +0000 + +amazon-ecs-init (1.16.2-1) stable; urgency=medium + + * Cache Agent version 1.16.2 + * Add GovCloud endpoint + + -- Derek Petersen Tue, 16 Jan 2018 18:12:56 +0000 + +amazon-ecs-init (1.16.1-1) stable; urgency=medium + + * Cache Agent version 1.16.1 + * Improve startup behavior when Docker socket doesn't exist yet + + -- Noah Meyerhans Wed, 03 Jan 2018 22:52:56 +0000 + +amazon-ecs-init (1.16.0-1) stable; urgency=medium + + * Cache Agent version 1.16.0 + + -- Noah Meyerhans Tue, 21 Nov 2017 21:03:59 +0000 + +amazon-ecs-init (1.15.2-1) stable; urgency=medium + + * Cache Agent version 1.15.2 + + -- Noah Meyerhans Wed, 15 Nov 2017 00:53:54 +0000 + +amazon-ecs-init (1.15.1-1) stable; urgency=medium + + * Update ECS Agent version + + -- Jacob Vallejo Tue, 17 Oct 2017 15:55:19 +0000 + +amazon-ecs-init (1.15.0-1) stable; urgency=medium + + * Update ECS Agent version + + -- Justin Haynes Sat, 07 Oct 2017 07:50:23 +0000 + +amazon-ecs-init (1.14.5-1) stable; urgency=medium + + * Update ECS Agent version + + -- Justin Haynes Sat, 30 Sep 2017 01:36:34 +0000 + +amazon-ecs-init (1.14.4-1) stable; urgency=medium + + * Update ECS Agent version + + -- Justin Haynes Tue, 22 Aug 2017 23:44:03 +0000 + +amazon-ecs-init (1.14.2-2) stable; urgency=medium + + * Cache Agent version 1.14.2 + * Add functionality for running agent with userns=host when Docker has userns-remap enabled + * Add support for Docker 17.03.1ce + + -- Adnan Khan Thu, 01 Jun 2017 19:00:00 +0000 + +amazon-ecs-init (1.14.1-1) stable; urgency=medium + + * Cache Agent version 1.14.1 + + -- Adnan Khan Mon, 06 Mar 2017 19:00:00 +0000 + +amazon-ecs-init (1.14.0-2) stable; urgency=medium + + * Add retry-backoff for pinging the Docker socket when creating the Docker client + + -- Anirudh Aithal Wed, 25 Jan 2017 19:00:00 +0000 + +amazon-ecs-init (1.14.0-1) stable; urgency=medium + + * Cache Agent version 1.14.0 + + -- Derek Petersen Mon, 16 Jan 2017 19:00:00 +0000 + +amazon-ecs-init (1.13.1-2) stable; urgency=medium + + * Update Requires to indicate support for docker <= 1.12.6 + + -- Noah Meyerhans Fri, 06 Jan 2017 19:00:00 +0000 + +amazon-ecs-init (1.13.1-1) stable; urgency=medium + + * Cache Agent version 1.13.1 + + -- Peng Yin Mon, 14 Nov 2016 19:00:00 +0000 + +amazon-ecs-init (1.13.0-1) stable; urgency=medium + + * Cache Agent version 1.13.0 + + -- Noah Meyerhans Tue, 27 Sep 2016 19:00:00 +0000 + +amazon-ecs-init (1.12.2-1) stable; urgency=medium + + * Cache Agent version 1.12.2 + + -- Anirudh Aithal Tue, 13 Sep 2016 19:00:00 +0000 + +amazon-ecs-init (1.12.1-1) stable; urgency=medium + + * Cache Agent version 1.12.1 + + -- Peng Yin Wed, 17 Aug 2016 19:00:00 +0000 + +amazon-ecs-init (1.12.0-1) stable; urgency=medium + + * Cache Agent version 1.12.0 + * Add netfilter rules to support host network reaching credentials proxy + + -- Anirudh Aithal Wed, 10 Aug 2016 19:00:00 +0000 + +amazon-ecs-init (1.11.1-1) stable; urgency=medium + + * Cache Agent version 1.11.1 + + -- Samuel Karp Wed, 03 Aug 2016 19:00:00 +0000 + +amazon-ecs-init (1.11.0-1) stable; urgency=medium + + * Cache Agent version 1.11.0 + * Add support for Docker 1.11.2 + * Modify iptables and netfilter to support credentials proxy + * Eliminate requirement that /tmp and /var/cache be on the same filesystem + * Start agent with host network mode + + -- Samuel Karp Tue, 05 Jul 2016 19:00:00 +0000 + +amazon-ecs-init (1.10.0-1) stable; urgency=medium + + * Cache Agent version 1.10.0 + * Add support for Docker 1.11.1 + + -- Peng Yin Mon, 23 May 2016 19:00:00 +0000 + +amazon-ecs-init (1.9.0-1) stable; urgency=medium + + * Cache Agent version 1.9.0 + * Make awslogs driver available by default + + -- Peng Yin Tue, 26 Apr 2016 19:00:00 +0000 + +amazon-ecs-init (1.8.2-1) stable; urgency=medium + + * Cache Agent version 1.8.2 + + -- Juan Rhenals Thu, 24 Mar 2016 19:00:00 +0000 + +amazon-ecs-init (1.8.1-1) stable; urgency=medium + + * Cache Agent version 1.8.1 + + -- Juan Rhenals Mon, 29 Feb 2016 19:00:00 +0000 + +amazon-ecs-init (1.8.0-1) stable; urgency=medium + + * Cache Agent version 1.8.0 + + -- Juan Rhenals Wed, 10 Feb 2016 19:00:00 +0000 + +amazon-ecs-init (1.7.1-1) stable; urgency=medium + + * Cache Agent version 1.7.1 + + -- Samuel Karp Fri, 08 Jan 2016 19:00:00 +0000 + +amazon-ecs-init (1.7.0-1) stable; urgency=medium + + * Cache Agent version 1.7.0 + * Add support for Docker 1.9.1 + + -- Samuel Karp Tue, 08 Dec 2015 19:00:00 +0000 + +amazon-ecs-init (1.6.0-1) stable; urgency=medium + + * Cache Agent version 1.6.0 + * Updated source dependencies + + -- Samuel Karp Wed, 21 Oct 2015 19:00:00 +0000 + +amazon-ecs-init (1.5.0-1) stable; urgency=medium + + * Cache Agent version 1.5.0 + * Improved merge strategy for user-supplied environment variables + * Add default supported logging drivers + + -- Samuel Karp Wed, 23 Sep 2015 19:00:00 +0000 + +amazon-ecs-init (1.4.0-2) stable; urgency=medium + + * Add support for Docker 1.7.1 + + -- Samuel Karp Wed, 26 Aug 2015 19:00:00 +0000 + +amazon-ecs-init (1.4.0-1) stable; urgency=medium + + * Cache Agent version 1.4.0 + + -- Samuel Karp Tue, 11 Aug 2015 19:00:00 +0000 + +amazon-ecs-init (1.3.1-1) stable; urgency=medium + + * Cache Agent version 1.3.1 + * Read Docker endpoint from environment variable DOCKER_HOST if present + + -- Samuel Karp Thu, 30 Jul 2015 19:00:00 +0000 + +amazon-ecs-init (1.3.0-1) stable; urgency=medium + + * Cache Agent version 1.3.0 + + -- Samuel Karp Thu, 02 Jul 2015 19:00:00 +0000 + +amazon-ecs-init (1.2.1-2) stable; urgency=medium + + * Cache Agent version 1.2.1 + + -- Euan Kemp Fri, 19 Jun 2015 19:00:00 +0000 + +amazon-ecs-init (1.2.0-1) stable; urgency=medium + + * Update versioning scheme to match Agent version + * Cache Agent version 1.2.0 + * Mount cgroup and execdriver directories for Telemetry feature + + -- Samuel Karp Tue, 02 Jun 2015 19:00:00 +0000 + +amazon-ecs-init (1.0-5) stable; urgency=medium + + * Add support for Docker 1.6.2 + + -- Samuel Karp Mon, 01 Jun 2015 19:00:00 +0000 + +amazon-ecs-init (1.0-4) stable; urgency=medium + + * Properly restart if the ecs-init package is upgraded in isolation + + -- Samuel Karp Mon, 11 May 2015 19:00:00 +0000 + +amazon-ecs-init (1.0-3) stable; urgency=medium + + * Restart on upgrade if already running + + -- Samuel Karp Wed, 06 May 2015 19:00:00 +0000 + +amazon-ecs-init (1.0-2) stable; urgency=medium + + * Cache Agent version 1.1.0 + * Add support for Docker 1.6.0 + * Force cache load on install/upgrade + * Add man page + + -- Samuel Karp Tue, 05 May 2015 19:00:00 +0000 + +amazon-ecs-init (1.0-1) stable; urgency=medium + + * Re-start Agent on non-terminal exit codes + * Enable Agent self-updates + * Cache Agent version 1.0.0 + * Added rollback to cached Agent version for failed updates + + -- Samuel Karp Thu, 26 Mar 2015 19:00:00 +0000 + +amazon-ecs-init (0.3-0) stable; urgency=medium + + * Migrate to statically-compiled Go binary + + -- Samuel Karp Mon, 16 Mar 2015 19:00:00 +0000 + +amazon-ecs-init (0.2-3) stable; urgency=medium + + * Test for existing container agent and force remove it + + -- Eric Nordlund Tue, 17 Feb 2015 19:00:00 +0000 + +amazon-ecs-init (0.2-2) stable; urgency=medium + + * Mount data directory for state persistence + * Enable JSON-based configuration + + -- Samuel Karp Thu, 15 Jan 2015 19:00:00 +0000 + +amazon-ecs-init (0.2-1) stable; urgency=medium + + * Naive update functionality + + -- Samuel Karp Mon, 15 Dec 2014 19:00:00 +0000 + diff --git a/packaging/generic-deb-integrated/debian/compat b/packaging/generic-deb-integrated/debian/compat new file mode 100644 index 00000000000..ec635144f60 --- /dev/null +++ b/packaging/generic-deb-integrated/debian/compat @@ -0,0 +1 @@ +9 diff --git a/packaging/generic-deb-integrated/debian/control b/packaging/generic-deb-integrated/debian/control new file mode 100644 index 00000000000..a67c2a649bf --- /dev/null +++ b/packaging/generic-deb-integrated/debian/control @@ -0,0 +1,16 @@ +Source: amazon-ecs-init +Section: misc +Priority: optional +Maintainer: ecs-agent-dev +Build-Depends: debhelper (>= 9.20160709~), golang-go (>= 1.7) +Standards-Version: 4.3.0 +Homepage: https://aws.amazon.com/ecs +Vcs-Git: git://github.com/aws/amazon-ecs-agent.git +Vcs-Browser: http://github.com/aws/amazon-ecs-agent + +Package: amazon-ecs-init +Architecture: amd64 arm64 +Depends: ${shlibs:Depends}, ${misc:Depends}, systemd, docker-ce (>= 17.12.0) | docker-engine (>= 1.6.0) | docker-ee | docker.io +Description: Starts the Amazon ECS Agent + amazon-ecs-init may be run to register an EC2 instance as an Amazon ECS + Container Instance. diff --git a/packaging/generic-deb-integrated/debian/copyright b/packaging/generic-deb-integrated/debian/copyright new file mode 100644 index 00000000000..8344e8c632f --- /dev/null +++ b/packaging/generic-deb-integrated/debian/copyright @@ -0,0 +1,66 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: amazon-ecs-init +Source: https://github.com/aws/amazon-ecs-agent + +Files: * +Copyright: Amazon.com, Inc. or its affiliates. All Rights Reserved. +License: Apache +Version: 2.0 + +Files: ecs-init/Godeps/_workspace/src/github.com/golang/mock/* +Copyright: 2010-2012 Google Inc. 2011 Alex Reece. +License: Apache +Version: 2.0 + +License: Apache + Apache License + . + Version 2.0, January 2004 + . + http://www.apache.org/licenses/ + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + 1. Definitions. + "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + 1. You must give any other recipients of the Work or Derivative Works a copy of this License; and + 2. You must cause any modified files to carry prominent notices stating that You changed the files; and + 3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + 4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + . + You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + END OF TERMS AND CONDITIONS + APPENDIX: How to apply the Apache License to your work + To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. + Copyright [yyyy] [name of copyright owner] + . + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + http://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + *** + . + Note: Other license terms may apply to certain, identified software files contained within or distributed with the accompanying software if such terms are included in the directory containing the accompanying software. Such other license terms will then apply in lieu of the terms of the software license above. diff --git a/packaging/generic-deb-integrated/debian/dirs b/packaging/generic-deb-integrated/debian/dirs new file mode 100644 index 00000000000..98dba4c51b9 --- /dev/null +++ b/packaging/generic-deb-integrated/debian/dirs @@ -0,0 +1,6 @@ +etc/ecs +var/log/ecs +var/lib/ecs +var/lib/ecs/data +var/cache/ecs +usr/libexec diff --git a/packaging/generic-deb-integrated/debian/docs b/packaging/generic-deb-integrated/debian/docs new file mode 100644 index 00000000000..b43bf86b50f --- /dev/null +++ b/packaging/generic-deb-integrated/debian/docs @@ -0,0 +1 @@ +README.md diff --git a/packaging/generic-deb-integrated/debian/ecs.service b/packaging/generic-deb-integrated/debian/ecs.service new file mode 100644 index 00000000000..470eeaba136 --- /dev/null +++ b/packaging/generic-deb-integrated/debian/ecs.service @@ -0,0 +1,33 @@ +# Copyright 2014-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the +# "License"). You may not use this file except in compliance +# with the License. A copy of the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and +# limitations under the License. + +[Unit] +Description=Amazon Elastic Container Service - container agent +Documentation=https://aws.amazon.com/documentation/ecs/ +Requires=docker.service +After=docker.service + +[Service] +Type=simple +Restart=on-failure +RestartSec=10s +EnvironmentFile=-/var/lib/ecs/ecs.config +EnvironmentFile=-/etc/ecs/ecs.config +ExecStartPre=/usr/libexec/amazon-ecs-init pre-start +ExecStart=/usr/libexec/amazon-ecs-init start +ExecStop=/usr/libexec/amazon-ecs-init stop +ExecStopPost=/usr/libexec/amazon-ecs-init post-stop + +[Install] +WantedBy=multi-user.target diff --git a/packaging/generic-deb-integrated/debian/rules b/packaging/generic-deb-integrated/debian/rules new file mode 100755 index 00000000000..b880b742a30 --- /dev/null +++ b/packaging/generic-deb-integrated/debian/rules @@ -0,0 +1,23 @@ +#!/usr/bin/make -f +# -*- makefile -*- +VERSION := $(shell dpkg-parsechangelog -S Version) + +# Uncomment this to turn on verbose mode. +export DH_VERBOSE=1 + +%: + dh $@ + +override_dh_auto_build: + ./scripts/gobuild.sh debian + +clean: + dh $@ + rm -f amazon-ecs-init + +override_dh_auto_install: + cp ecs-agent.tar debian/amazon-ecs-init/var/cache/ecs/ecs-agent-v${VERSION}.tar + echo "2" >debian/amazon-ecs-init/var/cache/ecs/state + ln -s "/var/cache/ecs/ecs-agent-v${VERSION}.tar" debian/amazon-ecs-init/var/cache/ecs/ecs-agent.tar + dh_installsystemd --no-start --no-enable --name=ecs + dh_installsystemd --no-start --no-enable --name=amazon-ecs-volume-plugin diff --git a/packaging/generic-deb-integrated/debian/source/format b/packaging/generic-deb-integrated/debian/source/format new file mode 100644 index 00000000000..163aaf8d82b --- /dev/null +++ b/packaging/generic-deb-integrated/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/packaging/generic-deb-integrated/debian/source/include-binaries b/packaging/generic-deb-integrated/debian/source/include-binaries new file mode 100644 index 00000000000..551a0cdb07d --- /dev/null +++ b/packaging/generic-deb-integrated/debian/source/include-binaries @@ -0,0 +1 @@ +ecs-agent.tar diff --git a/packaging/generic-rpm-integrated/README.md b/packaging/generic-rpm-integrated/README.md new file mode 100644 index 00000000000..3a996728010 --- /dev/null +++ b/packaging/generic-rpm-integrated/README.md @@ -0,0 +1,30 @@ +##Steps to build and install package: + +* Install build and install dependencies + ``` + rpm-build make golang-go gcc git wget rpmdevtools + ``` +* Download the latest agent + ``` + curl -O https://s3.amazonaws.com/amazon-ecs-agent/ecs-agent-v${VERSION}.tar + ``` + or + ``` + curl -O https://s3.amazonaws.com/amazon-ecs-agent/ecs-agent-arm64-v${VERSION}.tar + ``` +* Build the package by running + ``` + make generic-rpm + ``` +* Install docker via docker repos: https://docs.docker.com/engine/install/ +* Install the package using built `.rpm` file from previous step +* (Only needed if EFS is needed) Install `efs-utils` following instructions on https://docs.aws.amazon.com/efs/latest/ug/installing-amazon-efs-utils.html#installing-other-distro +* Start and enable ecs service + ``` + sudo systemctl enable --now ecs + ``` +* (Only needed if EFS is needed) Start and enable ecs volume plugin + ``` + sudo systemctl enable --now amazon-ecs-volume-plugin + ``` + diff --git a/packaging/generic-rpm-integrated/amazon-ecs-init.spec b/packaging/generic-rpm-integrated/amazon-ecs-init.spec new file mode 100644 index 00000000000..38e4a0df524 --- /dev/null +++ b/packaging/generic-rpm-integrated/amazon-ecs-init.spec @@ -0,0 +1,543 @@ +# Copyright 2014-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the +# "License"). You may not use this file except in compliance +# with the License. A copy of the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and +# limitations under the License. + +%global gobuild_tag generic_rpm +%global _cachedir %{_localstatedir}/cache +%global bundled_agent_version %{version} +%global no_exec_perm 644 +%global debug_package %{nil} +%global agent_image ecs-agent-v%{version}.tar + +Name: amazon-ecs-init +Version: 1.60.0 +Release: 1 +License: Apache 2.0 +Summary: Amazon Elastic Container Service initialization application +ExclusiveArch: x86_64 aarch64 + +Source0: sources.tgz +Source1: ecs.service +Source2: amazon-ecs-volume-plugin.service +Source3: amazon-ecs-volume-plugin.socket + +BuildRequires: systemd +BuildRequires: glibc-static +Requires: systemd +Requires: iptables +Requires: procps + +%description +ecs-init supports the initialization and supervision of the Amazon ECS +container agent, including configuration of cgroups, iptables, and +required routes among its preparation steps. + +%prep +%setup -c + +%build +./scripts/build-pause +./scripts/get-host-certs +./scripts/build-cni-plugins +./scripts/build true "" false true +./scripts/build-agent-image +./scripts/gobuild.sh + +%install +install -D amazon-ecs-init %{buildroot}%{_libexecdir}/amazon-ecs-init +install -D amazon-ecs-volume-plugin %{buildroot}%{_libexecdir}/amazon-ecs-volume-plugin +install -m %{no_exec_perm} -D scripts/amazon-ecs-init.1 %{buildroot}%{_mandir}/man1/amazon-ecs-init.1 + +mkdir -p %{buildroot}%{_sysconfdir}/ecs +touch %{buildroot}%{_sysconfdir}/ecs/ecs.config +touch %{buildroot}%{_sysconfdir}/ecs/ecs.config.json + +# Configure ecs-init to reload the bundled ECS container agent image. +mkdir -p %{buildroot}%{_cachedir}/ecs +echo 2 > %{buildroot}%{_cachedir}/ecs/state +# Add a bundled ECS container agent image +install -m %{no_exec_perm} %{agent_image} %{buildroot}%{_cachedir}/ecs/ + +mkdir -p %{buildroot}%{_sharedstatedir}/ecs/data + +install -m %{no_exec_perm} -D %{SOURCE1} $RPM_BUILD_ROOT/%{_unitdir}/ecs.service +install -m %{no_exec_perm} -D %{SOURCE2} $RPM_BUILD_ROOT/%{_unitdir}/amazon-ecs-volume-plugin.service +install -m %{no_exec_perm} -D %{SOURCE3} $RPM_BUILD_ROOT/%{_unitdir}/amazon-ecs-volume-plugin.socket + +%files +%{_libexecdir}/amazon-ecs-init +%{_mandir}/man1/amazon-ecs-init.1* +%{_libexecdir}/amazon-ecs-volume-plugin +%config(noreplace) %ghost %{_sysconfdir}/ecs/ecs.config +%config(noreplace) %ghost %{_sysconfdir}/ecs/ecs.config.json +%ghost %{_cachedir}/ecs/ecs-agent.tar +%{_cachedir}/ecs/%{basename:%{agent_image}} +%{_cachedir}/ecs/state +%dir %{_sharedstatedir}/ecs/data +%{_unitdir}/ecs.service +%{_unitdir}/amazon-ecs-volume-plugin.service +%{_unitdir}/amazon-ecs-volume-plugin.socket + +%post +# Symlink the bundled ECS Agent at loadable path. +ln -sf %{basename:%{agent_image}} %{_cachedir}/ecs/ecs-agent.tar +%systemd_post ecs +%systemd_post amazon-ecs-volume-plugin.service + +%postun +%systemd_postun ecs.service +%systemd_postun_with_restart amazon-ecs-volume-plugin + +%changelog +* Wed Mar 02 2022 Chien Han Lin - 1.60.0-1 +- Cache Agent version 1.60.0 +- Add volume plugin to rpm/deb package + +* Fri Feb 04 2022 Yash Kulshrestha - 1.59.0-1 +- Cache Agent version 1.59.0 +- Log what pre-start is doing + +* Fri Jan 14 2022 Utsa Bhattacharjya - 1.58.0-2 +- Cache Agent version 1.58.0 +- Add exec prerequisites to ecs-anywhere installation script + +* Fri Dec 03 2021 Mythri Garaga Mannjunatha - 1.57.1-1 +- Cache Agent version 1.57.1 +- Enable AL2 support for ECS-A +- Initialize docker client lazily + +* Wed Nov 03 2021 Feng Xiong - 1.57.0-1 +- Cache Agent version 1.57.0 + +* Thu Oct 21 2021 Cameron Sparr - 1.56.0-1 +- Cache Agent version 1.56.0 + +* Wed Oct 13 2021 Utsa Bhattacharjya - 1.55.5-1 +- Cache Agent version 1.55.5 + +* Thu Sep 30 2021 Ray Allan - 1.55.4-1 +- Cache Agent version 1.55.4 +- GPU updates for ECS Anywhere +- Introduce new configuration variable ECS_OFFHOST_INTROSPECTION_NAME to specify the primary network interface name to block offhost agent introspection port access. + +* Thu Sep 16 2021 Mythri Garaga Manjunatha - 1.55.3-1 +- Cache Agent version 1.55.3 + +* Thu Sep 02 2021 Yinyi Chen - 1.55.2-1 +- Cache Agent version 1.55.2 + +* Thu Aug 19 2021 Meghna Srivastav - 1.55.1-1 +- Cache Agent version 1.55.1 + +* Thu Aug 05 2021 Heming Han - 1.55.0-1 +- Cache Agent version 1.55.0 + +* Mon Jul 26 2021 Utsa Bhattacharjya - 1.54.1-1 +- Cache Agent version 1.54.1 + +* Wed Jul 07 2021 Ray Allan - 1.54.0-1 +- Cache Agent version 1.54.0 + +* Wed Jun 23 2021 Mythri Garaga Manjunatha - 1.53.1-1 +- Cache Agent version 1.53.1 + +* Wed Jun 09 2021 Angel Velazquez - 1.53.0-1 +- Cache Agent version 1.53.0 + +* Tue May 25 2021 Feng Xiong - 1.52.2-2 +- Cache Agent version 1.52.2 +- ecs-anywhere-install: fix incorrect download url when running in cn region + +* Thu May 20 2021 Feng Xiong - 1.52.2-1 +- Cache Agent version 1.52.2 +- ecs-anywhere-install: remove dependency on gpg key server +- ecs-anywhere-install: allow sandboxed apt installations + +* Fri May 14 2021 Feng Xiong - 1.52.1-1 +- Cache Agent version 1.52.1 + +* Wed Apr 28 2021 Ray Allan - 1.52.0-1 +- Cache Agent version 1.52.0 +- Add support for ECS EXTERNAL launch type (ECS Anywhere) + +* Wed Mar 31 2021 Shubham Goyal - 1.51.0-1 +- Cache Agent version 1.51.0 + +* Wed Mar 17 2021 Mythri Garaga Manjunatha - 1.50.3-1 +- Cache Agent version 1.50.3 + +* Fri Feb 19 2021 Meghna Srivastav - 1.50.2-1 +- Cache Agent version 1.50.2 + +* Wed Feb 10 2021 Shubham Goyal - 1.50.1-1 +- Cache Agent version 1.50.1 +- Does not restart ECS Agent when it exits with exit code 5 + +* Fri Jan 22 2021 Utsa Bhattacharjya - 1.50.0-1 +- Cache Agent version 1.50.0 +- Allows ECS customers to execute interactive commands inside containers. + +* Wed Jan 06 2021 Shubham Goyal - 1.49.0-1 +- Cache Agent version 1.49.0 +- Removes iptable rule that drops packets to port 51678 unconditionally on ecs service stop + +* Mon Nov 23 2020 Shubham Goyal - 1.48.1-1 +- Cache Agent version 1.48.1 + +* Thu Nov 19 2020 Shubham Goyal - 1.48.0-2 +- Cache Agent version 1.48.0 + +* Fri Oct 30 2020 Mythri Garaga Manjunatha - 1.47.0-1 +- Cache Agent version 1.47.0 + +* Fri Oct 16 2020 Meghna Srivastav - 1.46.0-1 +- Cache Agent version 1.46.0 + +* Wed Sep 30 2020 Cam Sparr - 1.45.0-1 +- Cache Agent version 1.45.0 +- Block offhost access to agent's introspection port by default. Configurable via env ECS_ALLOW_OFFHOST_INTROSPECTION_ACCESS + +* Tue Sep 15 2020 Ray Allan - 1.44.4-1 +- Cache Agent version 1.44.4 + +* Wed Sep 02 2020 Meghna Srivastav - 1.44.3-1 +- Cache Agent version 1.44.3 + +* Wed Aug 26 2020 Utsa Bhattacharjya - 1.44.2-1 +- Cache Agent version 1.44.2 + +* Thu Aug 20 2020 Shubham Goyal - 1.44.1-1 +- Cache Agent version 1.44.1 + +* Thu Aug 13 2020 Shubham Goyal - 1.44.0-1 +- Cache Agent version 1.44.0 +- Add support for configuring Agent container logs + +* Tue Aug 04 2020 Feng Xiong - 1.43.0-2 +- Cache Agent version 1.43.0 + +* Thu Jul 23 2020 Yunhee Lee - 1.42.0-1 +- Cache Agent version 1.42.0 +- Add a flag ECS_SKIP_LOCALHOST_TRAFFIC_FILTER to allow skipping local traffic filtering + +* Thu Jul 09 2020 Feng Xiong - 1.41.1-2 +- Drop traffic to 127.0.0.1 that isn't originated from the host + +* Mon Jul 06 2020 Yajie Chu - 1.41.1-1 +- Cache Agent version 1.41.1 + +* Mon Jun 22 2020 Meghna Srivastav - 1.41.0-1 +- Cache Agent version 1.41.0 + +* Tue Jun 02 2020 Meghna Srivastav - 1.40.0-1 +- Cache Agent version 1.40.0 + +* Fri Apr 03 2020 Yunhee Lee - 1.39.0-2 +- Cache Agent version 1.39.0 +- Ignore IPv6 disable failure if already disabled + +* Thu Mar 19 2020 Sharanya Devaraj - 1.38.0-1 +- Cache Agent version 1.38.0 +- Adds support for ECS volume plugin +- Disable ipv6 router advertisements for optimization + +* Sat Feb 22 2020 Jessie Young - 1.37.0-2 +- Cache Agent version 1.37.0 +- Add '/etc/alternatives' to mounts + +* Tue Feb 04 2020 Ray Allan - 1.36.2-1 +- Cache Agent version 1.36.2 +- update sbin mount point to avoid conflict with Docker >= 19.03.5 + +* Fri Jan 10 2020 Yunhee Lee - 1.36.1-1 +- Cache Agent version 1.36.1 + +* Wed Jan 08 2020 Cameron Sparr - 1.36.0-1 +- Cache Agent version 1.36.0 +- capture a fixed tail of container logs when removing a container + +* Thu Dec 12 2019 Derek Petersen - 1.35.0-1 +- Cache Agent version 1.35.0 +- Fix bug where stopping agent gracefully would still restart ecs-init + +* Mon Nov 11 2019 Shubham Goyal - 1.33.0-1 +- Cache Agent version 1.33.0 +- Fix destination path in docker socket bind mount to match the one specified using DOCKER_HOST on Amazon Linux 2 + +* Mon Oct 28 2019 Shubham Goyal - 1.32.1-1 +- Cache Agent version 1.32.1 +- Add the ability to set Agent container's labels + +* Wed Sep 25 2019 Cameron Sparr - 1.32.0-1 +- Cache Agent version 1.32.0 + +* Fri Sep 13 2019 Yajie Chu - 1.31.0-1 +- Cache Agent version 1.31.0 + +* Thu Aug 15 2019 Feng Xiong - 1.30.0-1 +- Cache Agent version 1.30.0 + +* Mon Jul 08 2019 Shubham Goyal - 1.29.1-1 +- Cache Agent version 1.29.1 + +* Thu Jun 06 2019 Yumeng Xie - 1.29.0-1 +- Cache Agent version 1.29.0 + +* Fri May 31 2019 Feng Xiong - 1.28.1-2 +- Cache Agent version 1.28.1 +- Use exponential backoff when restarting agent + +* Thu May 09 2019 Feng Xiong - 1.28.0-1 +- Cache Agent version 1.28.0 + +* Thu Mar 28 2019 Shaobo Han - 1.27.0-1 +- Cache Agent version 1.27.0 + +* Thu Mar 21 2019 Derek Petersen - 1.26.1-1 +- Cache Agent version 1.26.1 + +* Thu Feb 28 2019 Derek Petersen - 1.26.0-1 +- Cache Agent version 1.26.0 +- Add support for running iptables within agent container + +* Fri Feb 15 2019 Ray Allan - 1.25.3-1 +- Cache Agent version 1.25.3 + +* Thu Jan 31 2019 Shaobo Han - 1.25.2-1 +- Cache Agent version 1.25.2 + +* Sat Jan 26 2019 Adnan Khan - 1.25.1-1 +- Cache Agent version 1.25.1 +- Update ecr models for private link support + +* Thu Jan 17 2019 Eric Sun - 1.25.0-1 +- Cache Agent version 1.25.0 +- Add Nvidia GPU support for p2 and p3 instances + +* Fri Jan 04 2019 Eric Sun - 1.24.0-1 +- Cache Agent version 1.24.0 + +* Fri Nov 16 2018 Jacob Vallejo - 1.22.0-4 +- Cache ECS agent version 1.22.0 for x86_64 & ARM +- Support ARM architecture builds + +* Thu Nov 15 2018 Jacob Vallejo - 1.22.0-3 +- Rebuild + +* Fri Nov 02 2018 Yunhee Lee - 1.22.0-2 +- Cache Agent version 1.22.0 + +* Thu Oct 11 2018 Sharanya Devaraj - 1.21.0-1 +- Cache Agent version 1.21.0 +- Support configurable logconfig for Agent container to reduce disk usage +- ECS Agent will use the host's cert store on the Amazon Linux platform + +* Fri Sep 14 2018 Yumeng Xie - 1.20.3-1 +- Cache Agent version 1.20.3 + +* Fri Aug 31 2018 Feng Xiong - 1.20.2-1 +- Cache Agent version 1.20.2 + +* Thu Aug 09 2018 Peng Yin - 1.20.1-1 +- Cache Agent version 1.20.1 + +* Wed Aug 01 2018 Haikuo Liu - 1.20.0-1 +- Cache Agent version 1.20.0 + +* Thu Jul 26 2018 Haikuo Liu - 1.19.1-1 +- Cache Agent version 1.19.1 + +* Thu Jul 19 2018 Feng Xiong - 1.19.0-1 +- Cache Agent version 1.19.0 + +* Wed May 23 2018 iliana weller - 1.18.0-2 +- Spec file cleanups +- Enable builds for both AL1 and AL2 + +* Fri May 04 2018 Haikuo Liu - 1.18.0-1 +- Cache Agent version 1.18.0 +- Add support for regional buckets +- Bundle ECS Agent tarball in package +- Download agent based on the partition +- Mount Docker plugin files dir + +* Fri Mar 30 2018 Justin Haynes - 1.17.3-1 +- Cache Agent version 1.17.3 +- Use s3client instead of httpclient when downloading + +* Mon Mar 05 2018 Jacob Vallejo - 1.17.2-1 +- Cache Agent version 1.17.2 + +* Mon Feb 19 2018 Justin Haynes - 1.17.1-1 +- Cache Agent version 1.17.1 + +* Mon Feb 05 2018 Justin Haynes - 1.17.0-2 +- Cache Agent version 1.17.0 + +* Tue Jan 16 2018 Derek Petersen - 1.16.2-1 +- Cache Agent version 1.16.2 +- Add GovCloud endpoint + +* Wed Jan 03 2018 Noah Meyerhans - 1.16.1-1 +- Cache Agent version 1.16.1 +- Improve startup behavior when Docker socket doesn't exist yet + +* Tue Nov 21 2017 Noah Meyerhans - 1.16.0-1 +- Cache Agent version 1.16.0 + +* Wed Nov 15 2017 Noah Meyerhans - 1.15.2-1 +- Cache Agent version 1.15.2 + +* Tue Oct 17 2017 Jacob Vallejo - 1.15.1-1 +- Update ECS Agent version + +* Sat Oct 07 2017 Justin Haynes - 1.15.0-1 +- Update ECS Agent version + +* Sat Sep 30 2017 Justin Haynes - 1.14.5-1 +- Update ECS Agent version + +* Tue Aug 22 2017 Justin Haynes - 1.14.4-1 +- Update ECS Agent version + +* Thu Jun 01 2017 Adnan Khan - 1.14.2-2 +- Cache Agent version 1.14.2 +- Add functionality for running agent with userns=host when Docker has userns-remap enabled +- Add support for Docker 17.03.1ce + +* Mon Mar 06 2017 Adnan Khan - 1.14.1-1 +- Cache Agent version 1.14.1 + +* Wed Jan 25 2017 Anirudh Aithal - 1.14.0-2 +- Add retry-backoff for pinging the Docker socket when creating the Docker client + +* Mon Jan 16 2017 Derek Petersen - 1.14.0-1 +- Cache Agent version 1.14.0 + +* Fri Jan 06 2017 Noah Meyerhans - 1.13.1-2 +- Update Requires to indicate support for docker <= 1.12.6 + +* Mon Nov 14 2016 Peng Yin - 1.13.1-1 +- Cache Agent version 1.13.1 + +* Tue Sep 27 2016 Noah Meyerhans - 1.13.0-1 +- Cache Agent version 1.13.0 + +* Tue Sep 13 2016 Anirudh Aithal - 1.12.2-1 +- Cache Agent version 1.12.2 + +* Wed Aug 17 2016 Peng Yin - 1.12.1-1 +- Cache Agent version 1.12.1 + +* Wed Aug 10 2016 Anirudh Aithal - 1.12.0-1 +- Cache Agent version 1.12.0 +- Add netfilter rules to support host network reaching credentials proxy + +* Wed Aug 03 2016 Samuel Karp - 1.11.1-1 +- Cache Agent version 1.11.1 + +* Tue Jul 05 2016 Samuel Karp - 1.11.0-1 +- Cache Agent version 1.11.0 +- Add support for Docker 1.11.2 +- Modify iptables and netfilter to support credentials proxy +- Eliminate requirement that /tmp and /var/cache be on the same filesystem +- Start agent with host network mode + +* Mon May 23 2016 Peng Yin - 1.10.0-1 +- Cache Agent version 1.10.0 +- Add support for Docker 1.11.1 + +* Tue Apr 26 2016 Peng Yin - 1.9.0-1 +- Cache Agent version 1.9.0 +- Make awslogs driver available by default + +* Thu Mar 24 2016 Juan Rhenals - 1.8.2-1 +- Cache Agent version 1.8.2 + +* Mon Feb 29 2016 Juan Rhenals - 1.8.1-1 +- Cache Agent version 1.8.1 + +* Wed Feb 10 2016 Juan Rhenals - 1.8.0-1 +- Cache Agent version 1.8.0 + +* Fri Jan 08 2016 Samuel Karp - 1.7.1-1 +- Cache Agent version 1.7.1 + +* Tue Dec 08 2015 Samuel Karp - 1.7.0-1 +- Cache Agent version 1.7.0 +- Add support for Docker 1.9.1 + +* Wed Oct 21 2015 Samuel Karp - 1.6.0-1 +- Cache Agent version 1.6.0 +- Updated source dependencies + +* Wed Sep 23 2015 Samuel Karp - 1.5.0-1 +- Cache Agent version 1.5.0 +- Improved merge strategy for user-supplied environment variables +- Add default supported logging drivers + +* Wed Aug 26 2015 Samuel Karp - 1.4.0-2 +- Add support for Docker 1.7.1 + +* Tue Aug 11 2015 Samuel Karp - 1.4.0-1 +- Cache Agent version 1.4.0 + +* Thu Jul 30 2015 Samuel Karp - 1.3.1-1 +- Cache Agent version 1.3.1 +- Read Docker endpoint from environment variable DOCKER_HOST if present + +* Thu Jul 02 2015 Samuel Karp - 1.3.0-1 +- Cache Agent version 1.3.0 + +* Fri Jun 19 2015 Euan Kemp - 1.2.1-2 +- Cache Agent version 1.2.1 + +* Tue Jun 02 2015 Samuel Karp - 1.2.0-1 +- Update versioning scheme to match Agent version +- Cache Agent version 1.2.0 +- Mount cgroup and execdriver directories for Telemetry feature + +* Mon Jun 01 2015 Samuel Karp - 1.0-5 +- Add support for Docker 1.6.2 + +* Mon May 11 2015 Samuel Karp - 1.0-4 +- Properly restart if the ecs-init package is upgraded in isolation + +* Wed May 06 2015 Samuel Karp - 1.0-3 +- Restart on upgrade if already running + +* Tue May 05 2015 Samuel Karp - 1.0-2 +- Cache Agent version 1.1.0 +- Add support for Docker 1.6.0 +- Force cache load on install/upgrade +- Add man page + +* Thu Mar 26 2015 Samuel Karp - 1.0-1 +- Re-start Agent on non-terminal exit codes +- Enable Agent self-updates +- Cache Agent version 1.0.0 +- Added rollback to cached Agent version for failed updates + +* Mon Mar 16 2015 Samuel Karp - 0.3-0 +- Migrate to statically-compiled Go binary + +* Tue Feb 17 2015 Eric Nordlund - 0.2-3 +- Test for existing container agent and force remove it + +* Thu Jan 15 2015 Samuel Karp - 0.2-2 +- Mount data directory for state persistence +- Enable JSON-based configuration + +* Mon Dec 15 2014 Samuel Karp - 0.2-1 +- Naive update functionality + diff --git a/packaging/generic-rpm-integrated/amazon-ecs-volume-plugin.service b/packaging/generic-rpm-integrated/amazon-ecs-volume-plugin.service new file mode 100644 index 00000000000..abce249d262 --- /dev/null +++ b/packaging/generic-rpm-integrated/amazon-ecs-volume-plugin.service @@ -0,0 +1,27 @@ +# Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the +# "License"). You may not use this file except in compliance +# with the License. A copy of the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and +# limitations under the License + +[Unit] +Description=Amazon Elastic Container Service Volume Plugin +After=network.target amazon-ecs-volume-plugin.socket +Requires=amazon-ecs-volume-plugin.socket + +[Service] +Type=simple +Restart=on-failure +RestartSec=10s +ExecStart=/usr/libexec/amazon-ecs-volume-plugin + +[Install] +WantedBy=multi-user.target diff --git a/packaging/generic-rpm-integrated/amazon-ecs-volume-plugin.socket b/packaging/generic-rpm-integrated/amazon-ecs-volume-plugin.socket new file mode 100644 index 00000000000..4b0d76a6dfc --- /dev/null +++ b/packaging/generic-rpm-integrated/amazon-ecs-volume-plugin.socket @@ -0,0 +1,23 @@ +# Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the +# "License"). You may not use this file except in compliance +# with the License. A copy of the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and +# limitations under the License + +[Unit] +Description=Amazon Elastic Container Service Volume Plugin +PartOf=amazon-ecs-volume-plugin.service + +[Socket] +ListenStream=/var/run/docker/plugins/amazon-ecs-volume-plugin.sock + +[Install] +WantedBy=sockets.target diff --git a/packaging/generic-rpm-integrated/ecs.service b/packaging/generic-rpm-integrated/ecs.service new file mode 100644 index 00000000000..a96542b140d --- /dev/null +++ b/packaging/generic-rpm-integrated/ecs.service @@ -0,0 +1,34 @@ +# Copyright 2014-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the +# "License"). You may not use this file except in compliance +# with the License. A copy of the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and +# limitations under the License. + +[Unit] +Description=Amazon Elastic Container Service - container agent +Documentation=https://aws.amazon.com/documentation/ecs/ +Requires=docker.service +After=docker.service + +[Service] +Type=simple +Restart=on-failure +RestartPreventExitStatus=5 +RestartSec=10s +EnvironmentFile=-/var/lib/ecs/ecs.config +EnvironmentFile=-/etc/ecs/ecs.config +ExecStartPre=/usr/libexec/amazon-ecs-init pre-start +ExecStart=/usr/libexec/amazon-ecs-init start +ExecStop=/usr/libexec/amazon-ecs-init stop +ExecStopPost=/usr/libexec/amazon-ecs-init post-stop + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/packaging/generic-rpm/amazon-ecs-init.spec b/packaging/generic-rpm/amazon-ecs-init.spec index ceb7e79291c..162a96c6b52 100644 --- a/packaging/generic-rpm/amazon-ecs-init.spec +++ b/packaging/generic-rpm/amazon-ecs-init.spec @@ -18,12 +18,12 @@ %global no_exec_perm 644 %global debug_package %{nil} -%ifarch x86_64 -%global agent_image %{SOURCE3} -%endif -%ifarch aarch64 -%global agent_image %{SOURCE4} -%endif +#%ifarch x86_64 +#%global agent_image %{SOURCE3} +#%endif +#%ifarch aarch64 +#%global agent_image %{SOURCE4} +#%endif Name: amazon-ecs-init Version: 1.60.0 @@ -42,6 +42,7 @@ Source4: https://s3.amazonaws.com/amazon-ecs-agent/ecs-agent-arm64-v%{bun Source5: amazon-ecs-volume-plugin.service Source6: amazon-ecs-volume-plugin.socket +BuildRequires: golang >= 1.7 BuildRequires: systemd Requires: systemd Requires: iptables diff --git a/scripts/build b/scripts/build index 0990096a8b0..a66eb21938b 100755 --- a/scripts/build +++ b/scripts/build @@ -40,6 +40,15 @@ if [[ "${TARGET_OS}" == "" && "${GOOS}" != "" ]]; then TARGET_OS="${GOOS}" fi +export GO111MODULE="auto" +export BUILDDIR="$(mktemp -d)" +export GOPATH="${ROOT}/agent/:${BUILDDIR}" +export SRCPATH="${BUILDDIR}/src/github.com/aws/amazon-ecs-agent" + +mkdir -p "${SRCPATH}" +ln -s "${ROOT}/agent" "${SRCPATH}" +cd "${SRCPATH}/agent" + if [[ "${version_gen}" == "true" ]]; then # Versioning stuff. We run the generator to setup the version and then always # restore ourselves to a clean state @@ -77,3 +86,5 @@ fi if [[ -n "${output_directory}" ]]; then mv $build_exe "${output_directory}" fi + +rm -r "${BUILDDIR}" diff --git a/scripts/build-agent-image b/scripts/build-agent-image index 32f18926128..5bb98dba2d8 100755 --- a/scripts/build-agent-image +++ b/scripts/build-agent-image @@ -22,6 +22,25 @@ ROOT=$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd ) cd "${ROOT}" AGENT_VERSION=$(cat VERSION) +architecture="" +case $(uname -m) in + x86_64) + architecture="amd64" + ;; + arm64) + architecture="arm64" + ;; + aarch64) + architecture="arm64" + ;; + *) + echo $"Unknown architecture $0" + exit 1 +esac + +if [ "$architecture" == "amd64" ]; then export GOARCH=amd64; fi +if [ "$architecture" == "arm64" ]; then export GOARCH=arm64; fi + # add cni-plugins mkdir -p rootfs/amazon-ecs-cni-plugins/ cp ./misc/plugins/aws-appmesh rootfs/amazon-ecs-cni-plugins/aws-appmesh diff --git a/scripts/build-cni-plugins b/scripts/build-cni-plugins index 097471f1861..eaa59e7a823 100755 --- a/scripts/build-cni-plugins +++ b/scripts/build-cni-plugins @@ -18,15 +18,40 @@ set -ex +architecture="" +case $(uname -m) in + x86_64) + architecture="amd64" + ;; + arm64) + architecture="arm64" + ;; + aarch64) + architecture="arm64" + ;; + *) + echo $"Unknown architecture $0" + exit 1 +esac + +if [ "$architecture" == "amd64" ]; then export GOARCH=amd64; fi +if [ "$architecture" == "arm64" ]; then export GOARCH=arm64; fi + # this script assumes we've run the get-cni-sources make target to update the cni submodules ROOT=$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd ) cd "${ROOT}" -# copy submodules to expected go build path github.com/aws/amazon-ecs-cni-plugins -cp -r amazon-ecs-cni-plugins ../amazon-ecs-cni-plugins -cp -r amazon-vpc-cni-plugins ../amazon-vpc-cni-plugins -cd ../amazon-ecs-cni-plugins && GO111MODULE=auto make plugins -mkdir -p ../amazon-ecs-agent/misc/plugins && cp -a ./bin/plugins/. ../amazon-ecs-agent/misc/plugins/ + +export BUILDDIR="$(mktemp -d)" +export GITPATH="${BUILDDIR}/src/github.com/aws" +export GOPATH="${BUILDDIR}" + +mkdir -p "${GITPATH}" +ln -s "${ROOT}/amazon-ecs-cni-plugins" "${GITPATH}" +ln -s "${ROOT}/amazon-vpc-cni-plugins" "${GITPATH}" + +cd ${GITPATH}/amazon-ecs-cni-plugins && GO111MODULE=auto make plugins +mkdir -p ${ROOT}/misc/plugins && cp -a ./bin/plugins/. ${ROOT}/misc/plugins/ make clean -cd ../amazon-vpc-cni-plugins && GO111MODULE=auto make build -cp -a ./build/linux_amd64/. ../amazon-ecs-agent/misc/plugins/ +cd ${GITPATH}/amazon-vpc-cni-plugins && GO111MODULE=on make build +cp -a ./build/linux_${GOARCH}/. ${ROOT}/misc/plugins/ make clean diff --git a/scripts/gobuild-agent-init b/scripts/gobuild-agent-init new file mode 100755 index 00000000000..f0d989f6c86 --- /dev/null +++ b/scripts/gobuild-agent-init @@ -0,0 +1,54 @@ +#!/bin/bash +# Copyright 2014-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the +# "License"). You may not use this file except in compliance +# with the License. A copy of the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and +# limitations under the License. +set -x +set -e +export TOPWD="$(pwd)" +export BUILDDIR="$(mktemp -d)" +export SRCPATH="${BUILDDIR}/src/github.com/aws/amazon-ecs-agent" +export GITPATH="${BUILDDIR}/src/github.com/aws" +export GO111MODULE="auto" + +if [ -d "${TOPWD}/.git" ]; then + version=$(cat "${TOPWD}/ecs-init/ECSVERSION") + git_hash=$(git rev-parse --short=8 HEAD) + git_dirty=false + + if [[ "$(git status --porcelain)" != "" ]]; then + git_dirty=true + fi + + VERSION_FLAG="-X github.com/aws/amazon-ecs-agent/ecs-init/version.Version=${version}" + GIT_HASH_FLAG="-X github.com/aws/amazon-ecs-agent/ecs-init/version.GitShortHash=${git_hash}" + GIT_DIRTY_FLAG="-X github.com/aws/amazon-ecs-agent/ecs-init/version.GitDirty=${git_dirty}" +fi + +# build cni-plugins +mkdir -p "${GITPATH}" +ls "${TOPWD}" +ln -s "${TOPWD}/amazon-ecs-cni-plugins" "${GITPATH}" +cd "${GITPATH}/amazon-ecs-cni-plugins" && make plugins +mkdir -p ${SRCPATH}/misc/plugins && cp -a ./bin/plugins/. ${SRCPATH}/misc/plugins +ls ${SRCPATH}/misc/plugins + +mkdir -p "{SRCPATH}" +ln -s "${TOPWD}/amazon-ecs-volume-plugin" "${SRCPATH}" +cd "${SRCPATH}" +CGO_ENABLED=0 go build -x -ldflags "-s ${VERSION_FLAG} ${GIT_HASH_FLAG} ${GIT_DIRTY_FLAG}" \ + -o "${SRCPATH}/amazon-ecs-volume-plugin" "${SRCPATH}/volumes/amazon-ecs-volume-plugin" +rm -r "${BUILDDIR}" + +mkdir -p "${SRCPATH}" +ln -s "${TOPWD}/ecs-init" "${SRCPATH}" +cd "${SRCPATH}/ecs-init" diff --git a/scripts/repobuild-pause b/scripts/repobuild-pause new file mode 100755 index 00000000000..67719c2af0f --- /dev/null +++ b/scripts/repobuild-pause @@ -0,0 +1,31 @@ +#!/bin/bash +# Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You may +# not use this file except in compliance with the License. A copy of the +# License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +# express or implied. See the License for the specific language governing +# permissions and limitations under the License. + +# This script builds the pause container without Docker +# The pause container configuration is static, except for the DIGEST + +set -ex + +mkdir -p rootfs/ +ls scripts/ +gcc -static misc/pause-container/pause.c -o rootfs/pause +mkdir -p image/rootfs +tar --mtime="@1492525740" --owner=0 --group=0 --numeric-owner -cf image/rootfs/layer.tar -C rootfs . +DIGEST=$(sha256sum image/rootfs/layer.tar | sed -e 's/ .*//') +install -m 0644 misc/pause-container/pause-image-VERSION image/rootfs/VERSION +install -m 0644 misc/pause-container/pause-config.json image/config.json +sed -i "s/~~digest~~/${DIGEST}/" image/config.json +install -m 0644 misc/pause-container/pause-manifest.json image/manifest.json +install -m 0644 misc/pause-container/pause-repositories image/repositories +tar --mtime="@1492525740" --owner=0 --group=0 --numeric-owner -cf ./amazon-ecs-pause.tar -C image . From ee119f52fa9f750093b9d5f866544005ba146e24 Mon Sep 17 00:00:00 2001 From: Prateek Chaudhry Date: Wed, 13 Apr 2022 00:18:42 +0000 Subject: [PATCH 2/3] dummy --- README.md | 1 + buildspec_arm.yml | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 buildspec_arm.yml diff --git a/README.md b/README.md index b7d68e4ec95..2db353e26b7 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # Amazon ECS Container Agent + ![Amazon ECS logo](doc/ecs.png "Amazon ECS") ![Build Status](https://github.com/aws/amazon-ecs-agent/workflows/Build/badge.svg?branch=dev) diff --git a/buildspec_arm.yml b/buildspec_arm.yml new file mode 100644 index 00000000000..7419cc9e237 --- /dev/null +++ b/buildspec_arm.yml @@ -0,0 +1,39 @@ +version: 0.2 + +env: + variables: + BUILD_LOG: "build_arm.log" + GITHUBUSERNAME: prateekchaudhry + +phases: + install: + commands: + - go version + - GOVERSION="1.15.15" + - GOLANG_TAR="go${GOVERSION}.linux-arm64.tar.gz" + - wget -O /tmp/${GOLANG_TAR} https://storage.googleapis.com/golang/${GOLANG_TAR} + - tar -C /usr/local -xzf /tmp/${GOLANG_TAR} + - go version + - echo "Install glibc-static for dockerfree installation method" + - yum -y install glibc-static | tee $BUILD_LOG + build: + commands: + - go version + - echo "build_id = $CODEBUILD_LOG_PATH" | tee -a $BUILD_LOG + - echo Building agent image | tee -a $BUILD_LOG + - AGENT_VERSION=$(cat VERSION) + - ECS_AGENT_TAR="ecs-agent-v${AGENT_VERSION}.tar" + - echo $(pwd) | tee -a $BUILD_LOG + # Path readjustment for codebuild testing with fork due to cni plugins - may not needed when deploying with main(?) + - cd ../.. + - mv $GITHUBUSERNAME aws + - cd aws/amazon-ecs-agent + - GO111MODULE=auto + - make dockerfree-agent-image 2>&1 | tee -a $BUILD_LOG + post_build: + commands: +artifacts: + files: + - $ECS_AGENT_TAR + - $BUILD_LOG + name: $CODEBUILD_RESOLVED_SOURCE_VERSION From f80ad6bf9860dae476b875bfdef6d3012f2794d9 Mon Sep 17 00:00:00 2001 From: Prateek Chaudhry Date: Wed, 13 Apr 2022 20:32:45 +0000 Subject: [PATCH 3/3] print architecture --- buildspec_arm.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/buildspec_arm.yml b/buildspec_arm.yml index 7419cc9e237..1ed0963ed78 100644 --- a/buildspec_arm.yml +++ b/buildspec_arm.yml @@ -9,6 +9,7 @@ phases: install: commands: - go version + - uname -m - GOVERSION="1.15.15" - GOLANG_TAR="go${GOVERSION}.linux-arm64.tar.gz" - wget -O /tmp/${GOLANG_TAR} https://storage.googleapis.com/golang/${GOLANG_TAR} @@ -30,6 +31,7 @@ phases: - cd aws/amazon-ecs-agent - GO111MODULE=auto - make dockerfree-agent-image 2>&1 | tee -a $BUILD_LOG + # Will the arm artifacts have same name as amd artifacts? post_build: commands: artifacts: