Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a package material via Package Repo page causes the pipeline to fail #8119

Closed
kritika-singh3 opened this issue May 7, 2020 · 2 comments

Comments

@kritika-singh3
Copy link
Contributor

Issue Type
  • Bug Report
Summary

Adding a package material a pipeline via the new pipeline config spa fails the pipeline. If added via the old rails based page, the pipeline is green.

Basic environment details
  • Go Version: GoCD Version: 20.4.0 (11669-dcb1fc4c5a26445c1091b81acc326d7219a53eed)
Steps to Reproduce
  1. Add a package repo and package via the Package Repositories SPA.
  2. Use the create pipeline wizard to create a pipeline with the package just created. Keep the task something simple - say ls.
  3. Trigger the pipeline
Expected Results

The pipeline status should be green

Actual Results

The ls task fails.

Note: if you do a full config save and then trigger the same pipeline with no changes - the pipeline will turn green.

Any other info

You can use the following config to duplicate the error:

<repositories>
    <repository id="5ef6a39c-18fd-4240-8843-40e538b1229d" name="repo-1">
      <pluginConfiguration id="yum" version="" />
      <configuration>
        <property>
          <key>REPO_URL</key>
          <value>file:///tmp/packagerepo/file_repo</value>
        </property>
        <property>
          <key>USERNAME</key>
        </property>
        <property>
          <key>PASSWORD</key>
        </property>
      </configuration>
      <packages>
        <package id="58a804c6-f243-4d5f-9ec0-dd4ed3e9b21b" name="go-agent">
          <configuration>
            <property>
              <key>PACKAGE_SPEC</key>
              <value>go-agent</value>
            </property>
          </configuration>
        </package>
      </packages>
    </repository>
  </repositories>
  <pipelines group="defaultGroup">
    <pipeline name="pipeline_with_yum_repo_package_as_materialb327a3e3">
      <materials>
        <git url="/tmp/materials/gitmaterial-1588841060-fdd9f723/sample.git" dest="git" autoUpdate="false" materialName="git" />
        <package ref="58a804c6-f243-4d5f-9ec0-dd4ed3e9b21b" />
      </materials>
      <stage name="defaultStage">
        <jobs>
          <job name="defaultJob">
            <tasks>
              <exec command="echo">
                <arg>GO_REPO_TW_REPO_GO_AGENT_PASSWORD</arg>
              </exec>
              <exec command="/bin/sh">
                <arg>-c</arg>
                <arg>echo GO_REPO_TW_REPO_GO_AGENT_PASSWORD : $GO_REPO_TW_REPO_GO_AGENT_PASSWORD AND GO_PACKAGE_TW_REPO_GO_AGENT_LOCATION : $GO_PACKAGE_TW_REPO_GO_AGENT_LOCATION</arg>
                <runif status="passed" />
              </exec>
            </tasks>
          </job>
        </jobs>
      </stage>
    </pipeline>
  </pipelines>
@arvindsv
Copy link
Member

arvindsv commented May 7, 2020

Just to add: The difference when you save using the old Rails page is this:

  <repositories>
      <repository id="5ef6a39c-18fd-4240-8843-40e538b1229d" name="repo-1">
        <pluginConfiguration id="yum" version="" />
        <configuration>
          <property>
            <key>REPO_URL</key>
            <value>file:///tmp/packagerepo/file_repo</value>
          </property>
          <property>
            <key>USERNAME</key>
+           <value />
          </property>
          <property>
            <key>PASSWORD</key>
+           <encryptedValue />
          </property>
        </configuration>
        <packages>
          <package id="58a804c6-f243-4d5f-9ec0-dd4ed3e9b21b" name="go-agent">
            <configuration>
              <property>
                <key>PACKAGE_SPEC</key>
                <value>go-agent</value>
              </property>
            </configuration>
          </package>
        </packages>
      </repository>
    </repositories>

@maheshp maheshp moved this from To do to In progress in 20.4.0 May 13, 2020
@maheshp maheshp moved this from In progress to Done in 20.4.0 May 19, 2020
@maheshp
Copy link
Contributor

maheshp commented May 19, 2020

Verified on GoCD Version: 20.4.0 (11733-33ea7d24052d505afd2fefdcfc2e6f6e5fd3f86f)

@maheshp maheshp closed this as completed May 19, 2020
@maheshp maheshp moved this from Done to QA Done in 20.4.0 May 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
20.4.0
QA Done
Development

No branches or pull requests

3 participants