From 42c1275462c6914fee9ce1f254c9fe926fe77274 Mon Sep 17 00:00:00 2001 From: Yahav Itzhak Date: Sun, 12 Jul 2020 10:13:33 +0300 Subject: [PATCH] Add CI and running instructions (#2) --- README.md | 11 +++++++++++ pipelines.yml | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 pipelines.yml diff --git a/README.md b/README.md index 3332d8c..1bd1eb0 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,17 @@ JFrog Ecosystem integration environment is a Docker image containing all the tools JFrog CLI integrates with and supports. +## Using the Docker Image + +This Docker image can be pulled from `releases.jfrog.io` by running the following command: +```` +docker pull releases-docker.jfrog.io/jfrog-ecosystem-integration-env: +```` +Running the docker image: +``` +docker run -it releases-docker.jfrog.io/jfrog-ecosystem-integration-env +``` + ## Supported tools The image is using `apt` and `sdkman` to download the build tools. Note: In the `:latest` tag, the tools versions may change. diff --git a/pipelines.yml b/pipelines.yml new file mode 100644 index 0000000..57badaf --- /dev/null +++ b/pipelines.yml @@ -0,0 +1,39 @@ +resources: + - name: integrationEnvGit + type: GitRepo + configuration: + path: jfrog/jfrog-ecosystem-integration-env + gitProvider: github + buildOn: + # Build on commit and tags + tagCreate: true + branches: + # Only build on the master + include: master + +pipelines: + - name: build_integration_env + steps: + - name: BuildAndPush + type: Bash + configuration: + integrations: + - name: releases_jfrog + inputResources: + - name: integrationEnvGit + environmentVariables: + JFROG_CLI_OFFER_CONFIG: "false" + # The image tag is the Git tag if exist or 'latest' + IMAGE_NAME: releases-reg2.jfrog.io/jfrog-ecosystem-integration-env:${res_integrationEnvGit_gitTagName:-latest} + execution: + onStart: + - update_commit_status integrationEnvGit --context "$step_name" + onExecute: + - echo "Building docker image $IMAGE_NAME" + # Build docker image + - docker build $res_integrationEnvGit_resourcePath -t $IMAGE_NAME + # Push docker image + - curl -fL https://getcli.jfrog.io | sh + - ./jfrog rt docker-push $IMAGE_NAME reg2 --url=https://releases.jfrog.io/artifactory --access-token=$int_releases_jfrog_token + onComplete: + - update_commit_status integrationEnvGit --context "$step_name"