Skip to content

Commit

Permalink
Assume login
Browse files Browse the repository at this point in the history
  • Loading branch information
bbaassssiiee committed Mar 21, 2024
1 parent ee9b3a7 commit 6765011
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions molecule/resources/playbooks/side-effect.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
---
# export DOCKER_REGISTRY
# export DOCKER_USERNAME
# export DOCKER_PASSWORD
- name: Commit, tag, and push Docker image
hosts: localhost
gather_facts: false
connection: local
vars:
docker_registry: "{{ lookup('env','DOCKER_REGISTRY') }}"
docker_username: "{{ lookup('env','DOCKER_USERNAME') }}"
docker_password: "{{ lookup('env','DOCKER_PASSWORD') }}"
image_name: "dockpack/{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"
image_tag: "{{ lookup('pipe', 'date +%Y%m%d%H') }}" # Generates a datetime stamp
tasks:
Expand All @@ -18,13 +14,6 @@
cmd: "docker commit {{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }} {{ image_name }}:{{ image_tag }}"
register: commit_output

- name: Log in to Docker registry
community.general.docker_login:
username: "{{ docker_username }}"
password: "{{ docker_password }}"
registry_url: "{{ docker_registry | default(omit) }}"
ignore_errors: true

- name: Tag and push the Docker image

Check failure on line 17 in molecule/resources/playbooks/side-effect.yml

View workflow job for this annotation

GitHub Actions / lint

syntax-check[specific]

couldn't resolve module/action 'community.general.docker_image'. This often indicates a misspelling, missing collection, or incorrect module path.

Check failure on line 17 in molecule/resources/playbooks/side-effect.yml

View workflow job for this annotation

GitHub Actions / lint

syntax-check[specific]

couldn't resolve module/action 'community.general.docker_image'. This often indicates a misspelling, missing collection, or incorrect module path.
community.general.docker_image:
name: "{{ docker_registry }}{% if docker_registry | length > 1 %}/{% endif %}{{ image_name }}"
Expand Down

0 comments on commit 6765011

Please sign in to comment.