这是indexloc提供的服务,不要输入任何密码
Skip to content
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
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,6 @@ FROM gcr.io/distroless/static-debian11:debug
COPY --from=builder /go/bin/apigeecli /usr/local/bin/apigeecli
COPY LICENSE.txt /
COPY third-party-licenses.txt /
COPY --from=jq /jq /usr/local/bin/jq
COPY --from=jq /jq /usr/local/bin/jq

ENTRYPOINT [ "apigeecli" ]
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,36 @@ The lastest container version for apigeecli can be downloaded via
docker pull ghcr.io/apigee/apigeecli:latest
```

### Using docker to run commands locally

```sh
docker run -ti ghcr.io/apigee/apigeecli:latest orgs list -t $token
```

### Using apigeecli with Cloud Build

```yaml
steps:
- id: 'Run apigeecli commands'
name: ghcr.io/apigee/apigeecli:latest
entrypoint: 'sh'
args:
- -c
- |
#setup preferences
apigeecli prefs set --nocheck=true -o $PROJECT_ID
apigeecli token cache --metadata-token

# run other commands here
apigeecli orgs list
```

### Access shell

```sh
docker run -ti --entrypoint sh ghcr.io/apigee/apigeecli:latest
```

See this [page](https://github.com/apigee/apigeecli/pkgs/container/apigeecli) for other versions.

## What you need to know about apigeecli
Expand Down
2 changes: 1 addition & 1 deletion cloud-builder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ steps:
args: ['build', '-t', 'gcr.io/$PROJECT_ID/apigeecli', '-f', 'Dockerfile', '.']
# Push the container image to Container Registry
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'gcr.io/$PROJECT_ID/apigeecli-builder']
args: ['push', 'gcr.io/$PROJECT_ID/apigeecli']
options:
env: ["DEBUG=true"]
machineType: N1_HIGHCPU_8
Expand Down
26 changes: 26 additions & 0 deletions test/sample-cloud-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright 2023 Google LLC
#
# 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.

steps:
- id: 'Run apigeecli commands'
name: ghcr.io/apigee/apigeecli:latest
entrypoint: 'sh'
args:
- -c
- |
#setup preferences
apigeecli prefs set --nocheck=true -o $PROJECT_ID
apigeecli token cache --metadata-token

apigeecli orgs list