• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kubernetes / kompose / 4217081086

19 Feb 2023 04:20PM UTC coverage: 53.126%. Remained the same
4217081086

push

github

GitHub
Bump golang.org/x/net from 0.5.0 to 0.7.0 (#1592)

1963 of 3695 relevant lines covered (53.13%)

7.71 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/pkg/utils/docker/tag.go
1
/*
2
Copyright 2016 The Kubernetes Authors All rights reserved
3

4
Licensed under the Apache License, Version 2.0 (the "License");
5
you may not use this file except in compliance with the License.
6
You may obtain a copy of the License at
7

8
    http://www.apache.org/licenses/LICENSE-2.0
9

10
Unless required by applicable law or agreed to in writing, software
11
distributed under the License is distributed on an "AS IS" BASIS,
12
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
See the License for the specific language governing permissions and
14
limitations under the License.
15
*/
16

17
package docker
18

19
import (
20
        dockerlib "github.com/fsouza/go-dockerclient"
21
        "github.com/pkg/errors"
22
        log "github.com/sirupsen/logrus"
23
)
24

25
// Tag will provide methods for interaction with API regarding tagging images
26
type Tag struct {
27
        Client dockerlib.Client
28
}
29

30
// TagImage function is responsible for tagging the docker image
31
func (c *Tag) TagImage(image Image) error {
×
32
        options := dockerlib.TagImageOptions{
×
33
                Tag:  image.Tag,
×
34
                Repo: image.Repository,
×
35
        }
×
36

×
37
        log.Infof("Tagging image '%s' into repository '%s'", image.Name, image.Repository)
×
38
        err := c.Client.TagImage(image.ShortName, options)
×
39
        if err != nil {
×
40
                log.Errorf("Unable to tag image '%s' into repository '%s'. Error: %s", image.Name, image.Registry, err)
×
41
                return errors.New("unable to tag docker image(s)")
×
42
        }
×
43

44
        log.Infof("Successfully tagged image '%s'", image.Remote)
×
45
        return nil
×
46
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc