Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull gcc build image from public ECR, bump version #3108

Merged
merged 1 commit into from
Dec 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@ cni-plugins: get-cni-sources .out-stamp build-ecs-cni-plugins build-vpc-cni-plug

.PHONY: codebuild
codebuild: .out-stamp
./scripts/ci-ecr-pull "us-west-2" 508403128001
$(MAKE) release TARGET_OS="linux"
TARGET_OS="linux" ./scripts/local-save
$(MAKE) docker-release TARGET_OS="windows"
Expand Down
2 changes: 1 addition & 1 deletion misc/pause-container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# 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.
FROM gcc:7.3.0 as build
FROM public.ecr.aws/docker/library/gcc:11.2.0 as build

WORKDIR /src/
ADD . /src/
Expand Down
47 changes: 1 addition & 46 deletions scripts/ci-ecr-pull
Original file line number Diff line number Diff line change
Expand Up @@ -15,49 +15,4 @@
# limitations under the License.
set -e
singholt marked this conversation as resolved.
Show resolved Hide resolved

dir=$(dirname "${BASH_SOURCE[0]}")
source "$dir/ci-ecr"

AWS_REGION="${1}"
AWS_ACCOUNT_ID="${2}"

usage() {
cat <<EOF
Usage: ${0} AWS_REGION AWS_ACCOUNT_ID

This script attempts to pull the following dockerhub images from ECR:

$IMAGES

It assumes that the ECR images will be formatted like:

AWS_ACCOUNT_ID.dkr.ecr.AWS_REGION.amazonaws.com/ci/IMAGE_OS/IMAGE_ARCH/IMAGE_NAME

(see ci-ecr-push for creating these)
EOF
}

if [ -z "$AWS_REGION" ]; then
usage
exit 1
fi

if [ -z "$AWS_ACCOUNT_ID" ]; then
usage
exit 1
fi

ECR_URI="${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com"

aws --region "$AWS_REGION" ecr get-login-password | docker login --username AWS --password-stdin "$ECR_URI"

for image in $IMAGES; do
imageArch=$(docker version --format "{{.Server.Arch}}")
imageOS=$(docker version --format "{{.Server.Os}}")
fullRepoName="ci/$imageOS/$imageArch/$image"
fullURI="$ECR_URI/$fullRepoName"
echo "PULLING: $fullURI"
# ignore errors if repo doesnt exist or pull fails (fallback to dockerhub)
docker pull "$fullURI" || continue
docker tag "$fullURI" "$image"
done
exit 0
72 changes: 0 additions & 72 deletions scripts/ci-ecr-push

This file was deleted.