diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..5b044b2 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "python.pythonPath": "/usr/local/bin/python3" +} \ No newline at end of file diff --git a/codefresh.yml b/codefresh.yml index 0b541dd..6eb3f02 100644 --- a/codefresh.yml +++ b/codefresh.yml @@ -1,51 +1,63 @@ version: "1.0" +stages: + - "clone" + - "build" + - "integration" + - "push" steps: main_clone: - title: Cloning main repository... - type: git-clone - repo: ${{CF_REPO_OWNER}}/${{CF_REPO_NAME}} - revision: ${{CF_REVISION}} - BuildingDockerImageHelm2: - title: Building Docker Image - type: build - image_name: codefreshplugins/cfstep-helmfile - working_directory: ./ - dockerfile: Dockerfile + type: "git-clone" + description: "Cloning main repository..." + repo: "understood/cfstep-helmfile" + revision: "${{CF_BRANCH}}" + stage: "clone" + build: + title: "Building Docker Image" build_arguments: - - HELM_VERSION=2.14.3 - - HELMFILE_VERSION=${{HELMFILE_VERSION}} - - HELM_DIFF_VERSION=${{HELM_DIFF_VERSION}} - - HELM_SECRETS_VERSION=${{HELM_SECRETS_VERSION}} - BuildingDockerImageHelm3: - title: Building Docker Image - type: build - image_name: codefreshplugins/cfstep-helmfile - working_directory: ./ - dockerfile: Dockerfile - build_arguments: - - HELM_VERSION=3.0.0 - - HELMFILE_VERSION=${{HELMFILE_VERSION}} - - HELM_DIFF_VERSION=${{HELM_DIFF_VERSION}} - - HELM_SECRETS_VERSION=${{HELM_SECRETS_VERSION}} - PushingHelm2ToDockerRegistry: - title: Pushing to Docker Registry - type: push - candidate: ${{BuildingDockerImageHelm2}} - tags: - - 2.14.3-${{HELMFILE_VERSION}} - registry: dockerhub - when: - branch: - only: - - master - PushingHelm3ToDockerRegistry: - title: Pushing to Docker Registry - type: push - candidate: ${{BuildingDockerImageHelm3}} - tags: - - 3.0.0-${{HELMFILE_VERSION}} - registry: dockerhub + - "HELM_VERSION=${{HELM_VERSION}}" + - "HELMFILE_VERSION=${{HELMFILE_VERSION}}" + - "HELM_DIFF_VERSION=${{HELM_DIFF_VERSION}}" + - "HELM_SECRETS_VERSION=${{HELM_SECRETS_VERSION}}" + - "PYTHON_VERSION=${{PYTHON_VERSION}}" + type: "build" + image_name: "cfstep-helmfile-3" + tag: "${{CF_REVISION}}" + dockerfile: "Dockerfile" + stage: "build" + approval_for_push: + type: "pending-approval" + title: "Should we run push" when: branch: only: - - master \ No newline at end of file + - "master" + stage: "push" + parallel_push: + type: "parallel" + steps: + annotate_build: + title: "Annotating Build" + image: "${{build}}" + working_directory: "IMAGE_WORK_DIR" + commands: + - "echo Annotating Build..." + on_success: + metadata: + set: + - ${{build.imageId}}: + - CF_QUALITY: true + on_error: + metadata: + set: + - ${{build.imageId}}: + - CF_QUALITY: false + push: + title: "Pushing image to cfcr" + type: "push" + image_name: "cfstep-helmfile-3" + registry: "codefresh-registry" + candidate: "${{build}}" + tags: + - "${{CF_REVISION}}" + - "latest" + stage: "push" diff --git a/step.yaml b/step.yaml index 5b25285..3b56f19 100644 --- a/step.yaml +++ b/step.yaml @@ -1,19 +1,21 @@ kind: step-type version: '1.0' metadata: - name: helmfile - version: 0.0.2 - isPublic: true - description: Use helmfile from Codefresh pipeline + name: understood/cfstep-helmfile-3 + version: 1.0.0 + isPublic: false + description: Updated for helm 3... adds better helmfile support to Codefresh pipeline sources: - - 'https://github.com/codefresh-contrib/cfstep-helmfile' + - 'https://github.com/understood/cfstep-helmfile' stage: incubating maintainers: - name: Dustin Van Buskirk email: dustinvb@codefresh.io + - name: Michael Frohberg + email: mfrohberg@understood.org categories: - deployment - official: true + official: false tags: [] icon: type: svg @@ -25,7 +27,7 @@ metadata: version: '1.0' steps: deploy: - type: helmfile + type: understood/cfstep-helmfile-3 arguments: WORKING_DIRECTORY: /codefresh/volume/${{CF_REPO_NAME}} COMMANDS: diff @@ -58,14 +60,14 @@ spec: "HELM_VERSION": { "type": "string", "description": "Version of helmfile binary", - "default": "3.0.0", - "enum": [ "2.14.3", "3.0.0" ] + "default": "3.2.1", + "enum": [ "2.14.3", "3.0.2", "3.2.1" ] }, "HELMFILE_VERSION": { "type": "string", "description": "Version of helmfile binary", - "default": "0.93.2", - "enum": [ "0.90.2", "0.90.7", "0.93.2" ] + "default": "0.108.0", + "enum": [ "0.90.2", "0.90.7", "0.93.2", "0.98.1", "0.108.0" ] }, "HELM_BINARY": { "type": "string", @@ -206,8 +208,8 @@ spec: } steps: main: - name: helmfile - image: 'codefresh-plugins/cfstep-helmfile:${{HELM_VERSION}}-${{HELMFILE_VERSION}}' + name: understood/cfstep-helmfile-3 + image: 'gcr.io/udotorg-source/cfstep-helmfile-3' environment: - 'COMMANDS=${{COMMANDS}}' - 'WORKING_DIRECTORY=${{WORKING_DIRECTORY}}'