Skip to content

Commit

Permalink
Update linked agent version to use built agent (#3181)
Browse files Browse the repository at this point in the history
Note -- windows tests failing due to unrelated volume size change.
  • Loading branch information
fierlion authored Apr 18, 2022
1 parent 74a17e7 commit db9d242
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion agent-container/agent-manifest.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"Config":"config.json","RepoTags":["amazon/amazon-ecs-agent:~~agentversion~~"],"Layers":["rootfs/layer.tar"]}]
[{"Config":"config.json","RepoTags":["amazon/amazon-ecs-agent:latest"],"Layers":["rootfs/layer.tar"]}]
8 changes: 4 additions & 4 deletions packaging/amazon-linux-ami-integrated/ecs-init.spec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
%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
Expand Down Expand Up @@ -178,7 +177,7 @@ 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
install -m %{no_exec_perm} %{agent_image} %{buildroot}%{_cachedir}/ecs/

mkdir -p %{buildroot}%{_sharedstatedir}/ecs/data

Expand All @@ -197,7 +196,8 @@ install -m %{no_exec_perm} -D %{SOURCE5} %{buildroot}%{_sysconfdir}/init/amazon-
%{_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
%ghost %{_cachedir}/ecs/ecs-agent.tar
%{_cachedir}/ecs/%{basename:%{agent_image}}
%{_cachedir}/ecs/state
%dir %{_sharedstatedir}/ecs/data

Expand All @@ -211,7 +211,7 @@ install -m %{no_exec_perm} -D %{SOURCE5} %{buildroot}%{_sysconfdir}/init/amazon-
%endif

%post
# Symlink the bundled ECS Agent at loadable path.
# symlink the built ecs-agent image at a loadable path
ln -sf %{basename:%{agent_image}} %{_cachedir}/ecs/ecs-agent.tar
%if %{with systemd}
%systemd_post ecs
Expand Down
2 changes: 0 additions & 2 deletions packaging/generic-rpm-integrated/amazon-ecs-init.spec
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

%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
Expand Down Expand Up @@ -65,7 +64,6 @@ 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
Expand Down

0 comments on commit db9d242

Please sign in to comment.